Dashboards & Visualizations
Highlighted

Change layoutpanel width

Path Finder

I have a dashboard with 3 graphs on it.

The main graph I have in panelrow1col1 layout panel, and it covers the top half of the screen.

The other two graphs are sharing a row - panelrow2col1 & panelrow2col2. This means that they get 50% of the row each. I'd like for panelrow2col1 to get about 25% of the screen width, and panelrow2col2 to get about 75% of the screen's width. I've tried using _grpX, but I still end up with things being split 50/50.

Any suggestions?

Highlighted

Re: Change layoutpanel width

Builder

You can control the sizes through css. I normally create a unique dashboard_size.css file, and then adjust the panel groups in that css file.

Make sure to include the dashboard_size.css file in your xml.

xml include:
~/default/data/ui/views/dashboard.xml

<view autoCancelInterval="90" isVisible="true" onunloadCancelJobs="true" refresh="-1" template="dashboard.html" stylesheet="dashboard_size.css">

~/appserver/static/dashboard_size.css

.panel_row1_col .layoutCell {
        width:210px !important;
}
.panel_row1_col .firstCell {   
        width:500px !important;
}
.panel_row5_col .layoutCell {
        width:330px !important;
}

View solution in original post

Highlighted

Re: Change layoutpanel width

Explorer

Thanks for the solution, bbingham! However, it did not work for me. Is there any more settings needed in the css file?

My goal is to put at least 10 panels (filler gauge for CPU Utilisation) on one row. I am using the following in the css file:

.panelrow1col .layoutCell {
width:10% !important;
}
.panelrow1col .firstCell {

width:10% !important;
}
.panelrow1col .secondCell {

width:10% !important;
}
........
.panelrow1col .ninthCell {

width:10% !important;
}

Is this the right way to accomplish this? Thanks!

0 Karma
Highlighted

Re: Change layoutpanel width

Builder

In your case, you should use 1 panel, and then adjust the css for each "div" of the gauge to have a float: left;, so view source on your panel, and you'll see id's for your gauges, similar to:
id="SingleValue014_2"

you'll then take all your guages ids, and float them:

.SingleValue_0_14_1 .SingleValue_0_14_2 .SingleValue_0_14_3 {
    float:left;
}

If you really want "10" panels (gray chrome between them), you'll have to make a new template, but I think you'll find 10 gauges in 1 panel will work for your use case.

Highlighted

Re: Change layoutpanel width

Communicator

hi i have a question. do you know how to change the width of the second panel in a row??