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 visual themes, set on the PHP options object.
Set the theme and appearance.
How it works. The options object drives the viewer's look, so a couple of assignments reskin the entire preview.
Set the theme and appearance.
$viewer = new StiViewer();
$viewer->options->appearance->theme = StiViewerTheme::Office2022BlackTeal;
$viewer->options->appearance->backgroundColor = 'black';
$viewer->options->appearance->fullScreenMode = true;
$viewer->options->toolbar->showFullScreenButton = false;options->appearance->theme— one of theStiViewerThemepresets that restyles the whole viewer UI.options->appearance->backgroundColor— the color behind the dashboard.
How it works. The options object drives the viewer's look, so a couple of assignments reskin the entire preview.