Line Graph reporting Data Visualization in UI Builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2024 03:51 AM
Hi,
I am using the Data Visualization component in the UI Builder where i do not want to use Group By or need to set Group By to --None--. I want the Data Visualization component in the UI Builder to show the data as per the below report.
Report:
What i see on the UI Builder Data Visualization component
I have not added any condition for the Group By
Data source:
var data = [{
"isDatabaseView": false,
"allowRealTime": true,
"sourceType": "table",
"label": {
"message": "LABEL OF YOUR DV" // Proper label
},
"tableOrViewName": "incident", // Table name
"filterQuery": "cmdb_ci.ref_cmdb_ci_business_app.u_product.name=" + api.data.product_gr_1.output.name + "^sys_created_onONThis year@javascript:gs.beginningOfThisYear()@javascript:gs.endOfThisYear()", //you can bind the state values here
"id": "DVID" //proper ID name
}];
return data;
Metric:
var metric = [{
"dataSource": "DVID", // from data source
"id": "METRICID", // proper id
"aggregateFunction": "COUNT",
"aggregateField": "",
"numberFormat": {
"customFormat": false
},
"axisId": "primary"
}];
return metric;
Trend by:
var trend = {
"trendByFrequency" : "month",
"trendByMinuteInterval" : null,
"trendByFields" : [ {
"field" : "sys_created_on", //trend on which field
"metric" : "METRICID" // From metric
} ]
};
return trend;
@Nootan BhatCan you please help on how to achieve this?
- Labels:
-
Performance Analytics
-
UI Builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 12:40 AM
Hi @Nootan Bhat , Can you please let me know if this can be achieved?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2024 03:40 AM
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2024 04:40 AM
Hi @Hari1 ,
Answered the question in https://www.servicenow.com/community/developer-forum/data-visualization-time-series-line-area-graph-...
Please mark this as solved if it helped you!
Thanks