How to find custom axis series from click on background

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
MeirS
Newbie
Newbie
Posts: 14
Joined: Thu Jan 25, 2007 12:00 am

How to find custom axis series from click on background

Post by MeirS » Thu Aug 23, 2007 9:45 am

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?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Aug 23, 2007 9:58 am

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:

Code: Select all

WebChart1.Chart.Series[0].Clicked(e.X,e.Y);
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply