Color Interlacing for Bar Charts

  • Last update:January 06, 2025
  • Overview

    Problem

    When a bar chart specifies only one series, the bar is monotonously displayed in only one color, as shown in the following figure.

     隔行变色1.png

    How to set color interlacing for a bar chart as shown in the following figure?

     隔行变色2.png

    Solution

    You can set Condition Display for the chart under Cell Element > Special Effect. 

    Example

    Report Design

    1. Create a general report and create a dataset named ds1. The SQL statement is SELECT * FROM Sales_Volume.

    隔行变色3.png 

    2. Merge cells A1 to D18 and insert a bar chart as shown in the following figure.

     隔行变色4.png

    3. Bind the data to the bar chart, as shown in the following figure.

     隔行变色5.png

    4. Choose Special Effect > Condition Display, add Condition Attribute1, add the condition Category Index In '=range(2,100,2)', and set Solid Color to green, as shown in the following figure.

    iconNote:
     range(2,100,2) generates even numbers from 2 to 100. Namely, the bar will be displayed in green if its category index is an even number.

      隔行变色6.png

    Effect Display

    1. PC 

    Save the template and click Pagination Preview. The following figure shows the preview effect.

     隔行变色2.png

    2. Mobile Terminal

     隔行变色7.jpg

    Template Download

    For details, you can download the template Color Interlacing for Bar Charts.cpt


    Attachment List


    Theme: Chart
    • 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