To improve user experience I would like my user to able to click in
the chart and get details about the position they click (information
about all channels, average, spreads etc.).
A server-side solution would be (but not working) :
protected void C1WebChart1_Click(object sender, ImageClickEventArgs e)
{
Axis ax = C1WebChart1.ChartArea.AxisX;
int SeriesOutput = 0;
int PointOutput = 0;
int DistanceOutput = 0;
if (C1WebChart1.ChartGroups.Group0.CoordToPointIndex(e.X, e.Y,
PlotElementEnum.Points, 1, ref PointOutput, ref DistanceOutput))
{
ax.Text = e.X + ", " + e.Y + " -> " + PointOutput;
}
else
{
ax.Text = "Conversion failed";
}
}
This
example does not return any 'good' points. When clicking in the chart
it always return the maximum number of points for PointOutput. Outside
the chart most of the clickpoints return 0.
Am I doing something wrong in this code?
Another approach is using the general callback. Strangely enough with the same input I get different output for the CoordToPointIndex function. The pointoutput becomes -1. Can someone explain this?
Thanks for helping
Ralph