Skip to content

Documentation / @ripl/charts / createGaugeChart

Function: createGaugeChart()

createGaugeChart(target, options): GaugeChart

Defined in: charts/src/charts/gauge.ts:527

Factory function that creates a new GaugeChart instance.

Parameters

ParameterType
targetstring | Context<Element, Record<string, unknown>> | HTMLElement
optionsGaugeChartOptions

Returns

GaugeChart

Example

ts
createGaugeChart(target, {
    value: 68,
    min: 0,
    max: 100,
    label: 'CPU',
});