Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to have value and percentage in Ad Hoc View pie chart


    Dhiraj Pahlani
    • Features: Ad Hoc, Charts Product: JasperReports® Server

    Requirement:
    To have value and percentage in Ad Hoc View pie chart. We have an Ad Hoc View pie chart where we would like to have value AND percentage displayed for each slice, but we can only have value OR percentage yet. How can we manage to get the value AND the percentage at the same time?

    Solution:
    With series.dataLabels.enabled=true set for the Ad Hoc View, we can use below additional advanced property to display value and percentage for each slice in the pie chart. Notice that we have used comma as a separator to define the required desired formats for the data labels.

    series.dataLabels.format={point.name}: {point.percentage:.1f}%, {y}

    Please also see below screenshot for reference.

    value_and_.png.94ada929290fb0662735a2aa91f5ce93.png
    ___________________________________________________________________________________________________________________________________________
    Ref. Case #02163519


    User Feedback

    Recommended Comments

    There are no comments to display.



    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

×
×
  • Create New...