Datasets as Chart Data Sources

  • Last update:February 10, 2025
  • Overview

    Version

    Report Server Version

    Functional Change

    11.0

    Restructured the chart data retrieval logic in the 11.0 version.

    Application Scenario

    When the chart data is sourced directly from a dataset, select Dataset Data as Data Source, select the corresponding dataset, and bind the data to the chart.

    When binding data, you can select Field Value or Field Name as Series Name to define the chart. The difference is that they are based on different data table structures, as shown in the following figure.

    iconNote:
    Each field specifies a column in a database table, Field Name specifies the column name, Field Value specifies the records in the column, and Series Name specifies the chart legend in FineReport.

    The charts obtained from the above two tables using different methods are consistent, as shown in the following figure.

    image 17.png

    Example

    Data Preparation

    Create a general report with two built-in datasets added on the dataset management panel. The table structure and data are the same as that shown in the figure in section "Application Scenario."

    image 18.png

    Chart Insertion

    Merge required cells to form two areas and insert a column chart into each. Modify the titles of the two charts to Field Values as Series and Field Names as Series respectively under Style > Title, as shown in the following figure.

    image 19.png

    Data Binding

    Field Values as Series

    Select the Field Values as Series dataset and select Region as Category (namely regions on the X axis). Select Field Value as Series Name, and select Product as Series (namely values of Product, Peanut and Milk, as legends). Select Sales as Value, and select Sum as Summary for the value (namely, product sales on the Y axis), as shown in the following figure.

    iconNote:
    Category or Series can be set to None. When Category is set to None, the series name is displayed on the X axis. When Series is set to None, each value is displayed as the series name.

    image 20.png

    Field Names as Series

    Select the Field Names as Series dataset and select Region as Category (namely regions on the X axis). Select Field Name as Series, and select Peanut and Milk as Field Name (namely, field values Peanut and Milk on the Y axis). Field Name can only be set to the default series name, but Series can be manually modified. Select Sum as Summary, as shown in the following figure.

    image 21.png

    Effect Display

    PC

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

    image 22.png

    Mobile Terminal

    The template can be previewed on both the DataAnalyst app and the HTML5 terminal. The following figure shows the effect.

    微信图片_20250210171500.jpg

    Notes

    Chart Data Display Order

    When data is displayed in the chart, the order of categories is subject to the order of fields in the dataset.

    For example, in the dataset, as the field value Asia comes before Europe, Asia displayed as category one is followed by Europe   displayed as category two.

    image 23.png

    The order in which series are displayed is subject to whether Series Name is set to Field Value or Field Name.

    1. Field Values as Series

    When you set Series Name to Field Value, the display order of series is subject to the order of fields in the dataset, as shown in the following figure.

    image 27.png

    2. Field Names as Series

    When you set Series Name to Field Name, the display order of series is subject to the order of field names during data binding, as shown in the following figure.

    Template Download

    You can download the template Datasets as Chart Data Sources.cpt.


    Attachment List


    Theme: Chart
    • Helpful
    • Not helpful
    • Only read

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

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

    不再提示

    9s后關閉

    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