Hi
Another simple question - I am adding custom labels to the right axis of a chart I have created. The left axis is displaying rainfall in millimeters and the right hand axis is displaying the values in inches. I copied your example from the demo program and it works fine but not the first time it displays. It works fine the second and subsequent times I use it.
I call the procedure after I have plotted the graph and set the extents of the axis. I have tried placing a chart.refresh or chart.update before calling my addlabels procedure but with no luck. When I add a break point inside the procedure I notice that properties such as chart.Axes.Right.Maximum have zero values when they should have much higher ones. I use this value to work out how many values I need to plot labels for. Can you suggest a solution?
Bruce.
Custom Labels problem
Re: Custom Labels problem
Hi
I think the problem is that I should be adding custom labels using the OnAfterDraw event and not after I have just filled them.
Bruce.
I think the problem is that I should be adding custom labels using the OnAfterDraw event and not after I have just filled them.
Bruce.
Re: Custom Labels problem
Hi Bruce,
The OnAfterDraw event could be a solution, but note using it may not be the most efficient solution.
Instead of that, you could call the Draw() method to force the chart repaint, and then place your custom labels once.
Right, it will probably be something like that. Note that some properties need the chart to have finished the drawing process to have valid values. If you are using some of these properties, you could force a chart repaint before using them.Metman wrote:I think the problem is that I should be adding custom labels using the OnAfterDraw event and not after I have just filled them.
The OnAfterDraw event could be a solution, but note using it may not be the most efficient solution.
Instead of that, you could call the Draw() method to force the chart repaint, and then place your custom labels once.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |