We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Update ToolTip with good values

Hello,

I'm starting working with SyncFusion, specially drawing ChartLine.
I want to add information on ToolTip, showing for each point Date and Value, (I have some thousands values). I take one sample working with MouseMove Event for having Mouse Position and set the new tooltip value. I take too some code of Data Point Highlight Demo, to get the values to display.

The problem is : C# code of Demo take the CorrespondingPoints[0].Index, and in a ChartLine, it returns always the first value. I think the 0 index would be change by a dynamic value, but which ?

Thanks

Arnaud


4 Replies

AR Arnard August 23, 2010 03:56 PM UTC

Humm, with another test, it's OK with Line, but not with FastLine ?!
I thought using FastLine for hundreds points, Line would be OK ?

Is there a reason (Optimisation for FastLine) ? Can I change that ?

Thanks


SS Sujitha S Syncfusion Team August 31, 2010 04:04 AM UTC

Hi Arnard,

Thanks for your interest in Syncfusion product.

We can obtain the index value using the following code snippet,

double Index = e.Segment.CorrespondingPoints[0].Index;

In the FastLine the Series is drawn as a single segment, So as to improve the performance. So that the index value is always returned as 0 in FastLine Series.

Let me know, If you have any queries.

Regards
Sujitha S


AR Arnard September 20, 2010 09:48 AM UTC

I success getting values with FastLine :
On serie Mouse Move, I take Mouse Position : e.MouseEventArgs.GetPosition(ChartArea)

and then I get the value from Point :

double valx = ChartArea.PointToValue(ChartArea.PrimaryAxis, mousePoint);
double valy = ChartArea.PointToValue(ChartArea.SecondaryAxis, mousePoint);

And then I set the tooltip value.

I don't get the exactly value, working between 0 and 70 000, but that will be helpfull reading the chart with a good approximate value.

Hope that could help somebody ;)



SS Sujitha S Syncfusion Team September 22, 2010 05:13 AM UTC

Hi Arnard,

Thanks for your interest in Syncfusion product.

We feel glad to hear that your issue has been resolved.

Let me know, If you have any queries.

Regards
Sujitha S




Loader.
Live Chat Icon For mobile
Up arrow icon