Hi guys
We've added functionality where clicking on an axis (hitTestResult.ChartElement == ChartElement.Axis) brings up a context menu. We'd now like to test this by simulating a click in the axis area and therefore need to calculate x,y coordinates.
For points within the chart we already have
private Point CartesianChartPixelCoordinates(NChart nevronChart, int horizontalAxisId, int verticalAxisId, double xValue, double yValue)
{
NScale2DToViewTransformation scale2DToViewTransformation = new NScale2DToViewTransformation(nevronControl.View.Context, nevronChart, horizontalAxisId, verticalAxisId);
NPointF viewPoint = new NPointF();
scale2DToViewTransformation.Transform(new NVector2DD(xValue, yValue), ref viewPoint);
return new Point((int) viewPoint.X, (int) viewPoint.Y);
}
We could use this to click on the axis line (if we got the minimum value displayed on the axis) but is there is an alternative you can suggest to click on the axis label, for instance?
Thanks
Kevin