Changing the Viewer Theme
Our sample projects and report templates can help you learn the basics of working with our products.The dashboard viewer supports many themes, selected through options. This example applies a theme and switches it at run time.
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.
var options = new Stimulsoft.Viewer.StiViewerOptions();
options.appearance.theme = Stimulsoft.Viewer.StiViewerTheme.Office2022WhiteBlue;
var viewer = new Stimulsoft.Viewer.StiViewer(options, undefined, false);
function setTheme(theme) {
viewer.setTheme(theme);
}The initial theme comes from StiViewerTheme, and viewer.setTheme(...) changes it on the fly so users can pick a look that matches your application.