sy-gauge-chart
Gauge
Read a metric's current state within a defined range.
sy-gauge-chart
Use for values with a clear range, such as target completion, capacity, or speed.
Show trends over time in a separate chart. Explain out-of-range values and the meaning of boundaries.
Base chart tier: Community. Features such as additional renderers and custom branding have separate entitlement requirements.
| Input | Data description |
|---|---|
value | The current measurement. |
min | The start of the measurement range. |
max | The end of the measurement range. |
variant | The gauge style, such as solid or dial. |
- Run in Components
Change options and view framework-specific code
- Shared installation and integration
Complete implementation example
<div id="chart-container" style="width: 100%; min-width: 0;"></div>
<script type="module">
import { defineCustomElement as define0 } from '@syidax/advanced/components/sy-gauge-chart.js';
define0();
const specs = [
{
"id": "example-chart",
"tag": "sy-gauge-chart",
"props": {
"engine": "standard",
"value": 80,
"min": 0,
"max": 200,
"variant": "dial",
"unit": "km/h",
"bandThickness": 14,
"plotBands": [
{
"from": 0,
"to": 120,
"color": "#16a34a"
},
{
"from": 120,
"to": 160,
"color": "#f59e0b"
},
{
"from": 160,
"to": 200,
"color": "#dc2626"
}
],
"width": 640,
"height": 360,
"brandPosition": "bottom-right",
"brandLogo": ""
}
}
];
const container = document.querySelector('#chart-container');
const elements = specs.map(({ tag, id, props }) => {
const element = document.createElement(tag);
element.id = id;
Object.assign(element, props);
element.setAttribute('aria-label', 'gauge example chart');
return element;
});
container.replaceChildren(...elements);
const chart = elements.at(-1);
const onEvent = event => {
console.log('valueChange', event.detail);
};
chart.addEventListener('valueChange', onEvent);
const observer = new ResizeObserver(([entry]) => {
const width = Math.max(160, Math.floor(entry.contentRect.width));
elements.forEach(element => { element.width = width; });
});
observer.observe(container);
// In an SPA, call this function when the view is disposed.
function disposeChart() {
observer.disconnect();
chart.removeEventListener('valueChange', onEvent);
container.replaceChildren();
}
</script>Properties
value
The current measurement.
| Item | Value |
|---|---|
| JavaScript property | value |
| HTML attribute | value |
| Type | number |
| Default | 0 |
min
The start of the measurement range.
| Item | Value |
|---|---|
| JavaScript property | min |
| HTML attribute | min |
| Type | number |
| Default | 0 |
max
The end of the measurement range.
| Item | Value |
|---|---|
| JavaScript property | max |
| HTML attribute | max |
| Type | number |
| Default | 100 |
needles
Multi-needle override (dial variant). When set + non-empty, drives the dial instead of value.
| Item | Value |
|---|---|
| JavaScript property | needles |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | GaugeNeedleSpec[] |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
- GaugeNeedleSpec
Type definition
width
Chart width in pixels. If the container width changes, update width from a ResizeObserver.
| Item | Value |
|---|---|
| JavaScript property | width |
| HTML attribute | width |
| Type | number |
| Default | 320 |
height
Chart height in pixels. Allow space for axes, titles, and the legend.
| Item | Value |
|---|---|
| JavaScript property | height |
| HTML attribute | height |
| Type | number |
| Default | 280 |
brandLogo
The default is the Syidax symbol and wordmark. With the Pro chart.branding entitlement, set none to remove it or provide a PNG, JPEG, or WebP data URL to replace it.
| Item | Value |
|---|---|
| JavaScript property | brandLogo |
| HTML attribute | brand-logo |
| Type | string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
brandPosition
The corner where the logo is anchored. Community and Pro both support all four corners, using the same position on screen and in image exports.
| Item | Value |
|---|---|
| JavaScript property | brandPosition |
| HTML attribute | brand-position |
| Type | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' |
| Default | 'bottom-right' |
| Allowed values | top-left, top-right, bottom-left, bottom-right |
variant
The gauge style, such as solid or dial.
| Item | Value |
|---|---|
| JavaScript property | variant |
| HTML attribute | variant |
| Type | GaugeChartVariant |
| Default | 'dial' |
| Allowed values | solid, dial, activity, vuMeter, speedometer, clock |
- GaugeChartVariant
Type definition
startAngle
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | startAngle |
| HTML attribute | start-angle |
| Type | number |
| Default | -150 |
endAngle
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | endAngle |
| HTML attribute | end-angle |
| Type | number |
| Default | 150 |
size
Pass as a JavaScript property. type: number | string.
| Item | Value |
|---|---|
| JavaScript property | size |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | number | string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
centerX
Pass as a JavaScript property. type: number | string.
| Item | Value |
|---|---|
| JavaScript property | centerX |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | number | string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
centerY
Pass as a JavaScript property. type: number | string.
| Item | Value |
|---|---|
| JavaScript property | centerY |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | number | string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
innerRadius
Solid-variant inner radius. Number = px; '%' = fraction of outerRadius.
| Item | Value |
|---|---|
| JavaScript property | innerRadius |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | number | string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
thickness
Band / solid-ring thickness in px. Wins over innerRadius for the solid variant.
| Item | Value |
|---|---|
| JavaScript property | thickness |
| HTML attribute | thickness |
| Type | number |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
rings
Activity-variant rings (property-only). Each ring has its OWN value/max (Move 500 kcal, Exercise 30 min…). Absent → the variant falls back to needles (shared chart max) or the scalar value (one ring).
| Item | Value |
|---|---|
| JavaScript property | rings |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | GaugeActivityRingSpec[] |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
- GaugeActivityRingSpec
Type definition
time
Clock-variant time. 'now'/unset keeps the face ticking live (1 s interval, cleaned up on disconnect); 'HH:MM'/'HH:MM:SS' freezes it.
| Item | Value |
|---|---|
| JavaScript property | time |
| HTML attribute | time |
| Type | string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
showSeconds
Clock-variant second hand (thin, red).
| Item | Value |
|---|---|
| JavaScript property | showSeconds |
| HTML attribute | show-seconds |
| Type | boolean |
| Default | true |
color
Set as an HTML attribute or JavaScript property. type: string.
| Item | Value |
|---|---|
| JavaScript property | color |
| HTML attribute | color |
| Type | string |
| Default | '#2563eb' |
colors
Needle palette (multi-needle). Per-needle color always wins.
| Item | Value |
|---|---|
| JavaScript property | colors |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | ReadonlyArray<string> |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
stops
Solid-variant colour stops (0..1 along min..max). Progress colour interpolates between them.
| Item | Value |
|---|---|
| JavaScript property | stops |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | GaugeColorStop[] |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
- GaugeColorStop
Type definition
needleShape
Allowed values: needle, arrow, line, wedge. Default: 'needle'.
| Item | Value |
|---|---|
| JavaScript property | needleShape |
| HTML attribute | needle-shape |
| Type | GaugeNeedleShape |
| Default | 'needle' |
| Allowed values | needle, arrow, line, wedge |
- GaugeNeedleShape
Type definition
needleLength
Pass as a JavaScript property. type: number | string.
| Item | Value |
|---|---|
| JavaScript property | needleLength |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | number | string |
| Default | '88%' |
needleRearLength
Pass as a JavaScript property. type: number | string.
| Item | Value |
|---|---|
| JavaScript property | needleRearLength |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | number | string |
| Default | '14%' |
needleWidth
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | needleWidth |
| HTML attribute | needle-width |
| Type | number |
| Default | 8 |
pivotRadius
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | pivotRadius |
| HTML attribute | pivot-radius |
| Type | number |
| Default | 7 |
pivotColor
Set as an HTML attribute or JavaScript property. type: string.
| Item | Value |
|---|---|
| JavaScript property | pivotColor |
| HTML attribute | pivot-color |
| Type | string |
| Default | '#1f2937' |
plotBands
Coloured zones — an array, or 'auto' to split the axis by % of max.
| 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
bandThickness
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | bandThickness |
| HTML attribute | band-thickness |
| Type | number |
| Default | 14 |
bandTrackColor
The 'empty' track behind plot bands — the un-zoned part of the axis.
| Item | Value |
|---|---|
| JavaScript property | bandTrackColor |
| HTML attribute | band-track-color |
| Type | string |
| Default | '#eef2f7' |
rounded
Set as an HTML attribute or JavaScript property. type: boolean.
| Item | Value |
|---|---|
| JavaScript property | rounded |
| HTML attribute | rounded |
| Type | boolean |
| Default | true |
trackColor
Set as an HTML attribute or JavaScript property. type: string.
| Item | Value |
|---|---|
| JavaScript property | trackColor |
| HTML attribute | track-color |
| Type | string |
| Default | '#e5e7eb' |
showTicks
Set as an HTML attribute or JavaScript property. type: boolean.
| Item | Value |
|---|---|
| JavaScript property | showTicks |
| HTML attribute | show-ticks |
| Type | boolean |
| Default | true |
tickInterval
Allowed values: auto. Default: 'auto'.
| Item | Value |
|---|---|
| JavaScript property | tickInterval |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | number | 'auto' |
| Default | 'auto' |
| Literals in the type | auto |
minorTicks
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | minorTicks |
| HTML attribute | minor-ticks |
| Type | number |
| Default | 4 |
tickLength
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | tickLength |
| HTML attribute | tick-length |
| Type | number |
| Default | 9 |
minorTickLength
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | minorTickLength |
| HTML attribute | minor-tick-length |
| Type | number |
| Default | 6 |
tickWidth
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | tickWidth |
| HTML attribute | tick-width |
| Type | number |
| Default | 2 |
minorTickWidth
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | minorTickWidth |
| HTML attribute | minor-tick-width |
| Type | number |
| Default | 1 |
tickColor
Set as an HTML attribute or JavaScript property. type: string.
| Item | Value |
|---|---|
| JavaScript property | tickColor |
| HTML attribute | tick-color |
| Type | string |
| Default | '#94a3b8' |
showTickLabels
Set as an HTML attribute or JavaScript property. type: boolean.
| Item | Value |
|---|---|
| JavaScript property | showTickLabels |
| HTML attribute | show-tick-labels |
| Type | boolean |
| Default | true |
tickLabelDistance
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | tickLabelDistance |
| HTML attribute | tick-label-distance |
| Type | number |
| Default | 7 |
tickLabelColor
Set as an HTML attribute or JavaScript property. type: string.
| Item | Value |
|---|---|
| JavaScript property | tickLabelColor |
| HTML attribute | tick-label-color |
| Type | string |
| Default | '#64748b' |
tickLabelFontSize
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | tickLabelFontSize |
| HTML attribute | tick-label-font-size |
| Type | number |
| Default | 11 |
tickLabelFormat
Set as an HTML attribute or JavaScript property. type: string.
| Item | Value |
|---|---|
| JavaScript property | tickLabelFormat |
| HTML attribute | tick-label-format |
| Type | string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
showValue
Set as an HTML attribute or JavaScript property. type: boolean.
| Item | Value |
|---|---|
| JavaScript property | showValue |
| HTML attribute | show-value |
| Type | boolean |
| Default | true |
valueDisplay
Print the raw value or its percent of the axis (gauges use both).
| Item | Value |
|---|---|
| JavaScript property | valueDisplay |
| HTML attribute | value-display |
| Type | GaugeValueDisplay |
| Default | 'value' |
| Allowed values | percent, value |
- GaugeValueDisplay
Type definition
valueFormat
Set as an HTML attribute or JavaScript property. type: string.
| Item | Value |
|---|---|
| JavaScript property | valueFormat |
| HTML attribute | value-format |
| Type | string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
valueColor
Set as an HTML attribute or JavaScript property. type: string.
| Item | Value |
|---|---|
| JavaScript property | valueColor |
| HTML attribute | value-color |
| Type | string |
| Default | '#0f172a' |
valueFontSize
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | valueFontSize |
| HTML attribute | value-font-size |
| Type | number |
| Default | 26 |
unit
Set as an HTML attribute or JavaScript property. type: string.
| Item | Value |
|---|---|
| JavaScript property | unit |
| HTML attribute | unit |
| Type | string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
centerText
Set as an HTML attribute or JavaScript property. type: string.
| Item | Value |
|---|---|
| JavaScript property | centerText |
| HTML attribute | center-text |
| Type | string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
centerSubtext
Set as an HTML attribute or JavaScript property. type: string.
| Item | Value |
|---|---|
| JavaScript property | centerSubtext |
| HTML attribute | center-subtext |
| Type | string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
chartTitle
The title inside the chart. Explain the data's unit and meaning alongside it.
| Item | Value |
|---|---|
| JavaScript property | chartTitle |
| HTML attribute | chart-title |
| Type | string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
chartSubtitle
The subtitle inside the chart.
| Item | Value |
|---|---|
| JavaScript property | chartSubtitle |
| HTML attribute | chart-subtitle |
| Type | string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
tooltipShow
Whether to display the built-in tooltip.
| Item | Value |
|---|---|
| JavaScript property | tooltipShow |
| HTML attribute | tooltip-show |
| Type | boolean |
| Default | true |
tooltipFormat
Pass as a JavaScript property. type: (detail: GaugeChartPointerEventDetail) => string.
| Item | Value |
|---|---|
| JavaScript property | tooltipFormat |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | (detail: GaugeChartPointerEventDetail) => string |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
- GaugeChartPointerEventDetail
Type definition
enableMouseTracking
Set as an HTML attribute or JavaScript property. type: boolean.
| Item | Value |
|---|---|
| JavaScript property | enableMouseTracking |
| HTML attribute | enable-mouse-tracking |
| Type | boolean |
| Default | true |
tooltip
Rich tooltip configuration object — the dial-flavoured counterpart to the cartesian / pie .tooltip API. Enables trigger (hover/click/hover-click), openMode (single/multiple pinned), connector, draggable, interactive action buttons, custom format/html/style/className/side and fixed sizing. When set it takes precedence over the flat tooltip-show / tooltipFormat props (which stay for back-compat). Property-only — assign the object, not an attribute.
| Item | Value |
|---|---|
| JavaScript property | tooltip |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | GaugeChartTooltipInput |
| Default | undefined |
| Literals in the type | auto, off |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
- GaugeChartTooltipInput
Type definition
legend
Whether to show a legend for series or items.
| Item | Value |
|---|---|
| JavaScript property | legend |
| HTML attribute | legend |
| Type | boolean |
| Default | false |
legendPosition
Where the legend is positioned.
| Item | Value |
|---|---|
| JavaScript property | legendPosition |
| HTML attribute | legend-position |
| Type | GaugeChartLegendPosition |
| Default | 'bottom' |
| Allowed values | top, bottom, left, right |
- GaugeChartLegendPosition
Type definition
legendItems
Pass as a JavaScript property. type: LegendItem[].
| Item | Value |
|---|---|
| JavaScript property | legendItems |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | LegendItem[] |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
- LegendItem
Type definition
animated
Whether to animate initial display and data changes.
| Item | Value |
|---|---|
| JavaScript property | animated |
| HTML attribute | animate |
| Type | boolean |
| Default | false |
animationDuration
Animation duration in milliseconds.
| Item | Value |
|---|---|
| JavaScript property | animationDuration |
| HTML attribute | animation-duration |
| Type | number |
| Default | 900 |
animationEasing
Allowed values: linear, ease-out, ease-in, ease-in-out, analog. Default: 'analog'.
| Item | Value |
|---|---|
| JavaScript property | animationEasing |
| HTML attribute | animation-easing |
| Type | GaugeChartEasing |
| Default | 'analog' |
| Allowed values | linear, ease-out, ease-in, ease-in-out, analog |
- GaugeChartEasing
Type definition
animationType
Allowed values: initial, update. Default: undefined.
| Item | Value |
|---|---|
| JavaScript property | animationType |
| HTML attribute | animation-type |
| Type | GaugeChartAnimationType |
| Default | undefined |
| Allowed values | initial, update |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
- GaugeChartAnimationType
Type definition
analogDamping
analog damping (1..n) for long sweeps — LOWER = bigger overshoot + more wobbles, higher = calmer. Short updates are auto-damped calmer.
| Item | Value |
|---|---|
| JavaScript property | analogDamping |
| HTML attribute | analog-damping |
| Type | number |
| Default | 5 |
analogFrequency
analog swing frequency (1..n) — higher = more wobbles packed into the settle.
| Item | Value |
|---|---|
| JavaScript property | analogFrequency |
| HTML attribute | analog-frequency |
| Type | number |
| Default | 18 |
analogOvershootAngle
How far past the scale ends the needle may overshoot, in degrees (visible at min/max).
| Item | Value |
|---|---|
| JavaScript property | analogOvershootAngle |
| HTML attribute | analog-overshoot-angle |
| Type | number |
| Default | 14 |
streamSource
A stream source for live data. Check the contract for the specific type.
| Item | Value |
|---|---|
| JavaScript property | streamSource |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | GaugeChartStreamSource |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
- GaugeChartStreamSource
Type definition
streamWindow
The streaming data range to keep visible.
| Item | Value |
|---|---|
| JavaScript property | streamWindow |
| HTML attribute | stream-window |
| Type | number |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
streamMax
The maximum number of streaming data points to retain.
| Item | Value |
|---|---|
| JavaScript property | streamMax |
| HTML attribute | stream-max |
| Type | number |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
engine
Renderer selection: auto, standard, or pro. Engine selection is separate from permission to use a Pro chart type.
| Item | Value |
|---|---|
| JavaScript property | engine |
| HTML attribute | engine |
| Type | GaugeChartEngineMode |
| Default | 'auto' |
| Allowed values | auto, standard, pro |
- GaugeChartEngineMode
Type definition
proThreshold
Set as an HTML attribute or JavaScript property. type: number.
| Item | Value |
|---|---|
| JavaScript property | proThreshold |
| HTML attribute | pro-threshold |
| Type | number |
| Default | 50_000 |
Events
rendered
Emits rendering results in detail when chart drawing completes.
Event name: rendered. Names are case-sensitive. Read the payload from detail on CustomEvent<GaugeChartRenderResult & { tier: GaugeChartEngineTier }>.
chart.addEventListener('rendered', event => {
console.log(event.detail); // GaugeChartRenderResult & { tier: GaugeChartEngineTier }
});- GaugeChartRenderResult
Type definition
- GaugeChartEngineTier
Type definition
gaugeClick
CustomEvent.detail type: GaugeChartPointerEventDetail. Event names are case-sensitive.
Event name: gaugeClick. Names are case-sensitive. Read the payload from detail on CustomEvent<GaugeChartPointerEventDetail>.
chart.addEventListener('gaugeClick', event => {
console.log(event.detail); // GaugeChartPointerEventDetail
});- GaugeChartPointerEventDetail
Type definition
gaugeHover
CustomEvent.detail type: GaugeChartPointerEventDetail | null. Event names are case-sensitive.
Event name: gaugeHover. Names are case-sensitive. Read the payload from detail on CustomEvent<GaugeChartPointerEventDetail | null>.
chart.addEventListener('gaugeHover', event => {
console.log(event.detail); // GaugeChartPointerEventDetail | null
});- GaugeChartPointerEventDetail
Type definition
pointContextMenu
CustomEvent.detail type: ChartPointContextMenuEventDetail<GaugeChartPointerEventDetail>. Event names are case-sensitive.
Event name: pointContextMenu. Names are case-sensitive. Read the payload from detail on CustomEvent<ChartPointContextMenuEventDetail<GaugeChartPointerEventDetail>>.
chart.addEventListener('pointContextMenu', event => {
console.log(event.detail); // ChartPointContextMenuEventDetail<GaugeChartPointerEventDetail>
});- ChartPointContextMenuEventDetail
Type definition
- GaugeChartPointerEventDetail
Type definition
valueChange
CustomEvent.detail type: { value: number; fraction: number }. Event names are case-sensitive.
Event name: valueChange. Names are case-sensitive. Read the payload from detail on CustomEvent<{ value: number; fraction: number }>.
chart.addEventListener('valueChange', event => {
console.log(event.detail); // { value: number; fraction: number }
});legendItemClick
CustomEvent.detail type: { index: number; needleId: string; label: string; disabled: boolean }. Event names are case-sensitive.
Event name: legendItemClick. Names are case-sensitive. Read the payload from detail on CustomEvent<{ index: number; needleId: string; label: string; disabled: boolean }>.
chart.addEventListener('legendItemClick', event => {
console.log(event.detail); // { index: number; needleId: string; label: string; disabled: boolean }
});needleToggled
CustomEvent.detail type: { index: number; needleId: string; disabled: boolean }. Event names are case-sensitive.
Event name: needleToggled. Names are case-sensitive. Read the payload from detail on CustomEvent<{ index: number; needleId: string; disabled: boolean }>.
chart.addEventListener('needleToggled', event => {
console.log(event.detail); // { index: number; needleId: string; disabled: boolean }
});appended
CustomEvent.detail type: { count: number }. Event names are case-sensitive.
Event name: appended. Names are case-sensitive. Read the payload from detail on CustomEvent<{ count: number }>.
chart.addEventListener('appended', event => {
console.log(event.detail); // { count: number }
});windowSlid
CustomEvent.detail type: { dropped: number }. Event names are case-sensitive.
Event name: windowSlid. Names are case-sensitive. Read the payload from detail on CustomEvent<{ dropped: number }>.
chart.addEventListener('windowSlid', event => {
console.log(event.detail); // { dropped: number }
});chartAnimationStart
CustomEvent.detail type: void. Event names are case-sensitive.
Event name: chartAnimationStart. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.
chart.addEventListener('chartAnimationStart', event => {
console.log(event.detail); // void
});chartAnimationEnd
CustomEvent.detail type: void. Event names are case-sensitive.
Event name: chartAnimationEnd. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.
chart.addEventListener('chartAnimationEnd', event => {
console.log(event.detail); // void
});chartAnimationInterrupted
CustomEvent.detail type: void. Event names are case-sensitive.
Event name: chartAnimationInterrupted. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.
chart.addEventListener('chartAnimationInterrupted', event => {
console.log(event.detail); // void
});tooltipShow
Whether to display the built-in tooltip.
Event name: tooltipShow. Names are case-sensitive. Read the payload from detail on CustomEvent<GaugeChartTooltipShowEventDetail>.
chart.addEventListener('tooltipShow', event => {
console.log(event.detail); // GaugeChartTooltipShowEventDetail
});- GaugeChartTooltipShowEventDetail
Type definition
tooltipHide
CustomEvent.detail type: void. Event names are case-sensitive.
Event name: tooltipHide. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.
chart.addEventListener('tooltipHide', event => {
console.log(event.detail); // void
});tooltipAction
CustomEvent.detail type: GaugeChartTooltipActionEventDetail. Event names are case-sensitive.
Event name: tooltipAction. Names are case-sensitive. Read the payload from detail on CustomEvent<GaugeChartTooltipActionEventDetail>.
chart.addEventListener('tooltipAction', event => {
console.log(event.detail); // GaugeChartTooltipActionEventDetail
});- GaugeChartTooltipActionEventDetail
Type definition
Methods
redraw
Redraw the chart using its current data and options. Inspect the rendered result after the returned Promise resolves.
redraw(): Promise<GaugeChartRenderResult>Return type: Promise<GaugeChartRenderResult>. Call the method after element registration and await its Promise result.
- GaugeChartRenderResult
Type definition
getActiveTier
An asynchronous method. Check the argument and return types below.
getActiveTier(): Promise<GaugeChartEngineTier>Return type: Promise<GaugeChartEngineTier>. Call the method after element registration and await its Promise result.
- GaugeChartEngineTier
Type definition
getValue
The dB value of a cell (null when empty or outside the grid).
getValue(): Promise<number>Return type: Promise<number>. Call the method after element registration and await its Promise result.
setValue
Set the primary value (animates when animated).
setValue(value: number): Promise<void>| Arguments | Type | Required |
|---|---|---|
value | number | Required |
Return type: Promise<void>. Call the method after element registration and await its Promise result.
addNeedle
Gauge-only — add a needle (dial variant).
addNeedle(needle: GaugeNeedleSpec, opts?: { insertAt?: number }): Promise<number>| Arguments | Type | Required |
|---|---|---|
needle | GaugeNeedleSpec | Required |
opts | { insertAt?: number } | Optional |
Return type: Promise<number>. Call the method after element registration and await its Promise result.
- GaugeNeedleSpec
Type definition
removeNeedle
Gauge-only — remove a needle by id or index.
removeNeedle(idOrIndex: string | number): Promise<boolean>| Arguments | Type | Required |
|---|---|---|
idOrIndex | string | number | Required |
Return type: Promise<boolean>. Call the method after element registration and await its Promise result.
setRings
Replace the activity ring set (animates per ring when animated).
setRings(rings: GaugeActivityRingSpec[]): Promise<void>| Arguments | Type | Required |
|---|---|---|
rings | GaugeActivityRingSpec[] | Required |
Return type: Promise<void>. Call the method after element registration and await its Promise result.
- GaugeActivityRingSpec
Type definition
setRingValue
Update ONE activity ring's value by id, name, or index (animates when animated).
setRingValue(idOrIndex: string | number, value: number): Promise<boolean>| Arguments | Type | Required |
|---|---|---|
idOrIndex | string | number | Required |
value | number | Required |
Return type: Promise<boolean>. Call the method after element registration and await its Promise result.
updateNeedle
Gauge-only — patch a needle.
updateNeedle(idOrIndex: string | number, patch: Partial<GaugeNeedleSpec>): Promise<boolean>| Arguments | Type | Required |
|---|---|---|
idOrIndex | string | number | Required |
patch | Partial<GaugeNeedleSpec> | Required |
Return type: Promise<boolean>. Call the method after element registration and await its Promise result.
- GaugeNeedleSpec
Type definition
appendPoint
Append one value to the stream. Check the argument type and the licensing requirements for streaming.
appendPoint(value: number): Promise<void>| Arguments | Type | Required |
|---|---|---|
value | number | Required |
Return type: Promise<void>. Call the method after element registration and await its Promise result.
appendBatch
Append multiple values to the stream. Check the argument type and the licensing requirements for streaming.
appendBatch(values: ReadonlyArray<number>): Promise<void>| Arguments | Type | Required |
|---|---|---|
values | ReadonlyArray<number> | Required |
Return type: Promise<void>. Call the method after element registration and await its Promise result.
shift
Drop the oldest streamed categories (the data boxes are not the stream).
shift(count?: number): Promise<void>| Arguments | Type | Required |
|---|---|---|
count | number | Optional |
Return type: Promise<void>. Call the method after element registration and await its Promise result.
replace
Swap the streamed set (replace([]) clears it); the base values never leave. Without chart.streaming the dies upsert into the base like a batch (quietly: no appended, no binChanged, as a ring replace).
replace(values: ReadonlyArray<number>): Promise<void>| Arguments | Type | Required |
|---|---|---|
values | ReadonlyArray<number> | Required |
Return type: Promise<void>. Call the method after element registration and await its Promise result.
getStreamSource
The stream session's source (Chart Pro): like the stream methods it waits for a license still being confirmed.
getStreamSource(): Promise<GaugeChartStreamSource | undefined>Return type: Promise<GaugeChartStreamSource | undefined>. Call the method after element registration and await its Promise result.
- GaugeChartStreamSource
Type definition
setAnimation
An asynchronous method. Check the argument and return types below.
setAnimation(options: { duration?: number; easing?: GaugeChartEasing; enabled?: boolean; type?: GaugeChartAnimationType }): Promise<void>| Arguments | Type | Required |
|---|---|---|
options | { duration?: number; easing?: GaugeChartEasing; enabled?: boolean; type?: GaugeChartAnimationType } | Required |
Return type: Promise<void>. Call the method after element registration and await its Promise result.
- GaugeChartEasing
Type definition
- GaugeChartAnimationType
Type definition
pauseAnimation
Pause the current animation.
pauseAnimation(): Promise<void>Return type: Promise<void>. Call the method after element registration and await its Promise result.
resumeAnimation
Resume a paused animation.
resumeAnimation(): Promise<void>Return type: Promise<void>. Call the method after element registration and await its Promise result.
replayAnimation
Replay the initial sweep from min → value(s). No-op when animation is off / reduced.
replayAnimation(): Promise<void>Return type: Promise<void>. Call the method after element registration and await its Promise result.
hitTest
The box under a host-local CSS point (the nearest slot, within half a pitch), or null.
hitTest(cssX: number, cssY: number): Promise<GaugeChartPointerEventDetail | null>| Arguments | Type | Required |
|---|---|---|
cssX | number | Required |
cssY | number | Required |
Return type: Promise<GaugeChartPointerEventDetail | null>. Call the method after element registration and await its Promise result.
- GaugeChartPointerEventDetail
Type definition
showTooltip
Open the value tooltip programmatically at the primary value (needle 0, or the scalar value). Anchors on the dial along the value's angle.
showTooltip(): Promise<GaugeChartPointerEventDetail | null>Return type: Promise<GaugeChartPointerEventDetail | null>. Call the method after element registration and await its Promise result.
- GaugeChartPointerEventDetail
Type definition
showTooltipAtValue
Gauge analogue of pie's showTooltipAtSlice — compute the pointer detail at value's angle on the dial and open the tooltip there.
showTooltipAtValue(value: number): Promise<GaugeChartPointerEventDetail | null>| Arguments | Type | Required |
|---|---|---|
value | number | Required |
Return type: Promise<GaugeChartPointerEventDetail | null>. Call the method after element registration and await its Promise result.
- GaugeChartPointerEventDetail
Type definition
hideTooltip
Close the currently visible tooltip.
hideTooltip(): Promise<void>Return type: Promise<void>. Call the method after element registration and await its Promise result.
getEngineStatus
Requested engine vs what runs, and why (CHART-ADD-08): always Standard (this type has no WebGPU renderer); read without side effects, never consults the license.
getEngineStatus(): Promise<ChartEngineStatus>Return type: Promise<ChartEngineStatus>. Call the method after element registration and await its Promise result.
- ChartEngineStatus
Type definition