How to get Template dimensions

I have a question.
I want to create in my dashboard a Template with a canvas to draw on it a specific graph.
I need to know ( form javascript) the dimension of the template (height and width) in order to scale the graph in accordance to the size of the widget template.
I tried 1000 combinations without success.....
Can somone help me?

The site config for reference looks like this
And let's say you have ui_template configured with size 6x2 (units with x height)

units = ui_template size in direction
w-size = widget size in direction
w-space = widget spacing in direction
Formula for direction:
size = (units * w-size) + ((units - 1) * w-space)

But ... the container has padding

.nr-dashboard-template {
    padding: 3px 6px;

So for actual size in pixels you'll need to subtract 12 from width and 6 from height. (in case of nr-theme is in use and you don't override that class anywhere)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.