New to Kendo UI for jQueryStart a free 30-day trial

Scale.labels

configuration

Configures the scale labels.

<div id="gauge"></div>
<script>
$("#gauge").kendoRadialGauge({
    pointer: [{
        value: 25
    }],
    scale: {
        labels: {
            color: "#333333",
            font: "14px Arial",
            visible: true,
            position: "outside"
        }
    }
});
</script>

The background color of the labels. Any valid CSS color string will work here, including hex and rgb

<div id="gauge"></div>
<script>
$("#gauge").kendoRadialGauge({
    pointer: [{
        value: 55
    }],
    scale: {
        labels: {
            background: "#ffffcc"
        }
    }
});
</script>

The border of the labels.

<div id="gauge"></div>
<script>
$("#gauge").kendoRadialGauge({
    pointer: [{
        value: 80
    }],
    scale: {
        labels: {
            border: {
                color: "#999999",
                width: 1,
                dashType: "solid"
            }
        }
    }
});
</script>

The text color of the labels. Any valid CSS color string will work here, including hex and rgb.

<div id="gauge"></div>
<script>
$("#gauge").kendoRadialGauge({
    pointer: [{
        value: 50
    }],
    scale: {
        labels: {
            color: "#0066cc"
        }
    }
});
</script>

The font style of the labels.

Default: "12px Arial,Helvetica,sans-serif"

<div id="gauge"></div>
<script>
$("#gauge").kendoRadialGauge({
    pointer: [{
        value: 35
    }],
    scale: {
        labels: {
            font: "16px 'Arial Black'"
        }
    }
});
</script>

The format of the labels.

<div id="gauge"></div>
<script>
$("#gauge").kendoRadialGauge({
    renderAs: "canvas",
    pointer: {
    value: 50
    },
    scale: {
    min: 0,
    max: 100,
    labels: {
        // set the format to currency
        format: "C"
    }
    }
});
</script>
Number|Object

The margin of the labels.

Default: 0

<div id="gauge"></div>
<script>
$("#gauge").kendoRadialGauge({
    pointer: [{
        value: 65
    }],
    scale: {
        labels: {
            margin: {
                top: 10,
                bottom: 5,
                left: 8,
                right: 8
            }
        }
    }
});
</script>
Number | Object

The padding of the labels.

Default: 0

<div id="gauge"></div>
<script>
$("#gauge").kendoRadialGauge({
    pointer: [{
        value: 55
    }],
    scale: {
        labels: {
            padding: {
                top: 8,
                bottom: 8,
                left: 10,
                right: 10
            }
        }
    }
});
</script>

The labels positions.

"inside"

The labels are positioned inside.

"outside"

The labels are positioned outside.

Default: "inside"

<div id="gauge"></div>
<script>
$("#gauge").kendoRadialGauge({
    pointer: [{
        value: 65
    }],
    scale: {
        labels: {
            position: "outside"
        }
    }
});
</script>

scale.labels.template

String|Function

The label template. Template variables:

  • value - the value
<div id="gauge"></div>
<script>
$("#gauge").kendoRadialGauge({
    renderAs: "canvas",
    pointer: {
    value: 50
    },
    scale: {
    min: 0,
    max: 100,
    labels: {
        // set the format to currency
        template: "#= value #%"
    }
    }
});
</script>

The visibility of the labels.

Default: true

<div id="gauge"></div>
<script>
$("#gauge").kendoRadialGauge({
    pointer: [{
        value: 40
    }],
    scale: {
        labels: {
            visible: false
        }
    }
});
</script>