API REFERENCE
plotBands
Gauge plot bands — an array (property), or 'auto' for %-of-max zones.
Definition
| Item | Value |
|---|---|
| JavaScript property | plotBands |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | GaugePlotBand[] | 'auto' |
| Default | undefined |
| Literals in the type | auto |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
- GaugePlotBand
Type definition
Configuration example
// Register sy-gauge-chart and create the element before configuring it.
chart.plotBands = [
{
"from": 0,
"to": 120,
"color": "#16a34a"
},
{
"from": 120,
"to": 160,
"color": "#f59e0b"
},
{
"from": 160,
"to": 200,
"color": "#dc2626"
}
];