Data Source configuration of Data Visualization component in UI Builder

MRaiman83
Tera Contributor

Need help with configuring Data Visualization component in UI Builder.

 

Looking for example JSON object to put as a data source with "Define data manually" for the Bar chart with grouping by 2 fields.

As a result I need to get something like this:

MRaiman83_0-1695994918701.png

That chart was produced from Incident table with grouping by Active and Priority fields. I tried to change demo JSON object that appears by default to apply grouping by 2 fields but without success.

4 REPLIES 4

Brad Tilton
ServiceNow Employee
ServiceNow Employee

I don't have any examples, but are you just able to configure this at the data source rather than passing in JSON?

At the end I will prepare this JSON in a transform data source and pass it to component, I just need this simple example to be able to use grouping by multiple fields.

Hi Brad, I am also experiencing this issue. I need to create a vertical bar chart data visualization using data from a transform data broker that uses a glide query to return data in JSON format that I then want to visualize. I am not able to use a data source since we are looking for the count of unique users from each region that have used the virtual agent and the data source tab provides no way of doing this as I have to access two different tables (interaction and sys_user) to get the counts and I have to write code to get unique users which the data source also does not provide functionality for. The schema that needs to be passed to the data visualization when using the "enter data manually" and "data binding" would be appreciated!

brunorusso
Tera Contributor

Hi! 

 

I'm currently facing the same issue, does anyone find out the JSON format that should be passed when trying to group the vertical bar chart by 2 different fields?

 

Thanks!