MGS_Sebastien

Pie or doughnut chart placing values inside

Recommended Posts

Hi Sebastien,

 

FusionCharts does not supports displaying the values inside the Pie/Doughnut charts, since the angled slices dimension may not be sufficient to display the values or labels, which may result to a wrong or incorrect visualization of the chart.

Natively it is not supported. However as a work-around you can use the values in the text annotations and place it manually on the slices accordingly.

Reference to Text Annotations : http://www.fusioncharts.com/dev/advanced-chart-configurations/annotations/creating-annotations/creating-text-annotations.html

Reference to positioning annotations : http://www.fusioncharts.com/dev/advanced-chart-configurations/annotations/positioning-annotations-using-absolute-values.html

Reference to "drawComplete" event : http://www.fusioncharts.com/dev/api/fusioncharts/fusioncharts-events.html#event-drawComplete

 

Find a sample using Text annotations in "drawComplete" event to display labels and values inside the slices : http://jsfiddle.net/Akash008/e21gqbbk/

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Hi Akash,

As I use my doughnut in a dashboard, the values are always changing so this means annotations manually placed is very difficult.

 

Quote

"since the angled slices dimension may not be sufficient to display the values or labels, which may result to a wrong or incorrect visualization of the chart"

The ideal thing could be to have a property (like 'placeValuesInside': '1') to place the values inside (and leave label outside).

Another property could be added in addition : 'minDisplayValue': '5' which hide values under the specified number. (Label stills outside and displayed ! The tooltip will make the job)

 

Sébastien

Share this post


Link to post
Share on other sites

Hi Sebastien,

 

We understand that placing the annotations manually is difficult when you have the data values changing periodically, as the annotations are static components of the chart. The application of annotation was suggested as a work-around to have your required visualization, since placing values inside Pie is not supported, natively.

 

Quote

ideal thing could be to have a property (like 'placeValuesInside': '1') to place the values inside

Suppose, if you have 4 data plots with values : 500, 400, 10, 10.

Sample fiddle : http://jsfiddle.net/Akash008/e21gqbbk/1/

The plots with the values "10" does not have the sufficient space on the plot(slice) to display only the values.(The values may be less than 10 also!). Hence, placing values inside the Pie/Doughnut slices is not a correct visualization.

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Hi,

Just saw that in 3.14 you've added the possibility to place the values inside, this is very good. I saw also that you take in account my second ask to set a min value before showing them, this is very good too.

 

Thank you !

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