How to Link and Render a Specific Widget with a Click on the Chart Widget's Bar
Creating an interactive dashboard often involves linking various widgets to display related information dynamically. This article provides a step-by-step guide on how to render specific widgets through linking for each bar in a chart widget.
Step-by-Step Instructions
Step 1: Obtain Widget IDs
Firstly, you need to identify the widget ID for each widget you want to link to the bar graph. This can be done by following steps:
- Access the dashboard in view mode.
- Locate and click on the three dots icon situated within the widget container.
- Select the option "Get Embed Code" and proceed to copy the Embed URL provided in the ensuing dialog.
- Within the URL, the widget ID value can be obtained.
Step 2: Create an Expression
Create an expression for the configured category field in the chart widget using the widget IDs obtained in Step 1. Here is an example expression:
Expression Condition: IF([Category_Datatable_Column]='CategoryName','Widget_Equivalent_Unique_ID')
For Example, IF([Channel]='Retail','b1770f48-b72a-44ea-8ca6-b08a33c8b05d', IF([Channel]='Corporate','9ebfb359-a8ae-4cd0-8e9d-4bb6a798b8b0', IF([Channel]='Distributor','09bd67fc-d7e7-48e3-9958-96474f5da217', IF([Channel]='Online','f9a3cd7f-c13a-4eee-a2a7-052a921315d2', IF([Channel]='Dealer','92ee88e6-166c-438a-87bc-fa992c5893fc', 'b1770f48-b72a-44ea-8ca6-b08a33c8b05d')))))
Step 3: Configure the Expression Field
Add the expression field to the hidden columns section within the chart widget. This will ensure that the expression is evaluated without displaying it on the chart.
Step 4: Enable Linking
Enable the linking feature within the chart widget. Include the dashboard link along with the widget ID parameter to establish the connection between the chart bar and the corresponding widget.
Linking URL: https://test-demo.boldbi.com/bi/dashboards/6c402b6c-352c-4c3b-a5a5-1987cfb7d283/SampleCategory/SampleLinkingDashboard?isembed=true&isWidgetMode=true&WidgetId={{:WidgetID_Channel}}
Step 5: Preview or Publish
After configuring the settings, preview or publish the dashboard to test the functionality.
Step 6: Test the Link
Click on the chart bar graph. You should be automatically redirected to the specific widget that corresponds to the clicked bar value.