Bar Chart with Interlaced Discoloration

  • Last update:January 20, 2022
  • I. Overview

    1. Problem description

    When the bar chart has only one series, the chart has only one color, which is monotonous, as shown in the figure below:

    How to set the color change of interlacing for the bar chart, as shown in the figure below:



    2. Solution

    It is realized by chartSpecial effect - Condition display.

    II. Example

    1. Design report

    1) Create a new normal report, create a new data queryds1, and the SQL statement is: select * from Sales_Basic

    2) Merge cells A1 ~ D18 and insert a bar chart, as shown in the following figure:


    3) Bind bar chart data, as shown in the figure below:


    4) In the chart properties panel Special effects > Condition display, add a color matching condition attribute. When the classification number is included in the formula range (2,100,2), the color matching is green, as shown in the following figure:

    Note: range (2,100,2) will produce numbers from 2, 4, 6, 8... to 100, that is, when the classification number is even, the color will be green.

    2021-01-07_09-56-27.png


    2. Effect preview

    1) PC terminal

    Save the report and click pagination preview. The effect is as follows:

    截屏2021-01-07 上午9.51.41.png

    2) Mobile terminal

    10.png

    III. Template download

    Completed template, please refer to %fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Chart\ColumnAndBar\BarChart_DifCol.cpt

    Click download template: 

    BarChart_DifCol.cpt

    Attachment List


    Theme: Chart
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy