Hi,
I have a WebChart with line series, each one on a custom axis.
After clicking on the background, I need to know on which series I clicked.
I can not use the ClickSeries event, since the click need not be exactly on the series line,
but anywhere on the rectangular area on which the series appears.
So I guess the ClickBackground event should be used, where I have the x,y screen coordinates of the click point.
How do I find the appropriate series from them?
How to find custom axis series from click on background
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi MeirS,
In that case you should loop either vertically or horizontally through the chart pixels (using WebChart1.Chart.ChartRect coordinates) or through axes positions (WebChart1.Chart.Axes.Custom[0].IStartPos and WebChart1.Chart.Axes.Custom[0].IEndPos) and check if any series is within this range using its Clicked method, for example:
Hope this helps!
In that case you should loop either vertically or horizontally through the chart pixels (using WebChart1.Chart.ChartRect coordinates) or through axes positions (WebChart1.Chart.Axes.Custom[0].IStartPos and WebChart1.Chart.Axes.Custom[0].IEndPos) and check if any series is within this range using its Clicked method, for example:
Code: Select all
WebChart1.Chart.Series[0].Clicked(e.X,e.Y);
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |