msiqueira9 Report post Posted August 15, 2017 Hi there, In the pie charts http://jsfiddle.net/fusioncharts/9cPeU/ the labels are always displayed like "labelName, percentagevalue %" is it possible to edit how this data is displayed to have it like "labelName (percentageValue%)"? Share this post Link to post Share on other sites
Akash Biswas Report post Posted August 16, 2017 Hi, The Pie chart by default displays the label and the percentage value separated by (,) comma. You can set your custom string to be displayed instead of the default one, by setting the "displayValue" attribute in each of the "data" objects with the custom string. Check the modified fiddle for reference to set your required format : "labelName (percentageValue%)" : http://jsfiddle.net/g97kgn3L/ Please note : For any change in the values you need to modify the "displayValue" attribute accordingly with your custom text. Thanks, Akash. Share this post Link to post Share on other sites
msiqueira9 Report post Posted August 16, 2017 Hi Akash, Thank you for your reply, in the example that you sent me you are using something like "displayValue": "Adult (34.4%)" that means that I have to calculate the percentage when setting the displayValue property. Is it possible to use variables like $label ($value %) in the displayValue or I do I have to set this manually? Regards, Share this post Link to post Share on other sites
Akash Biswas Report post Posted August 17, 2017 Hi, Natively it is not possible. But you can achieve it by storing the dataSource in a variable and the using the FusionCharts "rendered" events to calculate the percentage dynamically in the event function. Then set the calculated value in the JSON variable and use "setJSONData()" by passing the modified JSON variable. Please check the sample implementing the above technique : http://jsfiddle.net/fpa38rpf/ Reference to "rendered" event : http://www.fusioncharts.com/dev/api/fusioncharts/fusioncharts-events.html#event-rendered Reference to "setJSONData()" : http://www.fusioncharts.com/dev/api/fusioncharts/fusioncharts-methods.html#setJSONData Thanks, Akash. Share this post Link to post Share on other sites