Essential Chart ASP.NET
Show X and Y values under mouse cursor
September 13, 2011 09:58 AM by Sivakumar D[Syncfusion]
Ashish Mondal
Show X and Y values under mouse cursor
September 13, 2011 03:18 AM
Is there is way to show the X and Y values of a chart under the the mouse cursor when we hover the mouse over a chart?

Sivakumar D
[Syncfusion]
Show X and Y values under mouse cursor
September 13, 2011 04:30 AM
Hi Ashish,

Thanks for using syncfusion products.

We suggest you to use Tooltip property of series to get the X and Y values of the chart.Please refer below code snippet.

[C#]

this.ChartWebControl1.ShowToolTips = true;
series.PointsToolTipFormat = "{2}";
for (int i = 0; i < series.Points.Count; i++)
{
series.Styles[i].ToolTip = string.Format("X = {0}, Y = {1}", series.Points[i].X.ToString(), series.Points[i].YValues[0]);
}


For more information about tooltip,please refer our online documentation links below.

http://help.syncfusion.com/ug_93/User%20Interface/ASP.NET/Chart/Documents/45185tooltip.htm

http://help.syncfusion.com/ug_93/User%20Interface/ASP.NET/Chart/Documents/45186tooltipformat.htm

For your convenience, we have created sample and the same can be downloaded from the following link.

100892_Chart-355776587.zip

Please let me know if you have any other questions or concerns.

Regards,
Siva


Ashish Mondal
Show X and Y values under mouse cursor
September 13, 2011 04:44 AM
Thanks for the quick response.

But I want to show the X-Y values even when there is nothing plotted on the chart.

That is, the X-Y values shown will correspond to actual location of mouse cursor on the graph.

Also, the tool tip should be visible for as long as the mouse is over the chart.

Sivakumar D
[Syncfusion]
Show X and Y values under mouse cursor
September 13, 2011 09:58 AM
Hi Asish,

Thanks for your update.

We are sorry for inconvenience caused.In our current implementation of chartwebcontrol doesn't support to show the actual location of x and y values when there is nothing plotted on the chart.Tooltip property of series is displayed only when there is a points in the chart and also tooltip is visible as long as mouse over the points in the chart.

Please let me know if you have any other questions or concerns.

Regards,
Siva

::adCenter::