A dashboard can be built entirely from code — pages and elements are objects you create and add.

Building the dashboard. Construct the dashboard hierarchy in code, configure the required objects, add them to the template, and render the result.
var report = Stimulsoft.Report.StiReport.createNewDashboard();
var dashboard = report.pages.getByIndex(0);

var textElement = new Stimulsoft.Dashboard.Components.Text.StiTextElement();
textElement.backColor = Stimulsoft.System.Drawing.Color.lightGray;
dashboard.components.add(textElement);

var viewer = new Stimulsoft.Viewer.StiViewer(null, "StiViewer", false);
viewer.report = report;
viewer.renderHtml();
Dashboard elements — text, tables, charts, gauges — live in the Stimulsoft.Dashboard.Components namespace. Creating them in code and adding them to the dashboard page lets you generate dashboards dynamically.
Auf dem Screenshot unten Sie können das Ergebnis des Beispiel-Codes ansehen:

Creating Dashboard at Runtime

Hallo! Brauchen Sie Hilfe?