Most of the chartview elements use a Canvas to add visuals in and render. Because of how the visual tree is structured, all elements end up in the top left corner with a size of 0. So unless you click an element that is the child of the axis, you cannot determine that the axis was clicked.
You can use the position of the clicked event to see where the chart was clicked and if it is to the left of the plot area - then the left axis was clicked. You can use the PlotAreaClip property of the chart to do that check:
sender, MouseButtonEventArgs e)
Point pos = e.GetPosition(
(pos.X < plotAreaLeft)
// if there is a left axis, it was clicked
(plotAreaRight < pos.X)
// if there is a right axis, it was clicked
This method needs to be refined because it does not take into account where vertically the click happened and may be it happened outside the axis, you can improve the method if you decide to use this approach. In case you have multiple axes on one side, this approach will not suffice. Let us know if this is the case and we can work it out.
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer
and share your thoughts.