Sign in to follow this  
toddz70

Can I Modify Displayvalue?

Recommended Posts

How can I add a bit of custom text to the default value that FC displays for a column?

 

I am using php like

$FC->addChartData($my_data_value, $data_value_options);

 

if i set $data_value_options = "displayValue=hello;"

then the chart shows "hello" INSTEAD OF the data value.

If $data_value_options does not include displayValue, then it shows the properly formatted data value, including Prefix, Suffix, Comma, and Decimals, like "$2,345.67" or "23.45%".

 

But i want BOTH what FC does on its own AND my custom string, afterwards, like this "23.45% hello".

 

Can this be done?

or must i take the raw data number, and do my own custom formatting of Prefix, Suffix, Comma, and Decimals, and then add my custom string?

 

thanks!

Share this post


Link to post
Share on other sites

Hi,

 

The "displayValue" attribute lets you specify your own custom string that would be displayed on the data plot.

 

In this case, the original "value" and "label" of the charts are overridden by the "displayValue" attribute. Hence, you would need to provide all the necessary values (that you wish to display on the chart) as the value for the "displayValue" attribute.

Ex:

<set label='Product A'  value='25' displayValue='Product A, 25%, Increasing' />

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this