Governed Dashboards
  • About Dashboard Designer
    • What is Dashboard Designer?
    • Why is it used?
  • Getting Started
    • Accessing the Designer Module
    • Overview of Designer Module
      • Homepage
        • Guided Tour
        • Left Menu Panel
          • New
          • Manage
          • Open Dashboard
          • Preferences
          • Save As
          • Help
          • Exit
      • Dashboard Canvas Page
        • Right side Panel
          • Connection Page
          • Chart Container
          • Manage Window
          • Script Window
          • Guided Tour
        • Canvas Properties
          • Global Properties
          • Dashboard Themes
        • Context Menu Properties
  • Create New Workspace
    • Workspace Creation: Complete Flow
    • Creating a Workspace
    • Renaming a Workspace
    • Deleting a Workspace
  • Create New Dashboard
    • Dashboard Creation: Basic Workflow
    • Adding a New Dashboard
    • Create Connection
    • Drag and Drop Charts
    • Associate the Dataset
    • Preview the Dashboard
    • Save the Dashboard
    • User Alert Notification
  • Managing Options for a Dashboard
    • Open Dashboard in Designer
    • Publish a Dashboard
    • Share a Dashboard
    • Dashboard Version Control
    • Action Menu
      • Preview Dashboard
      • Export to Local Disk
      • Rename
      • Delete
      • Moving a Dashboard
      • Information Icon
      • Dashboard as Template
  • Connecting to a Data Source
    • Accessing the Data Connectors
    • Establishing a Data Connection
      • CSV Connection
      • Excel Connection
      • Data Service Connection
      • Data Store Connection
      • Data Sheet Connection
        • Data Sheet Enhancements
      • WebSocket Connection
      • Merged Connection
  • Charts Gallery
    • Charts
      • Area chart
      • Bar Chart
      • Bubble Chart
      • Circumplex Chart
      • Column Chart
      • Funnel Chart
      • Histogram Chart
      • Inverted Funnel
      • KPI Tile
      • Line Chart
      • Map Chart
      • Mito Plot
      • Mixed Chart
      • Pie Chart
      • Project Timeline
      • Pyramid Chart
      • Scatter Plot
      • Spark Line
      • Spider Chart
      • Waterfall Chart
    • Grids
      • Data Grid
      • Paging Grid
      • Data Sheet
      • Scorecard
      • Pivot Grid
    • Filters
      • Checkbox
      • Combobox
      • Hierarchical Combobox
      • List
      • Radio Button
    • Advanced Charts
      • Box Plot
      • Candle Stick
      • Chevron
      • Data Search
      • Decision Tree
      • Group Bar
      • Group Column
      • Heat Map
      • Sankey
      • Text Analyzer
      • Time Series
      • Decomposition
      • Knowledge Graph
      • Tree Map
      • Trellis
      • Word Cloud
      • New Word Cloud
    • Other Charts
      • Box
      • Bullet
      • Date Picker
      • Export
      • Filter Chips
      • Filter Saver
      • Gauge
      • Graphics
      • Guided Tour
      • H-Slider
      • Image
      • Info Button
      • Input Box
      • Label
      • Legend
      • Progress Pie
      • Semi Gauge
      • Stepper
      • SVG Image
      • Text Box
      • Trend
      • URL Button
      • V-Slider
      • Tab Component
      • Inputbox component
      • Button component
    • Custom Charts
    • Common Chart Properties
      • Background
      • Title & Sub-title
      • X & Y Axis Properties
      • Legend Properties
      • Formatter
      • Axis Setup
      • Export Options
      • Copy Paste Chart Properties
  • Dashboard Objects
    • Manage Dashboard Components
    • Dashboard Objects Properties
  • Configurations
    • Filtering the Data
    • Drill Through
      • Drill Highlighter
    • Dataset Properties
    • Indicators in Charts
    • Tooltip(Default & Custom)
    • Data Label
    • Geo Mapping
    • Language Mapping
    • Legend Mapping
    • Alerts in Grids
  • Script Help Section
    • Navigate to Script Help page
    • How to use Scripts?
Powered by GitBook
On this page
  1. Script Help Section

How to use Scripts?

BDB offers script support at the component level to display the intended UI actions and at the data connection level to apply data-related back-end changes.

PreviousNavigate to Script Help page

Last updated 1 year ago

The scripting mechanism makes the creation of complex dashboards easy and quick. The users require basic scripting knowledge to create dashboards using the BDB Designer module.

This section aims to provide a basic understanding of writing scripts and functionality.

Dynamic Visibility

The scenario is to have a checkbox that, when enabled displays a Column chart, and when disabled, shows an Area chart.

  • Navigate to the Designer canvas page for a dashboard.

  • Click the Component Library icon.

  • Drag and drop the Checkbox, Bar Chart, and Line Chart components into the canvas.

  • Click on the Properties icon next to the Checkbox component.

  • Set Checked Value to ‘1’ and Unchecked Value to ‘0’ (as shown below) using the General properties tab of the Checkbox component.

  • Click on the Script on Load icon provided next to the Checkbox component.

  • The script window for the Checkbox component opens.

  • Write the relevant script for the action mentioned above, as explained in the following steps:

    • Write the if statement for the script following the order of “changedItem.attributes.Value”

    • Pass ‘Value==1’ (In other words, it suggests that the checkbox is enabled)

    • Either click the Help icon or use the Ctrl+Space keys to get assistance in writing the script.

Please Note: The user can select the Hide Component and Show Component functions from the Scripting Help window.

  • You can modify the readily available script with the below given steps:

    • Select the ‘Show and Hide’ function as per the requirement from the Designer Scripting Help window.

    • If the ‘Value == 1’ (in other words, if the Checkbox is enabled) the Bar chart should be displayed.

      • For this to occur, Place the Hide Component and Show Component functions under the if function.

      • Pass Bar chart value to the Hide Component function.

      • Pass the Line chart value to the Show Component function to make sure that the Column chart will be hidden when the Area chart is displayed.

  • If the Value == 0 (in other words, if the checkbox is disabled), we need to do the reverse of the function that we used earlier. So that when users uncheck Check Box, the Line chart gets displayed and the Bar chart remains hidden.

  • To accomplish this, the users need to write the highlighted portion of the script:

  • After entering the above script successfully, click the Preview icon to view the results.

  • In the below screen capture, since the Checkbox is checked, the Column chart is displayed.

  • By unchecking the Checkbox displays the Area chart gets displayed.

​​

Create data connections for the Column chart and Area chart. Refer to the Excel Connection page of the section for the details.

​

​

Establishing a Data Connection