Dynamic Carousel Bar Chart

  • Last update:  2022-01-14
  • I. Overview

    1. Problem description

    When the data source contains categories, series, and time dimensions, it is desirable to rotate the chart data in ascending order of time, as shown in the following figure:

    8.gif


    2. Implementation ideas

    Set the time parameter in the SQL query statement to filter the data, the value of the time parameter will change with time, and then refresh the chart regularly.

    II. Example

    1. Data Preparation

    Create a new dashoboard, create a data set ds1, and the database query statement is as follows:

    SELECT 

    Owner_city,

    strftime('%Y-%m',Order_date) YEARMONTH,

    sum(Shipping_fee) Shipping_fee

    FROM SIndent

    where strftime('%Y-%m',Order_date)='${left(monthdelta("2011-01-01",mod((datetonumber(now())-datetonumber(a))/1000,12)),7)}'

    group by Owner_city,strftime('%Y-%m',Order_date)

    order by Shipping_fee

    1.png

    2. Report Design

    1) Click on the menu barTemplates > Template Parameter, create a new default value=nowThe template parameter ofa.

    3.png

    2) The layout of the dashoboard body component is changed toAbsolute Layout, dragged into the main body of the dashoboard designBar Chart, bind data information as shown below.

    4.png

    3) Bar chartStylechooseTitle, checkShow Title, the title content fills in the formulaUNIQUEARRAY(ds1.select("YearMonth")), and set the suspension position x direction50%, y direction50%, the characters are16font.

    6.png

    4) Bar chartStylechooseLegend, uncheckedLegend Is Visible.

    6.png

    5) Bar ChartStylechooseLabel, checkUseLabel, the text is checkedValue, the location is set toOutside.

    7.png

    6) Add timed refresh, bar graphSpecial EffectschooseInteraction ,Turn OnBackground detection, the time interval is1 second.

    8.png


    3. Effect preview

    1) The effect on the PC terminal is as shown in the figure below:

    9.gif

    2) The effect of the mobile terminal is shown in the following figure:

    10.gif

    III. Template download

    The completed template can be found at:%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Dashboard\Dynamic_Carousel_Bar_Chart.frm

    Click to download the template: Dynamic_Carousel_Bar_Chart.frm


    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