Is it possible to get the Values from Crosshair depending on X- and Y-Axisand Show them in tooltip?
I'm using UltraDataChart.
Hi,
Thank you for the reply.
If I am understanding you correctly, you want to show this tooltip even if the mouse isn’t over any series. If that is the case, you can achieve this by adding a transparent series that fills all the available space behind your actual series. If the TooltipContentUpdating event is fired for this series, it would mean that the mouse is over the empty space. Than you can show the tooltip, using similar approach as in my previous sample.
I have modified my sample in order to demonstrate this approach.
Please let me know if you have any additional questions.
A Little Problem for now. The tooltipUpdate only happens while crosshair is on lineseries or in areaseries. It is not functional if the crosshair is above all series and even on lineseries it is very difficult to get the line.
It seems that there is a way to achieve similar functionality as in WPF or Silverlight. You need to handle the TooltipContentUpdating of your series. In it return a control like a Label and set the label text based on the value of the item that you are hovering.
Thanks for your example, but i now get the coordinates of crosshair in ultradatachart, not the depending values of the series.
Date is shown and the value of my Scala depending of crosshair Position. Y-Value is always the same as Long as i move crosshair only horizontal. Even if the seriesline value is changing.
Beacuse there are 3 yAxis in my Chart with 10 series i Need the value of each series depending on the current xAxis.
I search for the same functionality as like in WPF or Silverlight DataChart.
Thank you for the clarification.
What you could do in order to achieve this functionality, by using a timer’s tick event and subscribing to the mouse move event of the chart. In both event get the mouse coordinates and convert them to world coordinates (they range from 0, 0 to 1, 1). Then you can calculate what the value is using the axes’ ActualMinimumValue and ActualMaximumValue and draw them on the chart using a graphics object.
I have attached a sample which demonstrates this approach.