Has anyone tried to work around this problem?
In the line chart you can detect a click on a data point using the built-in event, but there is no way to detect a click on a line drawn between two data points.
I submitted a new feature request, but that might take a long time, I am working on workaround ideas, one of them is to allow users to click on an annotation with the series name to select the series, but that might get crowded when we have several line series close together. I appreciate any ideas or suggestions on this issue.
Talal
it does make a difference that you're using a composite chart. e.Grid isn't useful in that situation, because a composite chart can have 0-n grids. use this expression to get the Grid hashtable for the line layer.
this.ultraChart1.CompositeChart.ChartLayers[0].ChartLayer.Grid
David,
Thanks for your reply, I implemented the solution you suggested, for some reason the Grid in e.Grid of the FillSceneGraph was always coming back empty so I couldn't use the advancedAxis to map the datapoints. But I put my code in the ChartDrawItem event and it works fine.
I am now working on finding a way to detect mouse hover over the series, so I am trying to find a way that doesn't require invalidating the layers.
Is there a way to get the AdvancedAxis in order to the the Map function other than in ChartDrawItem?
I saw an example that uses the Map function in FillSceneGraph but like I said that didn't work for me, for some reason e.Grid is empty. And I couldn't find enough documentation to explain the proper behaviour of this object. For example I don't know if it makes a difference if we're using a line chart or a composite chart with a line layer.
i think a workaround would be difficult. you'd have to handle the chart control's MouseDown, store the point that was clicked, invoke InvalidateLayers on the chart, then in the chart's FillSceneGraph event, loop through all the polylines, and, here's the tricky part, calculate if the clicked point is between two points on a polyline.