Jump to content
We've recently updated our Privacy Statement, available here ×
  • HTML5 Chart Series Colouring by Value


    ghudson_1
    • Edited on:
    • Features: Charts Version: v5.2, v5.1, v5.0 Product: JasperReports® Library

    Issue Question:

    Using HTML5 charts in JasperReports version 5.x., how do I color my chart series based upon the values in my dataset without ordering my query?   For example, an answer of "no" should be RED, "yes" should be green, like:

    hc_color_series_capture.JPG.e24c71dbcdc80bf836beb526e433e8d7.JPG

    Resolution:

    You can set series color as an axis level property, then in the Advanced Properties of your measure, add a Series Property Contributor with the name "color", which is the highcharts series property name, and specify a bucket property value of [axis level name].[property name].

    See the attached example, hc_series_color.jrxml, suitable for version 5.1 or higher, and reference our sample "foodmart" database as your datasource.

    hc_series_color.jrxml.txt


    Ref. Case #00034523

    hc_series_color.jrxml


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...