Adjusting box width according to position
Posted: Sun Mar 13, 2016 12:52 am
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
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