Shimoku docs
  • 🚀QuickStart
    • Installation & Setup
    • Minimal APP example
    • Extended Example
    • Templates & tutorials
  • 🤖Artificial Intelligence
    • Classification
      • Train Classification
        • Train Classification Outputs
      • Predict Classification
        • Predict Classification Outputs
    • Generate Insights
      • Generate Insights Outputs
  • 🛠️Building Web App
    • Environment
      • Overview
      • Environment Variables
    • Management
      • Managing Universes
      • Managing Workspaces
      • Managing Boards
    • Menu
      • Changing the Menu Path
      • Updating the Menu Path
      • Deleting the Menu Path
    • Grid
      • Using the Grid
    • Theming
      • Colors Usage
    • Actions
    • Modals
    • IO
  • 💡Elements
    • Summary
    • Charts
      • Table
        • Buttons Column
        • Filters
        • Search bars
        • Colored labels
      • HTML
        • Raw HTML
        • Beautiful Titles
        • Background Indicators
        • Click to New Tab
        • Box With Button
        • Panel
      • Indicators
        • Indicator
        • Grouped Indicators
        • Vertical Indicators
        • Color by Value
        • Gauge Indicator
        • Indicators with Header
      • Scatter Charts
        • Scatter
        • Scatter with Effect
      • Line Charts
        • Line
        • Predictive Line
        • Segmented Line
        • Marked Line
        • Line With Confidence Area
        • Top Bottom Line Charts
        • Summary Line
      • Area Charts
        • Area
        • Stacked Area
        • Segmented Area
        • Top Bottom Area Charts
      • Bar Charts
        • Bar
        • Stacked Bar
        • Horizontal Bar
        • Stacked Horizontal Bar
        • Zero Centered Bar
      • Pie Charts
        • Pie
        • Doughnut
        • Rose
      • Gauge Charts
        • Shimoku Gauge
        • Speed Gauge
      • Input forms
        • Group chained Inputs
        • List input search
        • Conditional inputs
        • Audio input
        • Drag & Drop
      • Line and Bar
      • Waterfall
      • Annotated Chart
      • Heatmap
      • Radar
      • Sunburst
      • Tree
      • Treemap
      • Sankey Diagram
      • Funnel chart
      • iFrame
    • Composite Template Charts
      • Infographics text bubble
      • Chart and Modal Button
      • Chart and Indicators
    • Data Sets
      • Data Set Filters
    • Create your own charts
      • Free Echarts
      • Bento box
    • Features & Navigation
      • Tabs
      • History navigation & Breadcrumb
  • 🔍Advanced usage
    • CLI
    • Workflow Triggers
    • Code Generation
  • 🌍Cloud & Community
    • Shimoku Cloud
    • Shared links
    • Handling Workspaces & Users
      • User authentication
      • Inviting users
      • Creating users
      • Users with multi-workspace access
  • 🌐Releases
    • 2024
      • v.2.6
      • v.2.5
      • v.2.4
      • v.2.3
        • v.2.3.1
      • v.2.2
        • v.2.2.3
        • v.2.2.2
        • v.2.2.1
      • v.2.1
        • v.2.1.2
        • v.2.1.1
      • v.2.0
        • v.2.0.(1..4)
      • v.1.6
        • v.1.6.1
      • v.1.5
    • 2023
      • v.1.4
        • v.1.4.1
        • v.1.4.2
      • v.1.3
      • v.1.2
        • v.1.2.1
      • v.1.1
        • v.1.1.1
      • v.1.0
        • v.1.0.2
        • v.1.0.1
      • v.0.20
      • v.0.19
      • v.0.18
      • v.0.17
        • v.0.17.1
      • v.0.16
        • v.0.16.3
        • v.0.16.2
        • v.0.16.1
      • v.0.15
      • v.0.14
    • 2022
      • v.0.13
        • v.0.13.3
      • v.0.12
      • v.0.11
      • v.0.10
        • v.0.10.4
        • v.0.10.3
        • v.0.10.1
      • v.0.9
      • v.0.8
      • v.0.7
        • v.0.7.1
      • v.0.6
      • v.0.5
      • v.0.4
      • v.0.3
        • v0.3.2
        • v0.3.1
      • v.0.2
Powered by GitBook
On this page
  • The Method To Use
  • Styles
  • Example
  • Modifying Size And Padding

Was this helpful?

  1. Elements
  2. Charts
  3. Indicators

Indicator

Indicators are important tools to benchmark, target and monitor performance.

Different types of indicators are used in monitoring and evaluation, such as ‘quantitative’ or ‘qualitative’. Colors and thresholds can be set to guide decision.

The Method To Use

The method is s.plt.indicator()

It must contain the following input variables:

order: int, 
data: Union[str, pd.DataFrame, List[Dict], Dict],

And accepts the following input variables as optional:

data: Union[str, pd.DataFrame, List[Dict], Dict], 
order: int,
vertical: Union[bool, str] = False, 
**component_params

In the data parameter, the key value pairs that will have an effect in the result are:

{
    title: string,
    value: string,
    description?: string,
    color?: 'success'   'warning'   'error'   'neutral'   'caution',
    align?: 'left'   'center'   'right',
    targetPath?: string,
    icon?: string,
    bigIcon?: string,
    variant?: 'default'   'outlined'   'contained'   'topColor',
    info?: string,
    hideIcons?: boolean,
    backgroundImage?: string
}

Styles

"color" : "default", "success", ""warning", "error", "caution"

If you don't set any "color" style, the color is black.

"alignment" : left , center, right by default the value right is taken. Note that the alignment only applies to the value, not to the title nor description.

"variant" : "default" , "outlined", "contained", "topColor" The variants are used to modify the container, making the same color that used only the text before, for example, with the contained variant, serve to put this color in the background.

"icon" : set an icon from a list.

"icon" : "Line/subscriptions"

This list will be added soon

"bigIcon" : set a bigIcon inside the indicator. BigIcon and icon can be different and coexist in the same indicator

"bigIcon" : "Line/calendar"

"target_path": set a path so that when the indicator is clicked it redirects to the specified path in the dashboard.

Example

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",
}, {
    "color": "caution",
    "variant": "contained",
    "description": "Aligned to right and full of icons",
    "title": "Multiple cases",
    "align": "right",
    "value": "Value",
}]

s.plt.indicator(
    data=data_, order=2, rows_size=2, cols_size=12,
)

Modifying Size And Padding

It is possible to personalize the size and add padding. One example could be obtained using:

s.plt.indicator(
    order=0, cols_size=7,
    padding="0,0,0,2",
    data=[
        {
            "description": "Seda incolora",
            "title": "Largo (m)",
            "value": "1200",
            "color": "grey",
        },
        {
            "description": "Precio",
            "title": "Cambio €/$",
            "value": "1.19",
            "color": "warning",

        },
    ],
)

Featured Content

Changing the Menu Path The menu_path can be modified.

Using the Grid

It is possible to use any number of rows.

PreviousIndicatorsNextGrouped Indicators

Last updated 1 year ago

Was this helpful?

"backgroundImage" set a url to get a beautiful indicator with background image.

Consult for more details about padding and size

💡
using the grid
Left to right 1st line: success, warning, caution. Left to right 2on line: default, error, black(no color set)
Left to right: left, center, right
Left to right: default, contained, outlined, topColor
Note the space before the component using padding="0,0,0,2", and size with cols_size=7. Size can be modified with attention to the text to be fit in.