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
close icon

Tooltip with Polar charts

Hello,

I need to display a tooltip with the polar chart. I want to display informations that change with the part of the polar over which the mouse is.
When I use the event MouseMove of the Series the ChartMouseEventArgs has one segment with a collection of CorrespondingPoints representing all the points of the series. Is there a way to know the point corresponding to the mouse position ?
With your sample very lightly modified we see the differences between Radars and Polars.For Radars CorrespondingPoints[0] is the selected point so the Tooltip changes. For Polars it is the first point of the segment, the tooltip does not change.

Cordially,

Olivier Vayssié



ToolTip Demo_79fdb048.rar

5 Replies

AR Arnard October 4, 2010 12:38 PM UTC

Hello Olivier,

Look here, I discussed for getting Value with Mouse position : http://www.syncfusion.com/support/forums/chart-wpf/96123/Update-ToolTip-with-good-values

I paste here :

*********

//On serie Mouse Move, I take Mouse Position :
mousePoint = 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);


********


It's for cartesian Chart, I don't know if it work for polar, but I hope le logic is the same.

Arnaud.



OV Olivier VAYSSIE October 6, 2010 09:30 AM UTC

Hello Arnaud,

Thank you for your answer. But this method does not work for radial charts. You will get NaN if you try it with a Pie, or a Polar.

Cordially,

Olivier Vayssié





SS Sujitha S Syncfusion Team October 6, 2010 09:35 AM UTC

Hello Olivier,

The PointToValue method is only for cartesian axis and with the PolarChart the PointToValue does not work and thus returns double.NaN value.

We do not have the support for PointToValue in Polar axis, We will give the support after Vol4 release.

Let me know, if you have any queries.

Regards
Sujtha S





OV Olivier VAYSSIE October 8, 2010 10:10 AM UTC

Hello,

I am not using PointToValue with polar charts. I am using e.Segment.CorrespondingPoints with the mousemove event. It is working with Cartesian charts and Pie chart. The thing is for Polar charts there are more than one CorrespondingPoints. I was asking if there was a way to know which point was the one over which the mouse was.

Cordially,

Olivier Vayssié



SS Sujitha S Syncfusion Team October 12, 2010 12:11 PM UTC

Hello Olivier,

Sorry for the inconvenience caused.

We donot have default ToolTip support for polar axis.

We can use custom ToolTip instead, since the polar Axis is rendered as one segment with a collection of CorrespondingPoints, we need to get the Mouse position and convert it to PointToValue to get the corresponding value.
But the PointToValue is not supported in PolarAxis.

So we cannot set the ToolTip for PolarAxis, it is supported only for the cartesian Axis.

Regards
Sujitha S





Loader.
Live Chat Icon For mobile
Up arrow icon