Main Content

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(widgetName, widths) specifies possible widths that an 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 wide

  • slmetric.dashboard.Width.Small — 4 columns wide

  • slmetric.dashboard.Width.Medium — 6 columns wide

  • slmetric.dashboard.Width.Large — 8 columns wide

  • slmetric.dashboard.Width.XLarge — 10 columns wide

  • slmetric.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 1Column 2Column 3Column 4Column 5Column 6Column 7Column 8Column 9Column 10Column 11Column 12
slmetric.dashboard.Width.XXLarge
slmetric.dashboard.Width.Mediumslmetric.dashboard.Width.Medium
slmetric.dashboard.Width.Mediumslmetric.dashboard.Width.Small(empty)
slmetric.dashboard.Width.Small(empty)

Input Arguments

expand all

slmetric.dashboard.Widget object that is to have between one and four widths

Specify one or as many as four of these values:

  • slmetric.dashboard.Width.ExtraSmall — 2 columns wide

  • slmetric.dashboard.Width.Small — 4 columns wide

  • slmetric.dashboard.Width.Medium — 6 columns wide

  • slmetric.dashboard.Width.Large — 8 columns wide

  • slmetric.dashboard.Width.XLarge — 10 columns wide

  • slmetric.dashboard.Width.XXLarge — 12 columns wide

Version History

Introduced in R2018b

collapse all

R2022a: Metrics Dashboard will be removed

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.