Good afternoon, guys! I need a little some help with chart director. How I plot a line in Axis Y1 To Axis X2 in vb.net? I've tried a lot, but no success.
I've tried plot line in Y1 to X2.
Good afternoon, guys! I need a little some help with chart director. How I plot a line in Axis Y1 To Axis X2 in vb.net? I've tried a lot, but no success.
I've tried plot line in Y1 to X2.
Assuming the origin of your chart is at (0, 0), the coordinate of a point on the y-axis must be (0, yValue), and a point on the x-axis must be (xValue, 0). So you just need to draw a line with these 2 points:
If you set the origin to some other values, just replace the 0 above with the coordinates of the origin.
If you let ChartDirector to automatically determine the origin, then the above method may not work. It is because ChartDirector will automatically determine the origin based on all of your data values. But in the above code, the data value depends on origin, and this results in circular dependency. In this case, you can try the following method:
The above assumes the y-axis is on the left side of the plot area, and the x-axis is at the bottom of the plot area.