Successfully!

Error!

Series Value Comparison and Highlighting in a Chart

  • Last update:  2023-10-19
  • Overview

    Version

    Report Server Version

    Functional Change

    11.0.6

    Added the optional condition Summary Field Value in the chart condition attribute, used to compare the chart value with another field value, thus achieving chart alerts and series value comparison.

    Expected Effect

    You may hope to compare the values of two series and achieve condition display (if a certain condition is met) during the creation of multiple charts or combination chart.

    In a column-line combination chart, if the quality score of a product is lower than the minimum standard score, the corresponding column is displayed in red.

    Implementation Ideas

    In the designer of FineReport V11.0.6 and later versions, you can set condition display for charts. In this example, add conditions for a column chart by selecting Value as the available column and Summary Field Value as the available condition. That is to say, compare the chart value with another field value. If the set conditions are met, the column color changes.

    Note:
    Only the following charts are supported: pie chart, column chart, bar chart, line chart, area chart, radar chart, and combination chart.

    Example

    Data Preparation

    Create a general report in the designer and create a built-in dataset. The dataset content is shown in the following figure.

    Adding a Chart

    Merge a range of cells, click  in the toolbar above to insert a chart, and choose Combination Chart > Column-Line Chart.

    Designing the Chart

    Select the chart, click Cell Element in the right panel, and you can set various attributes of the chart, such as type, data, style, and special effect.

    Data Binding

    You need to bind data for the combination chart separately. Bind quality score data for the column chart and minimum standard score data for the line chart.

    Setting Style

    You can modify the chart style as needed. In this example, the chart title is set to invisible, the legend position is set to Top, and the series color scheme is set to theme.

    Conditional Display

    Condition in this example: If the quality score of a product is lower than the minimum standard score, the corresponding column of the product is displayed in red.

    To achieve this condition, add a condition attribute for the column chart, and set the match color to red and the condition to Value Less than 'Minimum Standard Score.First'.

    That is to say, compare the series value of each product with the minimum standard score of each product in a column chart, in which a one-to-one mapping relationship exists.

    The procedure is shown in the following figure.

    Demonstration

    On PC

    Save the template and click Pagination Preview. The effect is shown in section "Expected Effect."

    On Mobile Terminal

    If the chart is previewed on App or in HTML5 mode, the effect is shown in the following figure.

    Template Completed

    Click to download the template: Series Value Comparison in Combination Chart.cpt

    Attachment List


    Theme: Chart
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback