Home Forums Chart Support Pie chart data in percentage

Pie chart data in percentage

Viewing 7 posts - 1 through 7 (of 7 total)
  • #4787

    I am using CanvasJS to display a pie chart. It looks amazing. There is one requirement where I have to display the share of each pie in terms of percentage. I wanted to know how to do it. I can either display it using the tool-tip or it can be printed over the pie. My data is in terms of whole numbers, so I want the chart to convert the data into percentage.

    Any help will be appreciated.


    As of now, the chart cannot convert values automatically to percent values… But you can achieve the same using indexLabel / toolTipContent property to show percent values (you need to calculate and assign).

    Sunil Urs


    But its a very basic requirement and help me to set a stroke around the pies. how can i do that please help me



    Latest version of library comes with this feature. You can show percentage using #percent keyword. Here is a JSFiddle for the same.

    Pie chart with percent value in indexLabel

    Sunil Urs


    HI am using canvas JS pie chart, i need to round of the percentage. am getting percentage in the format 9.99 % i need to round of it as 10 , ho can i do it ?Please help



    You can do the same using percentFormatString property of dataSeries. Here is an example.

    Rounding indexLabel in Pie Chart

    Sunil Urs


    Thanks… Sunil … it worked..

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.