How to refresh data resources in UI builder when click legend in pie chart data visualization ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2023 11:17 PM
Hi,
I am working on creating dashboard in UI builder and having multiple data visualizations. I want to make more interactive that if user clicks legend in pie chart it will affect all other charts based on data changing.
Can anyone help me with if there any options to handle events of data visualization when it changes?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2023 11:38 PM
Hi,
This is how you can do this.
All data visualizations respond to parFilters state parameter on your page. This state parameter holds the filter queries for your reports.
Now, all you have to do is to add your filter query in this state parameter on click on your pie chart. The data visualization component emits an event on click. This event has the query parameter which you can use directly in your filter.
If you need more info on how you can add query in your filter, see this article.
Hope this helps. Happy coding.
ServiceNow Community Rising Star 2022/2023