Custom Chart Gap Background

  • Last update:March 05, 2025
  • Overview

    Application Scenario

    Setting gap backgrounds is intended to enhance the overall chart expressiveness and highlight certain important content in a chart. The following figure shows the effect.

    You can use the Default Gap function, but the effect of this function is preset and may not meet your actual needs. In this case, you can customize the gaps by the Custom Gap function.

    This document provides two examples of single-category and multi-category scenarios, as the configurations on the two scenarios differ.

    Function Entry

    The following figure shows the entry for customizing gap backgrounds. You can add multiple custom effects.

    Gap Background Setting for the Single-Category Chart

    Data Preparation

    Create a database query named ds1 with the SQL statement SELECT * FROM Sales_Volume, as shown in the following figure.

    Chart Insertion

    Merge required cells and insert a column chart, as shown in the following figure.

    Data Binding

    Bind the data to the column chart and set only one category, as shown in the following figure.

    Custom Gap Background

    Since the sales performance of Steven and Sophia is not satisfactory, you may want to highlight their sales data by setting Gap Background. The following shows the setting method:

    First, add a background to the data of Steven. The following figure shows the setting steps. Note that you need to set both the Lower Bound and Upper Bound values, which function as a range for the background color area. Otherwise, the setting will not take effect.

     Add the category name for both the Lower Bound and Upper Bound values. Note that you must enter the category name in the form of a formula, for example, ="Steven".

    Then, add a background for the data of Sophia. The following figure shows the setting steps.

    Effect Display

    1. PC

    8.png

    2. Mobile Terminal

    Custom Gap Background for the Multi-Category Chart

    Data Preparation

    Create a database query named ds1 with the SQL statement SELECT * FROM Sales_Volume, as shown in the following figure.

    Chart Insertion

    Merge required cells, and insert a column chart, as shown in the following figure.

    11.png

    Data Binding

    Bind the data to the column chart and set three categories, as shown in the following figure.

    Custom Gap Background

    In this example, add gap backgrounds to the data of odd-numbered salespersons to make the chart look less monotonous. The following figure shows the setting method.

    First, set the data background for the first salesperson Mike. The following figure shows the setting steps.

    The setting of both the Lower Bound and Upper Bound values for multi-category charts differs from that of single-category charts and needs to be set according to the sequence of multiple categories. You must also enter the category names in the form of aformula, for example, =["New York","Mike","Beverages"].

    Set the data background of the third salesperson Steven. The following figure shows the setting steps.

    Set the data background of the fifth salesperson James. The following figure shows the setting steps.

    Effect Display

    1. PC

    16.png

    2. Mobile Terminal

    17.png

    Template Download

    Template for the Single-Category Chart

    For details, you can download the template: Custom Gap Background for a Single Series.cpt.

    Template for the Multi-Category Chart

    For details, you can download the template: Custom Gap Background for Multiple Series.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