Custom Line Chart

  • Last update:December 25, 2024
  • Overview

    Application Scenario

    Dual-axis line charts are generally suitable for the following scenarios:

    The units of data in several series required for chart creation vary widely.

    You want the Y-axis to have two dimensions on the left and right, for example, one by number and one by percentage.

    The following figure shows the effect.

    自定义折线图1.png 

     

    Chart Feature

    Advantage: Dual-axis line charts can better present line data with different data types or units.

    Disadvantage: Dual-axis line charts are not suitable for presenting too many polylines. 

    Example

    Data Preparation

    Choose File > New General Reportand create a built-in dataset named Sales and Gross Profit Margin, which records the relationship between months, sales, and gross margins, as shown in the following figure. 

     自定义折线图2.png

    Chart Insertion

    Merge required cells and choose Line Chart > Custom, as shown in the following figure.

     自定义折线图3.png


    iconNote:
    Only Custom Line Chart allows you to set stacked axes, and the other two line charts do not have this setting item. You need to pay attention to which type of the line chart is selected here.

    Data Binding

    Bind data to the line chart. Here, use sales as series 1 and gross margins as series 2, as shown in the following figure. 

    自定义折线图4.png  

    Chart Style Setting

    1. Title Setting

    Select the chart and choose Cell Element > Style > Title.

    Set Text to Dual-Axis Line Chart.

    Select the first item (left) in Position, as shown in the following figure.

    自定义折线图5.png 

    2. Legend Setting

     Select the chart, choose Cell Element > Style > Legend, and set Position to Top, as shown in the following figure. 

     自定义折线图6.png

    3. Series Setting

    Select the chart and choose Cell Element > Style > Series.

    Select Custom Combination from the drop-down list of Color Scheme. In this case, series 1 is displayed in blue, and series 2 is displayed in green. 

    In Mark Point, select ● from the drop-down list of Type, and select 3px from the drop-down list of Radius, as shown in the following figure.

     自定义折线图7.png

    4. Axis Setting 

    Select the chart, choose Cell Element > Style > Axis, and set Y Axis and Y Axis2 to distinguish each axis better.

    Y Axis: You need to display the axis title and set the color of the axis title and the axis label to the same blue as series 1, and set the character size of the axis label to 10. You also need to set Axis Label Position to Left, as shown in the following figure. 

    自定义折线图8.png

    Y Axis 2: You need to set the color of the axis title and the axis label to the same green as series 2, and set Axis Label Position to Right. You also need to set the character size of the axis label to 10, as shown in the following figure. 

     自定义折线图9.png

    5. Background Setting

    Select the chart, choose Cell Element > Style > Background > Drawing Area > Gridline, and select the solid line from the drop-down list of Horizontal, as shown in the following figure.

    自定义折线图10.png 

    Effect Display

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

    The report can be previewed on the DataAnalyst app and HTML5 terminal.

     自定义折线图1.png

    Template Download

    For details, you can download the template Dual-Axis Line Chart.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