JS Hide chart carousel dots

  • Last update:  2020-12-17
  • I. Overview

    1.1 Problem

    In some actual projects, when the chart carousel function is used, the carousel switching dots will be displayed by default just below the carousel chart. Sometimes in order not to affect the beauty of the report display, we need to hide these switching dots.

    2020-11-03_19-58-30.png


    1.2 Solution

    Add a JavaScript loading end event in the pagination preview setting, and use a delay function to hide the chart carousel switch dot.

    II. Example

    2.1 Data preparation

    Create a new built-in data set as shown in the figure below.

    2020-11-03_20-00-21.png


    2.2 Report design

    1) Merge cells A1~I20 and insert two charts: column chart and pie chart. Set the carousel time interval of these two charts to 5 seconds.

    2020-11-03_20-02-18.png

    2) Set the data of the column chart.

    image.png

    3) Set the data of the pie chart.

    image (1).png


    2.3 Add JS event

    1) In the designer menu bar, select Template>Template Web Attributes>Pagination Preview Settings , and add a loading end event.

    2020-11-04_9-24-14.png

    2) Add the following JS:

    setTimeout(function() {
    $(".vanchart-menu").css("display", "none");
    }, 100);

    Note:

    • 100 means automatically hide the carousel switching dot after 100 milliseconds. (The value can be set according to actual needs)

    • When hovering over the chart, the chart will not rotate automatically.

    image (2).png


    2.4 Preview effect

    Save the report, and the pagination preview effect is as shown in the figure below:

    pic3.gif

    Note:

    • Mobile terminal is not supported.

    • If the above JS is written in the loading end event of "Data Entry Preview Settings" or "Data Analysis Preview Settings", please preview the report in the corresponding way to display the effect correctly.

    III. Download template

    Attachment List


    Theme: Secondary Development
    • 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