Successfully!

Error!

Chart Category shows the Sum of each series value

  • Last update:  2022-01-11
  • I. Overview

    1. Problem description

    When a chart has multiple series, we hope that the sum of each series value will be displayed in the category name. As shown below:

    1.png


    2. Implementation ideas

    This is achieved by setting the form of the chart category name.

    II. Example

    1. Report design

    1) Create a new dataset ds1, the database query statement is: SELECT * FROM sales

    2.png

    2) Merge a piece of area cells, insert a StackedBar chart, and bind data as shown below:

    3) Set the catagory display of the chart, select the formula form , the formula is: $$$+":"+sum(value("ds1",5,4,$$$))


    4) Set the chart label, as shown below:

    5.png


    2. Effect preview

    1) PC terminal

    Save the report, click the page to preview , the effect is as shown in the figure below:


    2) Mobile



    3. Template download

    The completed template can be found at: %FR_HOME%\webapps\ webroot \WEB-INF\ reportlets\doc-EN\Chart\ColumnAndBar\chart_shows_sum_of_series_value.cpt

    Click to download the template: 

    chart_shows_sum_of_series_value.cpt

    Attachment List


    Theme: Chart
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback