Posted 16 October 2020, 4:23 am ESTWe were doing some axis label formatting via the itemFormatter, but after the formatting, we would still like to retrieve the original label text. How can we do that? I noticed there is a private property "_lbls" for axis. But how can we get the index of "_lbls" for the current label (the axis min/max could be changed)? Also is there any intention to expose those properties as public? Thanks.
Is there a way of getting the original axis label text
Posted by: Yifan_Zhang on 16 October 2020, 4:23 am EST
Marked as Answer
Replied 18 October 2020, 7:36 pm ESTHi Yifan,
You can save the original labels and the formatted labels in a different object by using the itemFormatter property. Then you can get the original labels by using the formatted labels as per your requirements. In the rendering event of the FlexChart, you can empty this object because the itemFormatter of the Axis runs after the rendering event. So, if the min/max is updated, then the labels object will also be updated accordingly. Please refer to the sample below for reference:
>>Also is there any intention to expose those properties as public?
I have asked the developers on whether they will make the property public. The internal tracking id of the case is 467386. I will update you once I will hear from them.
Replied 19 October 2020, 7:05 pm ESTThanks for the solution. Though we have to keep an extra copy of all the labels, that works well.