Chart Data Auto Refresh

  • Last update:June 30, 2023
  • Overview

    Version

    Report Server Version

    11.0

    Application Scenarios

    Chart Monitor Refresh can help you monitor the changes of background data in real time, dynamically refresh the chart data, and monitor the parameter refresh in chart components, which means when you set formula parameters for some components, the chart will refresh data when the parameters are updated.

    As shown in the example below, data can be refreshed in real time.

    111.gif

    Note: When the chart data comes from cell data, monitoring refresh for chart is not supported.

    Functions

    Achieve through Monitor Refresh under Special Effect > Interaction of Component Settings.

    Examples

    Installing the Plugin

    To refresh the report block, you need to install com.fr.plugin.reportRefresh.v11-1.5.7.zip first.

    Click to download the plugin: com.fr.plugin.reportRefresh.v11-1.5.7.zip.

    For details about installing designer plugins, see Designer Plugin Management.

    For details about installing server plugins, see Server Plugin Management.

    Designing a Template

    Create a dashboard, drag Gauge chart0 and Report Block report0 into the report and select Multi-Pointer Gauge (360) for the gauge. With the plugin mentioned above, the report block can be refreshed with the gauge.

    Preparing Data

    Create a database query named ds1 and enter the following SQL query statements:

    SELECT ORDERID,CITY,sum(AMOUNT) Amount
    FROM ORDERS JOIN CUSTOMER ON ORDERS.CustomerID=CUSTOMER.CustomerID
    where ORDERID=10001+'${mod((datetonumber(now())-datetonumber(a))/2000,1000)}'
    /*
    a=now() is the template parameter.
    mod((datetonumber(now())-datetonumber(a))/2000,1000) simulates the incremental OrderID, by using the remainder of data extraction time and display time.
    */
    group by CITY
    order by Amount

    SQL Description:

    · ORDERID in SQL statements changes dynamically with time to simulate changes in background data.

    · Formula mod((datetonumber(now())-datetonumber(a))/2000,1000) is explained in the following table:

    Formula

    Description

    datetonumber(now())

    The number of milliseconds elapsed from 00:00:00 GMT Jan 1, 197to the current time. The variable now() will also change in real time during template preview.

    datetonumber(a)

    In this formula, a is a template parameter, and the default value of a is now(), but now() represents the moment when you preview the template and a will not change during preview anymore.

    Note: For details about adding parameters, see section "Creating Template Parameters".

    /2000

    Set Time Interval to 2 seconds, which equals to be divided by 2000 milliseconds and the report block will be refreshed once every 2 seconds, and the time difference also changes accordingly.

    mod(number,divisor)

    Return the remainder of dividing number and divisor. The sign of the result is the same as that of the divisor. Number is the dividend, and divisor is the divisor.

     Binding Chart Data

    Select the gauge, click Data and bind chart data.

    Creating Template Parameters

    Click Template > Template Parameters in the designer menu bar, create a template parameter a, and formula now() is selected by default.

    Setting the Report Block

    1. Designing a Table in Report Block

    Drag the corresponding fields of ds1 into report0. Drag City into B1, and Amount into D1.

    2. Configuring Refresh for the Report Block

    Select report0 and set the Time Interval to 2 seconds.

    Setting the Gauge

    1. Setting Gauge Style

    Select the gauge, choose Style > Title in the attribute pane, and set Content and Color of the title as shown below:

    The title text formula is ds1.select("City", ORDERID = 10001 + mod((datetonumber(now()) - datetonumber(a)) / 2000, 1000)), which dynamically displays the City.

    2. Setting Auto Refresh

    Select the gauge, choose Special Effect > Monitor Refresh in the attribute pane, and set Auto Tooltip.

    · Background Detection: On

    · Time Interval: 2 seconds (synchronized with the change time in the previous SQL statements)

    · Auto Tooltip: not ticked

    Demonstration

    PC Terminal

    Click Save and PC Preview.

    111.gif

    Mobile Terminal

    Both App and HTML5 terminals are supported.

    Note: V 11.0.66 or later versions are required for mobile devices.

    Downloading the Template

    Click to download the template: Refresh.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