FVS Date Time Widget

  • Last update:April 29, 2025
  • Overview

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

    Version

    Report Server VersionPlugin VersionFunctional Change
    11.0.6V1.xFor details, see FVS Title Component (Earlier Version).
    11.0.16V2.0.1Added Content Style for widget setting. For details, see section "Content Style."
    11.0.22V2.2.1 Added Shortcut Button in Content Style to achieve the effects of the previous day/month/year and next day/month/year. Allowed you to set the style template on mobile terminals. For details, see section "Content Style."
    11.0.22   V2.8.0Separated parameters from widget names, and added a new logic for parameter binding. For details, see section "Content."
    11.0.22   V3.3.0 Added two date formats, Year-Quarter and Year. For details, see section "Content."

    Function Description

    When previewing the template, you can select the date in the date time widget which can be linked to other components by parameters. The following figure shows the effect.

     111.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

    Content

    The following figure shows the settings on the Content tab page of a date time widget.

     1.png

     

    The following table describes these settings.


    Setting ItemIntroduction
    Format 

    Six types are available for the date time format, and each type can be displayed in multiple styles which can be entered manually.

    iconNote: 
    Year-Quarter and Year formats are newly added in V3.3.0.

    2.png

    Bound Parameter 

    The value is the 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.

    Default Value 

    You can set the default value of the date time, and the following three options are available.

    1. Custom Date Time: The value is the date time of the day, displayed in the above date format.

    You can delete the value, and select a new one, or you can enter the needed value manually.

    3.png

    2. Field: You can select a field in a dataset. Only the first value in the array sequence will be displayed if the returned value is an array.

    4.png

    3. Formula: You can click the xxx icon on the right, and enter the formula. Only the first value in the array sequence will be displayed if the returned value is an array.

    5.png

    Returned ValueDate and String are available for the returned value format which should match the type of the date field in the database table.
    Watermark Light gray watermark text is displayed in the widget during the preview, serving as a prompt for the required information to be entered. It disappears after you click the widget and enter the text. The input box of Watermark is empty by default.
    Date Range

    You can set the values of Start Date and End Date. The start date must be earlier than the end date.

     After the date range is set, data outside the range is grayed out and cannot be selected.

     The following three settings are available for Start Date and End Date in Data Range:

     1. Unlimited: No limitation is on the date range.

     2: Custom: You can select Custom to display the date time of the day in the above date format by default. You can delete the value, and select a new one.

     3. Formula: You can click the xxx icon on the right, and enter the formula. Only the first value in the array sequence will be displayed if the returned value is an array.

    PermissionIt is used to set whether the widget is editable during the initial page preview. Allow Edit is selected by default.
    ValidationNull Value Validation: It is used to set whether the value in the widget is allowed to be null. If you select Allow Null, the widget allows a null value. 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. The content style varies by the date time format.

    iconNote:
     In V2.2.1 and earlier versions, you can only set the font style for the widget text.

    Format Description

    Y-M-D

    Y-M

    You can set ShortCut Button, and set the font styles for the widget value and the shortcut button respectively.

    6.png

    You can set Widget Text and Widget Icon in the template theme style setting. The following figure shows the effect.

    7.png

    Y-M-D-Hr-Min-Sec

    Hr-Min-Sec

    You can only set the font style, such as the font, font size, and font color, for Widget Text.

    8.png

    iconNote: 

    1. The font in the drop-down options is not affected by the style setting. The font style of the drop-down options is only affected by the FVS template style.

    2. If you modify the font color, and then set the FVS template style, the font color will change with the theme. You need to reset the color as needed.

    2. When you select Y-M-D as the Format value, you can set the style template on mobile terminals. The settings for the other three formats are the same on the mobile terminal and PC.

    Style TemplateDescription
    Default Style

    You can set the shortcut button, and set the font styles for the widget value and shortcut button respectively, which is the same as the PC setting.

    333.png

    Normal Calendar 

    You can set the shortcut button, font style, and calendar effect.

    555.png

    Week View Calendar 

    You can set the font style and calendar effect without the shortcut button setting.

    666.png

    iconNote:
     You are advised to select Normal Calendar and Week View Calendar after Mobile Layout is enabled. When Mobile Layout is not enabled, the visible range of the calendar expansion is determined by the component size.

    Widget Interaction Event

    You can choose Interaction > Add Event, and add a JavaScript event to achieve more effects. After Initialization and Edit End events can be added in the date time widget, as shown in the following figure.

     777.png

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

    iconNote: 
    For details, see JS Events Supported by FVS Dashboard.

     888.png

     

    Example

    Template Preparation

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

     9.png

     2. Create a database query ds1, and enter the following SQL statement 

    SELECT * FROM Orders where 1=1

    ${if(len(starttime)=0,""," and Order Date>='"+starttime+"'")}

    ${if(len(endtime)=0,""," and Order Date<='"+endtime+"'")}

    This statement retrieves the data whose order dates are between the start time and end time from the data table Orders, as shown in the following figure.

     10.png

    Title Component Adding

    Choose Text > Title in the component area to add a title component to the page. Set Title Content to Start Time on the right configuration panel. Copy the title component and paste it into the page. Set the title content to End Time for the new title component, as shown in the following figure.

     11.png

    Data Time Widget Adding

    Choose Widget > Date Time in the component area to add a data time widget to the page.

    Set Bound Parameter to starttime to match the dataset parameter starttime on the right configuration panel. Select 2011-05-22 as the date time with Custom Date Time selected as Default Value.

    Copy the date time widget, and paste it into the page. Set Bound Parameter to endtime to match the dataset parameter endtime for the new widget. Select 2011-06-22 as the date time with Custom Date Time selected as Default Value.

    The following figure shows the steps.

     12.png

    Line Chart Component Adding

    1. Choose Chart > Line Chart in the component area to add a Line Chart component to the page, and bind the data to the chart, as shown in the following figure.

     13.png

    2. Select the line chart, choose Content > Style > Axis, and set the axis type to Time Axis for X Axis

     14.png

    Effect Display

    PC

    Click Save in the upper right corner, and click Preview. After you modify the start time or end time, the line chart will display the data within the corresponding time range. The effect is the same as that shown in section "Function Description."

    Mobile Terminal

    For details about the preview method, see FVS Template Preview and Mounting. The following figure shows the effect.

     999.gif

    Template Download

    For details, you can download the template Date Time Widget.fvs

    Attachment List


    Theme: FineVis Data Visualization
    • 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