Cloud
Cloud-Dienstleistung für schnelle und effektive Analyse und Visualisierung von Daten für Ihr Business ohne eigene Applikationen zu erstellen oder zu programmieren.
public ActionResult Index(string id = "DashboardChristmas")
{
var report = StiReport.CreateNewDashboard();
report.Load(Server.MapPath($"~/Dashboards/{id}.mrt"));
// Get theme colors from the dashboard page
var dashboard = report.Pages[0] as StiDashboard;
...
StiDashboardStyleHelper class, which contains the necessary methods for working with theme. The resulting colors are converted to HTML color and saved in the standard ViewBag collection:
...
ViewBag.DashboardBackHtmlColor = ColorTranslator.ToHtml(
dashboard != null ? StiDashboardStyleHelper.GetDashboardBackColor(dashboard, true) : Color.White);
ViewBag.BackHtmlColor = ColorTranslator.ToHtml(
dashboard != null ? StiDashboardStyleHelper.GetBackColor(dashboard) : Color.White);
ViewBag.ForeHtmlColor = ColorTranslator.ToHtml(
dashboard != null ? StiDashboardStyleHelper.GetForeColor(dashboard) : Color.Black);
// Then use it on the _Layout.cshtml
return View();
}
...
<body style="background: @ViewBag.DashboardBackHtmlColor;">
...
<div class="container" style="color: @ViewBag.ForeHtmlColor;">
...