Customizing the Viewer
Our sample projects and report templates can help you learn the basics of working with our products.Every part of the viewer — toolbar buttons, export formats, appearance — is toggled through the options object.
In Angular.
How it works. The options object has a flag for every UI element, so the viewer can be trimmed to exactly what your app needs.
In Angular.
import { Component } from "@angular/core";
import { Viewer, Stimulsoft } from "stimulsoft-dashboards-js-angular/viewer";
@Component({
imports: [Viewer],
template: `<sti-viewer [report]="report" [options]="options"></sti-viewer>`
})
export class Example {
report: Stimulsoft.Report.StiReport;
options: Stimulsoft.Viewer.StiViewerOptions;
constructor() {
this.report = new Stimulsoft.Report.StiReport();
this.report.loadFile("Dashboards/Dashboard.mrt");
this.options = new Stimulsoft.Viewer.StiViewerOptions();
this.options.appearance.theme = Stimulsoft.Viewer.StiViewerTheme.Office2022LightGrayTeal;
this.options.appearance.fullScreenMode = true;
this.options.toolbar.showOpenButton = false;
this.options.exports.showExportToPdf = false;
}
}toolbar.showOpenButton/exports.showExportToPdf— show or hide individual toolbar and export commands.appearance.theme/fullScreenMode— the overall look of the viewer.
How it works. The options object has a flag for every UI element, so the viewer can be trimmed to exactly what your app needs.