Usage
Creating a gauge is easy; all you need is a container...<span id="my-gauge"></span>
... and some javascript to display the gauge with its default configuration.
var gauge = ResponsiveGauge('#my-gauge', {value : 50 });
If needed, you can set a custom configuration :
var gauge = ResponsiveGauge('#my-gauge', {
value : 50,
minAngle : 0,
...
});
value : 50,
minAngle : 0,
...
});
You can update the value this way :
gauge.update(60);
Or you can update the whole gauge :
gauge.update(60, {
minAngle : 0,
...
});
minAngle : 0,
...
});
The complete configuration of a gauge can be retrieved, in a read-only object :
var config = gauge.getConfig();
config.minAngle = 90; // this will do nothing
config.minAngle = 90; // this will do nothing
In case you want several identical gauges, you can set the default configuration (see the available configs) :
ResponsiveGauge.config.minAngle = 0;