Assigning a Dashboard to the Viewer
Our sample projects and report templates can help you learn the basics of working with our products.This example is outdated, you can check out the many other new examples in this category.Dashboards.JS provides ready-made framework components, so a dashboard is shown by placing the viewer element and giving it a dashboard object.
Viewer setup. Configure the viewer, load the dashboard, assign it to the component, and process the requests or events raised by the UI.
Viewer setup. Configure the viewer, load the dashboard, assign it to the component, and process the requests or events raised by the UI.
import { Viewer, Stimulsoft } from 'stimulsoft-dashboards-js-react/viewer';
function App() {
var report = Stimulsoft.Report.StiReport.createNewDashboard();
report.loadFile('Dashboards/Christmas.mrt');
return <Viewer report={report} />;
}