Dynamic Data Binding for TimeSeries Data Visualization Component UI Builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2023 10:09 AM - edited 04-21-2023 02:30 AM
I've created a data resource of type Transform in UI Builder to return the trend of closed incidents as JSON and im trying to bind this data resource to a Column Time Series Data Visualization Component.
However i'm not able to get it working as im not sure of the format of JSON that is to be used in the data, metric/TrendBy.
Is this even feasible thing to do and if so Can anyone share a working example?
Tagging @Nootan Bhat since he had responded on similar question. Would appreciate any pointers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 09:35 PM
@Nootan Bhat will try this out and confirm if that helps/works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2023 08:25 AM
@Nootan Bhat Appreciate your previous responses and could not try this out until now.
But im still not able to make it work.
Data:
Transform datasource. Cant use a table/view since i need to do percentage calculation.
Returning in the format as suggested by you using(with toggle define data manually) helps in populating the data visualisation correctly but there is no option to select groupBy.
I tried setting the data through script as per your snippet to point the id to sysid of the transform datasource, but im not sure what to pass for sourceType. Tried passing empty string, but in any case im seeing its not recognising the data bind ans saying "To start configuring your chart..you need to connect to a datasource". At this point i'm lost.
Tried going through this doc link, but as per this datasources are either tableview/metricbase/indicator neither of which is mine(transform datasource).
Attaching screenshot of the script that sets the datasource. Would appreciate any further pointers. Thanks for your time
Attached data.txt file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 06:12 AM
@Nootan Bhat thanks for these hints.
I'm trying to use the scripts in Data resources as you showed. I'm getting an empty timeseries chart (no error). I have tested the exact same data and metric script with a Single Number data visualization, and here I get a value, so the data and the metric scripts look to be correct. Maybe the error is in the Trend script. Or maybe some setting in the configuration of the component is incorrect. Can you provide an example of the scripts you used (maybe one that can be run in a PDI)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2024 02:43 AM
Hi @Bernard Esterhu Where you able to figure out what the issue was, I am also facing the same issue. Can you please let me know what is the solution for this issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 10:27 AM
@Nootan BhatHi, I am working on the same use case. Can you please help me on how to pass the client parameter to the query filter below is the example. I need to pass the sys_id in the "filterQuery" which I am getting on the UI Builder form.
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=="+api.context.props.sysId;, //you can bind the state values here
"id": "DVID" //proper ID name
}
];
return data;