Vertical Indicators

Indicators can be arranged vertically, through the use of the parameter vertical. Each column of indicators is using the same methods as the grouped indicators, so the function will return the next available order.

This allows the user to create a column of indicators, using a bentobox with the provided cols_size (that by default is 12), and including the indicators inside.

This option has no limit of indicators and will continue to grow vertically. To use this feature, pass True to the vertical parameter when calling the indicator function. Additionally, a title can be added to the top of the bentobox by passing a string to the same parameter vertical (If its set to True it will arrange them vertically but will not set any title).

Adding a title will use one more position of the grid, the next available order will be n+1.

An example would be:

data_ = [{
    "color": "success",
    "variant": "contained",
    "description": "This indicator has a Link",
    "targetPath": "/indicators/indicator/1",
    "title": "Target Indicator",
    "align": "left",
    "value": "500€",
}, {
    "color": "warning",
    "backgroundImage": "https://images.unsplash.com/photo-1535957998253-26ae1ef29506?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=736&q=80",
    "variant": "outlined",
    "description": "This has a background",
    "title": "Super cool indicator",
    "align": "left",
    "value": "Value",
}, {
    "color": "error",
    "variant": "outlined",
    "description": "This hasn't got any icons",
    "title": "Error indicator",
    "align": "left",
    "value": "Value",
    "icon": "Line/download",
}, {
    "color": "caution",
    "variant": "contained",
    "description": "Aligned to right and full of icons",
    "title": "Multiple cases",
    "align": "right",
    "value": "Value",
    "icon": "Line/download",
    "bigIcon": "Line/calendar",
}]

order = s.plt.indicator(
    data=data_ + data_, vertical="Title of the indicators",
    order=0, rows_size=1, cols_size=6,
)
order = s.plt.indicator(
    data=data_, vertical=True,
    order=order, rows_size=2, cols_size=4,
)
s.plt.indicator(
    data=data_[0], vertical="Title of the indicator",
    order=order, rows_size=8, cols_size=2,
)

Last updated