Dashboard related query

When I’m using the embedded dashboard, there is a loading screen that appears while it’s loading the blocks. I’ve noticed that when I set it to dark mode, the loading screen still uses a white background (very distracting).

Do you know if there is a fix : so when I select dark mode, the loading screen background is also in dark mode?

Hey @Alok_Singh,

Welcome to the Losant forums, we’re happy to have you!

Currently, with the way experiences load dashboard pages, there is not a fix to correct the loading screen from white to the dark color of the dashboard.

I will, though, put in a feature request for this, and keep you updated with its development as I learn more about it.

Thank you,
Heath

1 Like

I found a workaround.

If you use an experience custom page instead, you can embed the dashboard with an overriding background color style for dark theme:

<style>
{{#eq request.query.theme "dark"}}
div#los-root {
    background-color: rgb(29, 38, 54);
}
{{/eq}}
</style>

{{element
  'dashboard'
  dashboardId=request.params.id
  theme=request.query.theme
}}