Switching Multiple Tab Components Synchronously

  • Last update:February 28, 2024
  • Overview 

    This document applies to users who have installed the FineVis Data Visualization plugin to learn relevant functions.

    Version 

    Report Server VersionPlugin Version
    11.0.9V1.9.1


    Expected Effect 

    Tab pages of different Tab components on the same page change synchronously when you switch between tab pages, as shown in the following figure.

    When you switch between tab pages of the left Tab component, the tab page of the right Tab component changes automatically.

    Screen Recording 2024-02-28 at 09.40.14.gif

    Implementation Method 

    Use getShowIndex() to get the title index of the current tab page of a Tab component after switching, to change the tab page of another Tab component.

    Example 

    Creating a Template

    Choose File > New FineVis Visualization Dashboard in the upper left corner of the designer, and create a blank dashboard. You can customize the name and size. 

    Designing a Tab Component 

    Click Container in the left component area and drag two Tab components into the canvas. Add two more tab pages to each Tab component, and drag any component into the tab page, as shown in the following figure.

    Select and rename each tab page for easy identification. You can customize the name as needed. 

    Tab page names cannot be repeated across different tab components on the same page. You can add a space after the name to make the tab page button look the same.


    Adding an Event 

    Select the left Tab component, click Interaction, uncheck Enable Auto Carousel, click Add Tab Switching Event and JavaScript, and enter the following JavaScript code.

    index=duchamp.getWidgetByName('Tab1_Page1').getShowIndex(); 
    //Get the index of the current tab page of Tab1_Page1.
    duchamp.getWidgetByName('Tab2_Page1').showCardByIndex(index); 
    //Set Tab2_Page 1 to display the index-th Tab page.

    The steps are shown in the following figure.

    Effect Display 

    On PC

    Click Save in the upper right corner of the template, then click Preview.  The effect is shown in the "Expected Effect" section.

    On Mobile Terminals

    For the preview method, see FVS Template Preview and Mounting. The dashboard is shown in the following figure.

    RPReplay_Final1709086317.gif

    Template Download 

    You can download the example template. Synchronous switching of multiple Tab components.fvs


    Attachment List


    Theme: FineVis Data Visualization
    • Helpful
    • Not helpful
    • Only read

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

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

    不再提示

    8s后關閉

    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