Page 1 of 1

Axis title clicked?

Posted: Tue Dec 23, 2008 9:31 am
by 14048132
Hello!!

I want to check the chart title click.
The chart title (Header / Footer / SubHeader / Footer ) all can check .
I write the code as follow as:

TChart.Header.Clicked(e.X, e.Y) = True
TChart.Footer.Clicked(e.X, e.Y) = True


But I want to check axis title was clicked,
i can't find axis (Left axis / Right axis / Top axis /Bottom) was "clicked"
how can i check it in .net?



TChart.Axes.?


Plz help me , thanks

Posted: Tue Dec 23, 2008 9:59 am
by narcis
Hi Chris.CHWU,

I'm afraid this is not possible for now. I'll add your request to the wish-list to be considered for inclusion in future releases.

Re: Axis title clicked?

Posted: Thu Jan 07, 2010 6:54 pm
by 15654674
I'm trying to accomplish the same thing using TChart .NET 4.0.2009.35592. I don't see a ClickAxisTitle event for TChart and the ClickAxis / ClickTitle don't appear to isolate axis titles. I hoped maybe I'd be able to intercept the mouse click events and work out whether they were over an axis title by comparing the click point to the axis title's location, but at the moment the AxisTitle members don't indicate a location anywhere. (All the position member variables for TextShape such as Left, Right, Top, Bottom, ShapeBounds or even Size are all 0.) Is this possible yet with the version of TChart I'm using, or will it have to wait some more?

Re: Axis title clicked?

Posted: Fri Jan 08, 2010 4:47 pm
by yeray
Hi Charles,

I've been playing with this and I've found that for the Top and Bottom axes you can check the following at MouseClick event:

Code: Select all

if (tChart1.Axes.Bottom.Title.ShapeBounds.Contains(e.Location)) this.Text = "Bottom Axis title clicked!!!";
But for the Left and Bottom axes this doesn't work because they are vertical so I'm afraid you should wait until the ticket that Narcis opened (TF02013669) will be implemented. I've incremented it's priority.