Show percentage in Pie Chart Widget

0
Hi, could you please help me with showing the numbering/percentage in the pie chart itself?     Thanks, Prem
asked
11 answers
1

Did you try setting the value parameter in the widget? Otherwise you might want to check the documentation of chartjs to add your own custom parameters / see what is possible. http://www.chartjs.org/docs/latest/charts/doughnut.html

answered
1

ChartJS does not cater for this itself, so you have to resort to plain JavaScripting. See:

https://stackoverflow.com/questions/33363373/how-to-display-pie-chart-data-values-of-each-slice-in-chart-js

And a working JSFiddle for it:

http://jsfiddle.net/2gapedks/

So, it involves a fairly simple JS customization to the ChartJS widget.

answered
0

Hey Eric,

I am using Chart JS (Pie Chart). I am trying to implement percentage/Number  thing on to the chart. Image of a chart is as below,

answered
0

Another option would be to use a different charting library/widget, like perhaps the Tech Tammina D3 chart widget from the app store. One of the screenshots looks like what you want.

 

EDIT - he's a screenshot of it working in 5.21.5

 

answered
0

I tried but somehow its not workout in mendix 5.21.0 version. I am still trying though and what I did with the chart Js is simply looks like above image but without number and percentage. when I go for the mendix app store the sample image is looks like below, but I have no clue where this percentage thing come from.

 

answered
0

Hi Prem,

I have checked Tech Tammina D3 Pie Chart widget works fine with 5.20.0 version. It will come as below example.

answered
0

Hi Prem,

I have checked Tech Tammina D3 Pie Chart widget is working with modeler 5.20.0 version. The graph will be as follows. Hope this might solve your issue.

Thanks.

Regards,

Sushuma

answered
0

Hi Prem,

I checked Tech Tammina D3 Pie Chart widget is working fine with modeler version 5.20.0. The graph is as follows. Hope this might solve your issue.

 

Thanks,

Regards,

Sushuma

answered
0

Hi Prem,

I checked Tech Tammina D3 Pie Chart widget is working fine with modeler version 5.20.0. The graph is as follows. Hope this might solve your issue.

 

answered
0

Hi Prem,

I checked Tech Tammina D3 Pie Chart widget is working fine with modeler version 5.20.0. The graph is as follows. Hope this might solve your issue.

 

answered
0

Hi Prem,

I checked Tech Tammina D3 Pie Chart widget is working fine with modeler version 5.20.0. The graph is as follows. Hope this might solve your issue.

answered