chartjs-gauge

chartjs-gauge-v3 - v3.0.0-beta.1 / ValueLabelOptions

Interface: ValueLabelOptions

Table of contents

Properties

Properties

backgroundColor

backgroundColor: Color

The background color of the label.


borderColor

borderColor: Color

The border color of the label.


borderRadius

borderRadius: number

The border radius of the label.

Default

5


borderWidth

borderWidth: number

The border width of the label.


color

color: Color

The text color of the label.


display

display: boolean

If true, display the value label.

Default

true


font

font: FontSpec


formatter

Optional formatter: (value: number) => string | number

Type declaration

▸ (value): string | number

Returns the string representation of the value as it should be displayed on the chart.

Default

Math.round

Parameters
Name Type
value number
Returns

string | number


offsetX

offsetX: string | number

The offset x from needle center x. String ending with ‘%’ means percentage of the chart radius, number means pixels.

Default

0


offsetY

offsetY: string | number

The offset y from needle center y. String ending with ‘%’ means percentage of the chart radius, number means pixels.

Default

0


padding

padding: Object

The padding of the label.

Type declaration

Name Type Description
bottom number Default 5
left number Default 5
right number Default 5
top number Default 5