setWidths
Class: slmetric.dashboard.Widget
Namespace: slmetric.dashboard
(To be removed) Specify multiple widths for Metrics Dashboard widget
The Metrics Dashboard user interface, metricdashboard
function, slmetric
package API, and corresponding customizations will be removed in a future release. For more information, see Migrating from Metrics Dashboard to Model Maintainability Dashboard.
Description
setWidths(
specifies possible widths that an widgetName
, widths
)slmetric.dashboard.Widget
object can
have. You can specify up to four different widths. For the input argument
widths
, pass either one value or an array of four values. You can
choose from these possible values:
slmetric.dashboard.Width.ExtraSmall
— 2 columns wideslmetric.dashboard.Width.Small
— 4 columns wideslmetric.dashboard.Width.Medium
— 6 columns wideslmetric.dashboard.Width.Large
— 8 columns wideslmetric.dashboard.Width.XLarge
— 10 columns wideslmetric.dashboard.Width.XXLarge
— 12 columns wide
These values correspond to the different sizes that a widget can have as the screen size changes. If you specify one value, the widget always has that value regardless of the screen size. If you specify four different values, the widget size can change four times as you maximize and minimize the screen.
Note
The Metrics Dashboard layout is divided into 12 columns of equal size. When you add a
new widget to an empty dashboard, the dashboard creates a new row with 12 columns. The
dashboard adds widgets to the same row until the width of the widgets would exceed 12
columns. When the width would exceed 12 columns, the dashboard creates a new row. For
example, if you have one widget with a width of
slmetric.dashboard.Width.XXLarge
, that widget uses
all 12 columns in the row. If you have smaller
widgets, the dashboard places those widgets on the same row until the widgets in the row
reach the maximum width of 12.
Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 | Column 7 | Column 8 | Column 9 | Column 10 | Column 11 | Column 12 |
---|---|---|---|---|---|---|---|---|---|---|---|
slmetric.dashboard.Width.XXLarge | |||||||||||
slmetric.dashboard.Width.Medium | slmetric.dashboard.Width.Medium | ||||||||||
slmetric.dashboard.Width.Medium | slmetric.dashboard.Width.Small | (empty) | |||||||||
slmetric.dashboard.Width.Small | (empty) |