label font

Specifies font options for bar labels.

Type: Object

Show Example:
jQuery

In this example, several font options of bar labels are changed.

<div id="barGaugeContainer" style="height:400px;max-width:500px;margin:0px auto"></div>
$(function () {
    $("#barGaugeContainer").dxBarGauge({
        startValue: -50,
        endValue: 50,
        values: [4, -14.3, 42, 13, -29.1],
        palette: 'Ocean',
        label: {
            font: {
                size: 12,
                family: 'Zapf-Chancery, cursive',
                weight: 700
            }
        }
    });
});

color

Specifies a font color for bar labels.

Type: String
Default Value: undefined

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, bar labels are colored in 'darkseagreen' using the font | color option.

<div id="barGaugeContainer" style="height:400px;max-width:500px;margin:0px auto"></div>
$(function () {
    $("#barGaugeContainer").dxBarGauge({
        startValue: -50,
        endValue: 50,
        values: [4, -14.3, 42, 13, -29.1],
        palette: 'Ocean',
        label: {
            font: {
                color: 'darkseagreen'
            }
        }
    });
});

family

Specifies a font family for bar labels.

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 bar labels is changed.

<div id="barGaugeContainer" style="height:400px;max-width:500px;margin:0px auto"></div>
$(function () {
    $("#barGaugeContainer").dxBarGauge({
        startValue: -50,
        endValue: 50,
        values: [4, -14.3, 42, 13, -29.1],
        palette: 'Violet',
        label: {
            font: {
                family: 'Zapf-Chancery, cursive'
            }
        }
    });
});

opacity

Specifies the opacity of the text displayed by bar labels.

Type: Number
Default Value: 1

Show Example:
jQuery

In this example, the opacity of the text displayed in bar labels is set to 0.8.

<div id="barGaugeContainer" style="height:400px;max-width:500px;margin:0px auto"></div>
$(function () {
    $("#barGaugeContainer").dxBarGauge({
        startValue: -50,
        endValue: 50,
        values: [4, -14.3, 42, 13, -29.1],
        palette: 'Ocean',
        label: {
            font: {
                opacity: 0.8
            }
        }
    });
});

size

Specifies a font size for bar labels.

Type: Number|String
Default Value: 16

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

Show Example:
jQuery

In this example, the font size of bar labels is changed to 20.

<div id="barGaugeContainer" style="height:400px;max-width:500px;margin:0px auto"></div>
$(function () {
    $("#barGaugeContainer").dxBarGauge({
        startValue: -50,
        endValue: 50,
        values: [4, -14.3, 42, 13, -29.1],
        label: {
            font: {
                size: 20
            }
        }
    });
});

weight

Specifies a font weight for bar labels.

Type: Number
Default Value: 400

Show Example:
jQuery

In this example, the font weight of bar labels is changed to 700.

<div id="barGaugeContainer" style="height:400px;max-width:500px;margin:0px auto"></div>
$(function () {
    $("#barGaugeContainer").dxBarGauge({
        startValue: -50,
        endValue: 50,
        values: [4, -14.3, 42, 13, -29.1],
        palette: 'Bright',
        label: {
            font: {
                weight: 700
            }
        }
    });
});