Hi
In our application we are tyring to align the graph with another window.
This another window has some image displayed.
For aligning the graph with the other window we need to know the plot area in the windows coordinate.
What we need is to find out exactly where Y-axis of the graph in the window coordinate (in pixels).
How do I find the exact window coordinate at which Y-axis of the graph is present.
Please comment.
Thank you.
Graph Plot Area - Axis Origin in Window Coordinate
Hi Lakshmi
You can to use the values of ChartRect, the "ChartRect.Left" property returns the distance between the Left position of the Chart and the real position where graf is present. So, you can add this value to the X location of the chart, as below code:
You can to use the values of ChartRect, the "ChartRect.Left" property returns the distance between the Left position of the Chart and the real position where graf is present. So, you can add this value to the X location of the chart, as below code:
Code: Select all
int x = tChart1.Location.X + tChart1.Chart.ChartRect.Left;
int xx = tChart1.Location.X + tChart1.Axes.Left.Position; //This is other possibility.