A dashboard's data can be supplied from code: load the dashboard, clear its connections, and register your own dataset with regData.

Preparing the data. Read or create the data source, register it in the dashboard dictionary, synchronize the schema, and render with the supplied records.
import { Viewer, Stimulsoft } from 'stimulsoft-dashboards-js-react/viewer';

function App() {
    var report = new Stimulsoft.Report.StiReport();
    report.loadFile('Dashboards/Orders.mrt');
    report.dictionary.databases.clear();
    var dataSet = new Stimulsoft.System.Data.DataSet();
    dataSet.readJsonFile('Data/Orders.json');
    report.regData('Orders', 'Orders', dataSet);
    return <Viewer report={report} />;
}

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.