amCharts support forum

You are not logged in.

Announcement

FORUM CLOSED! This forum is closed. We moved to a new place at Zendesk. Update your bookmarks.

Flex Components: amCharts Bundle Flex Components


#1 2012-07-02 08:01:43

Formatting Negative values

Hi,

I have negative values in my chart.I want to format it based on use preference.

For example negative values can be shown as follows

-1.1
- 1.1
(1.1)
1.1-
1.1 -

I want negative values to be formatted in balloon and also labels.Please let me know is there any option to do that or any other simply way to achieve this. I have the source code.

Offline

 

#2 2012-07-03 08:30:47

martynasma
Administrator

Re: Formatting Negative values

For axis labels you can use ValueAxis' labelFunction:

http://flex.amcharts.com/class_referenc … elFunction

For any other numbers you have two options:

1) Modify the component source code;

or

2) Add additional field to your data that holds already formatted numbers in String format. Then just use that field in balloons and data labels instead of [[value]].

I.e.: <.... labelText="[[formatted_value]]" />

Offline

 

#3 2012-07-03 23:21:55

Re: Formatting Negative values

Thank you so much, I will try this

Offline

 

© amCharts | Forum engine: PunBB