Page 1 of 1

Rearranging axis labels

Posted: Wed Sep 27, 2017 3:23 pm
by 16581890
I have a bar chart using TDragPointTool. I have assigned an event for the DragEnd and capture where the use placed the bar. From this, I rearrange all the bars in the new order, spaced evenly by changing the point XValue. I then need to change the bottom axis labels to match. The labels were initially set using BottomAxis.Items.Add(). I can shuffle them fine using BottomAxis.Items[x].Text were x is the original order I had them in. However, if the user has zoomed in, the axis is a subset of the original. How can I access the original label list so they are correct at any zoom?

Re: Rearranging axis labels

Posted: Thu Sep 28, 2017 7:01 am
by yeray
Hello,

TeeChart doesn't save the historic when you manually modify the Axis Items several times. However, you can save it manually too.
If the state you want to recover is the default, you can set the Axis Items Automatic property to True to force TeeChart to recalculate it considering the Increment, LabelsStyle, etc.