0.1.0 • Published 5 years ago

dashbi-widget-gauge v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

dashbi-widget-gauge

Dashbi widget that displays gauge using chartist.js

screenshot

Usage

Install

npm install --save dashbi-widget-gauge

Register

Dashbi should detect and auto-register widget.

Configuration

NameTypeDescription
currentStringWhich state key should be used for current number
totalStringWhich state key should be used for total number

Example

Lets' say that some-data-provider provides state which has key randomNumber and ofTotal:

dashbiLayout.addWidget({
  name: 'gauge',
  title: 'Cool Gauge',
  params: {
    current: 'randomNumber',
    total: 'ofTotal'
  },
  source: {
    name: 'some-data-provider'
  }
});

Colors

Background of widget will change color according to current value. 0% will be red (#E15554), 50% yellow (#E1BC29) and 100% green (#3BB273).