FVS Button Group Widget

  • Last update:February 27, 2025
  • Overview

    This document is applicable to users who have installed the FineVis Data Visualization plugin to learn plugin functions.

    Version

    Report Server Version
    Plugin VersionFunctional Change

    11.0.6

    V1.x

    /

    11.0.16

    V2.0.0

    Displayed the Select All button by default during the preview in historical versions. Added a configuration item, which allowed you to determine whether to display the Select All button or not.

    11.0.16

    V2.0.1

    Added Content Style for widget setting. For details, see section "Content Style."

    11.0.22

    V2.8.0

    Separated parameters from widget names, and added a new logic for parameter binding. For details, see section "Content."

    11.0.22

    V2.10.0

    Combined the radio button group widget and the checkbox group widget into the button group widget, which is moved to Widget > List.

    Function Introduction

    The button group widget supports component linkage through parameters by selecting different options during the template preview. The following figure shows the effect.

    GIF1.gif

    For details about the component animation, see FVS Cross-page Component Animation.

    For details about the component style, see FVS Component Style and Attribute.

    Function Description

    Widget Content

    The following figure shows the setting items on the Content tab page of a button group widget.

    1.png

    Content

    The following table describes these setting items.

    Setting Item
    Description

    Bound Parameter

    The value is a parameter name, which is used to bind a parameter to the widget. The value is empty by default, and you need to set this parameter based on the actual parameter to be bound.

    Binding an existing parameter is supported. You can also enter a new value to create a parameter.

    Option Source

    Option Source allows you to bind the options to the widget. It is mandatory, otherwise, the widget will not display any options. For details, see Data Dictionary.

    If you select Remove Duplicates, the duplicate options in the drop-down list will be merged. Otherwise, the duplicate options will be retained. Remove Duplicates is selected by default.

    Option

    If Multiselect is selected, the buttons will be displayed as checkboxes for multiple selections. Otherwise, the buttons will be displayed as radio buttons for a single selection. Multiselect is deselected by default.

    Support Select All is available only after Multiselect is selected, and it is selected by default. After Support Select All is selected, you can select all options by clicking the Select All button.

    Returned Value

    Array: The returned value is an array. For example, if you select three values, the returned value will be [value 1,value 2,value 3].

    String: The returned value is a string, and you need to define Separator, Starter, and Terminator. That is to say, multiple selected values are concatenated into a single string through the separator.

    For example, if the separator is defined as a comma (,) and the starter and terminator symbols are both defined as single quotation marks ('), the returned value will be 'value1,value2,value3'.

    返回值1.png

    Default Value

    You can set the default selected options in the button group widget in the following three ways.

    1. Custom String: You can enter the text directly. If you enter multiple values, multiple options will be selected by default. When you enter multiple values, the format needs to be the same as that of the returned value of the widget. If the format of the returned value is not modified, use commas (,) to separate each value. Example: East China,North China.

    默认值1.png

    2. Field: You can select the field in the dataset. If multiple values exist in the selected field, multiple options will be selected by default.

    默认值2.png

    3. Formula: You can click fx on the right to enter the formula. If the formula corresponds to multiple values, multiple options will be selected by default.

    默认值3.png

    Permission

    It is used to set whether the widget is editable during the initial page preview. Allow Edit is selected by default.

    Validation

    Null Value Validation is used to set whether the value of the widget is allowed to be null. If you select Allow Null, you can deselect all options. If you do not select Allow Null, you can set Validation Prompt, which is displayed during the template preview. Allow Null is selected by default.

    Content Style

    1. Radio button

    Four style templates are available for radio buttons: Default, Capsule Button, Inline Button, and Graphic Button. The setting items of Content Style vary with the selected style template.

    Style TemplateOther Setting Items

    Default

    You can set Layout Mode and Font Style for the options.

    Three layout modes are available:

    • Auto Fill: The number of rows and columns can be automatically adjusted according to the content of the options.

    • Fixed Column Quantity: The content of the options can be  displayed in X columns, with 1 as the default value.

    • Fixed Row Quantity: The content of the options can be displayed in X rows, with 1 as the default value.

    默认样式-左.png默认样式-右.png

    Capsule   Button

    You can set Layout Mode, Font Style, Button Style, and Rounded Corner.

    Three layout modes are available: Auto Fill, Fixed Column Quantity, and Fixed Row Quantity.

    胶囊按钮-左.png胶囊按钮-右.png

    Inline Button

    You can set Layout Mode, Font Style, Button Style, and Rounded Corner.

    Two layout modes are available: Natural and Equal. Filling by column/row is not supported.

    联排按钮-左.png联排按钮-右.png

    Graphic   Button

    You can set Layout Mode, Font Style, and Button Style.

    Three layout modes are available: Auto Fill, Fixed Column Quantity, and Fixed Row Quantity.

    The display logic of Button Icon in Button Style should be noted:

    • The button icons have a 1:1 relationship with the options and are arranged in order from left to right and top to bottom.

    • You can click a button icon and select the icon resource, which supports NoneResource Center, Custom Upload, and Online Image.

    • Multiple icons can be added. You can hover the cursor over the icon and click the deletion button in the upper right corner to delete the icon. Deletion is not supported in  FineReport with the plugin of versions earlier than V2.5.1.

    • If the number of icons is more than that of options, the excessive icons will not be displayed. If the number of   icons is less than that of options, or if the icon resource is None, blank icons will be displayed.

    图文按钮-左.png图文按钮-右.png图文按钮动图.gif

    2. Checkbox

    Two style templates are available for checkboxes: Default, and Capsule Button.

    Style TemplateOther Setting Items

    Default

    You can set Layout Mode and Font Style for the options.

    Three layout modes   are available:

    • Auto Fill: The number of rows and columns can be automatically adjusted according to the content of the options.

    • Fixed Column Quantity: The content of the options can be displayed in X columns, with 1 as the default value.

    • Fixed Row Quantity: The content of the options can be displayed in X rows, with 1 as  the default value.

    复选按钮-默认样式-左.png复选按钮-默认样式-右.png

    Capsule Button

    You can set Layout Mode, Font Style, Button Style, and Rounded Corner.

    Three layout modes are available: Auto Fill, Fixed Column Quantity, and Fixed Row Quantity.

    复选按钮-胶囊按钮-左.png复选按钮-胶囊按钮-右.png

    Widget Interaction Event

    Choose Interaction > Add Event to add a JavaScript event to achieve more effects. The button group widget supports two types of interaction events: After Initialization and Edit End, as shown in the following figure.

    控件交互事件1.png

    The corresponding JavaScript event setting box will pop up after you click one of the events, as shown in the following figure.

    控件交互事件2.png

    Note: For details about the JavaScript events supported by the FVS dashboard, see JS Events Supported by FVS Dashboard.

    Example

    Template Preparation

    1. Choose File > New FineVis Visualization Dashboard in the upper left corner of the designer.

    3-1.png

    2. Create a database query named ds1, input the SQL query statement SELECT * FROM Sales_Volume where Salesperson in ('${spe}'), and set the default value of the parameter spe to Mike, which means extracting sales data of the salesperson Mike by default, as shown in the following figure.

    3-2.png

    Adding a Button Group Widget

    1. Choose Widget > List > Button Group in the component area, and drag the widget into the canvas.

    On the right Content configuration panel, set Bound Parameter to spe to match the widget with the parameter spe defined in the dataset, as shown in the following figure.

    3-3.png

    2. Click the  button to open the Option Source setting box, and bind the option source to the widget. Select Database Table from the drop-down list of Type Setting, select FRDemo from the drop-down list of Database, select Sales_Volume from the drop-down list of Database Table, and set Column Name of Actual Value and Display Value to Salesperson, as shown in the following figure.

    Set the default value to Mike, as shown in the following figure.

    6666.png

    3. If you want to set the buttons as checkboxes, you need to select Multiselect.

    To match the SQL IN statement, you need to set Returned Value of the widget to String and enter the ',' in Separator.

    After setting the separator, set Default Value. The values must maintain the same format. For example, the multiple default values to be set in this example need to be separated by the separator ',', and you need to enter Mike','John, as shown in the following figure.

    Set Layout Mode as needed.

    7777777.png

    Adding a Line Chart

    Click Line on the Chart tab page to add a line chart component to the canvas. Bind data with the spe parameter in the dataset to the line chart, as shown in the following figure.

    3-4.png

    Effect Display

    PC

    Click Save in the upper right corner of the template, and click Preview.

    When the button group is set to the radio button group, the line chart displays the sales volume of the corresponding salesperson, as shown in the following figure. 

    单选按钮PC预览.gif

    When the button group is set to the checkbox group, the line chart displays the sales volume of the corresponding salespersons. 

    复选按钮PC预览.gif


    Mobile Terminal

    For details about the template preview method, see Preview on Mobile Terminal.

    The following figure shows the effects of the radio button group widget.

    单选按钮移动预览.gif

    The following figure shows the effects of the checkbox group widget.

    复选按钮移动预览.gif

    Template Download

    For details, you can download the template: FVS Button Group Widget Example.fvs.

    Attachment List


    Theme: FineVis Data Visualization
    Already the First
    Already the Last
    • 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