Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to set different data label formats for different series in a multi axis chart


    Friendly User
    • Features: Charts Version: v6.3 Product: JasperReports® Server

    Problem:

    I've created a Dual and Multi-Axis Column Line Chart in an Ad Hoc View with these properties set:

     

    plotOptions.series.dataLabels.enabled = True

    plotOptions.series.dataLabels.format = {point.y:.0f}

     

    I would like to have different data label formats for the line and the bars on the chart.

    {point.y:.0f} for line

    ${point.y:,.2f} for bars

    Solution:

    You can set advanced properties for the ad hoc chart. In the advanced properties use the following to define different format for different series:

    plotOptions.column.dataLabels.format - for column series

    plotOptions.line.dataLabels.format - for line series


    User Feedback

    Recommended Comments

    Hi

    Further to this solution, how can I add a specific label to a series bar.

    EG 3 series bar chart in Advanced Reporting formatting(not studio) , with one bar label as % and other two with $. ?

    maybe with data option and 'plotOptions.series.dataLabels.format' ?

    Ive reviewd this to get some ideas but cannot get the right value options.

    https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-datalabels-multiple

     

     

    thks

     

    Link to comment
    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

×
×
  • Create New...