Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to create a Doughnut HTML5 chart


    stasp
    • Features: Charts Version: v6.3 Product: JasperReports® Library

    Requirement

    Sometimes you need to create a simple one level Donut (or Doughnut? either works i suppose) chart. The HTML5 Charts library in Jaspersoft Studio provides an option of more complex DualLevelPie chart, but is there a simpler way?


    Solution

    A Donut chart can be created by simply adding the following property:

    <hc:chartProperty name="plotOptions.pie.innerSize" value="50%"/>
    

    The value can be percentage as above, or it can be a number in pixels if you have specific size requirements. So before adding this property your chart will look something like this:

    pie.png.2912c8cdd4846b4881d723b325e709cd.png

    After:

    donut.png.e6fcc71fa664da1d4031a9b4d547cfd7.png

    Also attaching a sample report that runs on Foodmart data source.


    Ref. case #00072043

     

    donut_chart.jrxml


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...