Problems drawing labels near CursorTool after Removing axes
Posted: Wed Jan 09, 2008 1:15 pm
Hello,
I added some Labels to my chart's CursorTool. This Labels are located directly left (or right) of the CursorTool. To determine the right X-Position for my Labels I use the following code:
This works fine.
BUT:
I use some vertical custom axes at the left side of the chart. There is one axis for every ChartLine. If one ChartLine will be removed, the corresponding vertical axis will be removed too. Left margin of the Chart will be set new to use the space, the removed axis left behind. Afterwards, the value in xPixel (using above shown code) is not correct anymore. Labels are not shown nearby the CursorTool but about 10 Pixels away from the cursor. What can I do to avoid this problem?
Thank you in advance,
rf
I added some Labels to my chart's CursorTool. This Labels are located directly left (or right) of the CursorTool. To determine the right X-Position for my Labels I use the following code:
Code: Select all
int xPixel = this.Chart.Axes.Custom[0].CalcXPosValue(XValue);
this.getTopLabel().Location = new System.Drawing.Point(xPixel, 30);
BUT:
I use some vertical custom axes at the left side of the chart. There is one axis for every ChartLine. If one ChartLine will be removed, the corresponding vertical axis will be removed too. Left margin of the Chart will be set new to use the space, the removed axis left behind. Afterwards, the value in xPixel (using above shown code) is not correct anymore. Labels are not shown nearby the CursorTool but about 10 Pixels away from the cursor. What can I do to avoid this problem?
Thank you in advance,
rf