12-23-2022, 11:06 AM
(This post was last modified: 12-23-2022, 11:16 AM by harshabalan.)
Can we provide data to the chart components from the designer without using a dataset service ?
Ans: Yes . we can provide the data to charts as a json structure ;
In the below example we are getting dynamic informations from the dashboard which we are formulatiing into a json structure and providing the same to a datagrid.
var f1 = sdk.getValue( 'label744'); //// value : "Document: Revenue"
var f2 = sdk.getValue( 'label748'); /// value : "Applied filter : Last 7 Day"
var f3 = sdk.getValue( 'label756'); /// value : "Section : Quarterly report"
var info = [f1,f2,f3];
var info_val =[];
for (var i = 0; i <= info.length; i++)
{
info_val.push({"info":info[i]}); //////
}
var ch = sdk.getWidget('datagrid770' );
ch.setDataProvider(info_val);
ch.draw();
(12-23-2022, 11:06 AM)harshabalan Wrote: Can we provide data to the chart components from the designer without using a dataset service ?
Ans: Yes . we can provide the data to charts as a json structure ;
In the below example we are getting dynamic informations from the dashboard which we are formulatiing into a json structure and providing the same to a datagrid.
var f1 = sdk.getValue( 'label744'); //// value : "Document: Revenue"
var f2 = sdk.getValue( 'label748'); /// value : "Applied filter : Last 7 Day"
var f3 = sdk.getValue( 'label756'); /// value : "Section : Quarterly report"
var info = [f1,f2,f3];
var info_val =[];
for (var i = 0; i <= info.length; i++)
{
info_val.push({"info":info[i]}); //////
}
var ch = sdk.getWidget('datagrid770' );
ch.setDataProvider(info_val);
ch.draw();