Hi,
In the program that I support, we allow the user to plot numerous TBoxSeries/THorizBoxSeries on a single chart and allow the user to designate how much space they want between them (controlled by the position property). However, we then want to adjust the box width accordingly (fatter when there is more space between consecutive boxplots and thinner when the boxplots are closer together) otherwise with a fixed box width, they overlap when you move them closer together.
My first thought was to use the CalcPosValue functions, which weren't working until I realized that they only work after the chart has been drawn. So then I tried to add CalcPosValue to the AfterDraw event of the TChart in question, but it is not working for me there either.
Also, the AfterDraw is not a good method for me in general even if it did work because we have a batch functionality where we don't draw the charts to screen but go straight to export.
So can you please provide any help or suggestions for how to implement the feature I have described to adjust boxplot width according to position without having to resort to drawing the chart?
Thanks!
SDE
Adjusting box width according to position
Re: Adjusting box width according to position
Hello,
You can try forcing a chart repaint (Chart1.Draw; ) at OnCreate and using CalcPos* functions after it, once the internal properties have been set.
You can try forcing a chart repaint (Chart1.Draw; ) at OnCreate and using CalcPos* functions after it, once the internal properties have been set.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Adjusting box width according to position
That worked great. Thanks so much!