React LinearGauge - scale

Specifies the gauge's scale options.

Type:

Object

To divide a scale, set its startValue and endValue properties. The scale's major and minor ticks will be calculated automatically. Major ticks will be shown by default. To show minor ticks, set their visible property to true. You can set custom major and minor tick intervals, show custom major and minor ticks, and format tick labels. These and other scale options are available in the scale configuration object.

allowDecimals

Specifies whether to allow decimal values on the scale. When false, the scale contains integer values only.

Type:

Boolean

Default Value: undefined

customMinorTicks

Specifies an array of custom minor ticks.

Type:

Array<Number>

Default Value: undefined
Cannot be used in themes.

If you need to show minor ticks, set the visible property to true. If you need to display a custom ticks set, you can configure it using the customMinorTicks property. Assign an array of custom tick values to this property.

customTicks

Specifies an array of custom major ticks.

Type:

Array<Number>

Default Value: undefined
Cannot be used in themes.

If you set the start and end scale values, major ticks will automatically be calculated and displayed. If you need to add intermediate (minor) ticks between the major ticks, set the visible property of the minorTick configuration object to true. If you need to display a custom ticks set, you can configure it using the customTicks property. Assign an array of custom major tick values to this property.

View Demo

endValue

Specifies the end value for the scale of the gauge.

Type:

Number

Default Value: 100
Cannot be used in themes.

hideFirstLabel Deprecated

Use the hideFirstOrLast property instead.

Specifies whether or not to hide the first scale label.

Type:

Boolean

Default Value: false

hideFirstTick Deprecated

Use the hideFirstOrLast property instead.

Specifies whether or not to hide the first major tick on the scale.

Type:

Boolean

Default Value: false

hideLastLabel Deprecated

Use the hideFirstOrLast property instead.

Specifies whether or not to hide the last scale label.

Type:

Boolean

Default Value: false

hideLastTick Deprecated

Use the hideFirstOrLast property instead.

Specifies whether or not to hide the last major tick on the scale.

Type:

Boolean

Default Value: false

horizontalOrientation

Specifies the orientation of scale ticks. Applies only if the geometry.orientation option is "vertical".

Type:

String

Default Value: 'right'
Accepted Values: 'center' | 'left' | 'right'

This option specifies the orientation of scale ticks relative to an invisible scale line.

When using the widget as an ASP.NET MVC Control, specify this option using the HorizontalAlignment enum. This enum accepts the following values: Left, Center and Right.

label

Specifies common options for scale labels.

Type:

Object

Scale labels represent textual values for major scale ticks. The label object exposes properties that allow you to specify custom text for scale labels and properties to change the text font.

majorTick Deprecated

Use the tick property instead.

Specifies options of the gauge's major ticks.

Type:

Object

Major ticks are calculated automatically based on the scale's startValue and endValue property values. They are visible by default. You can set a custom major tick interval or add custom major ticks using the tickInterval and customTickValues properties respectively. To specify the visibility of major ticks, use the visible and showCalculatedTicks properties. You can also specify the length, width and color of the major ticks using corresponding properties.

minorTick

Specifies options of the gauge's minor ticks.

Type:

Object

Major and minor ticks are calculated automatically based on the scale's startValue and endValue property values. Major ticks are made visible by default. You can make minor tick visible as well, using their visible property. In addition, you can set a custom minor tick interval or add custom minor ticks using the tickInterval and customTickValues properties respectively. You can also specify the length, width and color of the minor ticks using corresponding properties.

View Demo

minorTickInterval

Specifies an interval between minor ticks.

Type:

Number

Default Value: undefined

You can also add custom minor ticks by manually assigning an array of their values to the customTicks property.

View Demo

startValue

Specifies the start value for the scale of the gauge.

Type:

Number

Default Value: 0
Cannot be used in themes.

tick

Specifies options of the gauge's major ticks.

Type:

Object

Major ticks are calculated automatically based on the scale's startValue and endValue property values. They are visible by default. You can set a custom major tick interval or a custom major ticks set using the tickInterval and customTicks properties respectively. To specify the visibility of major ticks, use the visible property. You can also specify the length, width and color of the major ticks using corresponding properties.

tickInterval

Specifies an interval between major ticks.

Type:

Number

Default Value: undefined

If this property is not set, major ticks are arranged automatically.

verticalOrientation

Specifies the orientation of scale ticks. Applies only if the geometry.orientation option is "horizontal".

Type:

String

Default Value: 'bottom'
Accepted Values: 'bottom' | 'center' | 'top'

This option specifies the orientation of scale ticks relative to an invisible scale line.

When using the widget as an ASP.NET MVC Control, specify this option using the VerticalAlignment enum. This enum accepts the following values: Top, Center and Bottom.