text font

Specifies font options for the text displayed by a value indicator of the rangeBar type.

Type: Object

Show Example:
jQuery

In this example, several font options of the range bar text are changed.

<div id="circularGaugeContainer" style="height:400px;max-width:400px;margin:0px auto"></div>
$(function() {
    $('#circularGaugeContainer').dxCircularGauge({
        rangeContainer: { backgroundColor: 'white' },
        scale: {
            startValue: 0,
            endValue: 100,
            majorTick: {
                color: 'black',
                tickInterval: 10
            }
        },
        valueIndicator: {
            type: 'rangeBar',
            text: {
                indent: 1,
                font: { 
                    color: 'purple',
                    size: 18,
                    family: 'Zapf-Chancery, cursive',
                    weight: 200
                }
            }
        },
        value: 52.54
    })
})

color

Specifies a font color for the text displayed by a value indicator of the rangeBar type.

Type: String
Default Value: null

This option supports the following colors.

  • Hexadecimal colors
  • RGB colors
  • RGBA colors (not supported in Internet Explorer 8)
  • Predefined/Cross-browser color names
  • Predefined SVG colors (not supported in Internet Explorer 8)
Show Example:
jQuery

In this example, the font color of the range bar text is set to firebrick.

<div id="circularGaugeContainer" style="height:400px;max-width:400px;margin:0px auto"></div>
$(function() {
    $('#circularGaugeContainer').dxCircularGauge({
        rangeContainer: { backgroundColor: 'white' },
        scale: {
            startValue: 0,
            endValue: 100,
            majorTick: {
                color: 'black',
                tickInterval: 10
            }
        },
        valueIndicator: {
            type: 'rangeBar',
            color: 'sandybrown',
            text: {
                indent: 1,
                font: { 
                    color: 'firebrick'
                }
            }
        },
        value: 52.54
    })
})

family

Specifies a font family for the text displayed by a value indicator of the rangeBar type.

Type: String
Default Value: "'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana"

For details on acceptable values, refer to the Font family article.

Show Example:
jQuery

In this example, the font family of the range bar text is changed.

<div id="circularGaugeContainer" style="height:400px;max-width:400px;margin:0px auto"></div>
$(function() {
    $('#circularGaugeContainer').dxCircularGauge({
        rangeContainer: { backgroundColor: 'white' },
        scale: {
            startValue: 0,
            endValue: 100,
            majorTick: {
                color: 'black',
                tickInterval: 10
            }
        },
        valueIndicator: {
            type: 'rangeBar',
            color: 'darkmagenta',
            text: {
                indent: 1,
                font: { 
                    family: 'Zapf-Chancery, cursive'
                }
            }
        },
        value: 45.54
    })
})

size

Specifies a font size for the text displayed by a value indicator of the rangeBar type.

Type: Number
Default Value: 14

For details on acceptable values, refer to the Font size article.

Show Example:
jQuery

In this example, the font size of the range bar text is set to 20.

<div id="circularGaugeContainer" style="height:400px;max-width:400px;margin:0px auto"></div>
$(function() {
    $('#circularGaugeContainer').dxCircularGauge({
        rangeContainer: { backgroundColor: 'white' },
        scale: {
            startValue: 0,
            endValue: 100,
            majorTick: {
                color: 'black',
                tickInterval: 10
            }
        },
        valueIndicator: {
            type: 'rangeBar',
            color: 'olivedrab',
            text: {
                indent: 1,
                font: { 
                    size: 20
                }
            }
        },
        value: 33.54
    })
})

weight

Specifies a font weight for the text displayed by a value indicator of the rangeBar type.

Type: Number
Default Value: 400

Show Example:
jQuery

In this example, the font weight of the range bar text is set to 700.

<div id="circularGaugeContainer" style="height:400px;max-width:400px;margin:0px auto"></div>
$(function() {
    $('#circularGaugeContainer').dxCircularGauge({
        rangeContainer: { backgroundColor: 'white' },
        scale: {
            startValue: 0,
            endValue: 100,
            majorTick: {
                color: 'black',
                tickInterval: 10
            }
        },
        valueIndicator: {
            type: 'rangeBar',
            color: 'darkgrey',
            text: {
                indent: 1,
                font: { 
                    weight: 700
                }
            }
        },
        value: 67.54
    })
})