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

Scale.labels

configuration

Configures the scale labels.

<div id="gauge"></div>
<script>
$("#gauge").kendoArcGauge({
    value: 65,
    scale: {
        labels: {
            color: "#0058e9",
            font: "14px Arial",
            background: "#f0f0f0"
        }
    }
});
</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").kendoArcGauge({
    value: 65,
    scale: {
        labels: {
            background: "#ffffe0"
        }
    }
});
</script>

The border of the labels.

<div id="gauge"></div>
<script>
$("#gauge").kendoArcGauge({
    value: 65,
    scale: {
        labels: {
            border: {
                color: "#37b400",
                width: 2,
                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").kendoArcGauge({
    value: 65,
    scale: {
        labels: {
            color: "#37b400"
        }
    }
});
</script>

The font style of the labels.

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

<div id="gauge"></div>
<script>
$("#gauge").kendoArcGauge({
    value: 65,
    scale: {
        labels: {
            font: "16px Verdana"
        }
    }
});
</script>

The format of the labels.

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

The margin of the labels.

Default: 0

<div id="gauge"></div>
<script>
$("#gauge").kendoArcGauge({
    value: 65,
    scale: {
        labels: {
            margin: 10
        }
    }
});
</script>
Number | Object

The padding of the labels.

Default: 0

<div id="gauge"></div>
<script>
$("#gauge").kendoArcGauge({
    value: 65,
    scale: {
        labels: {
            padding: 8
        }
    }
});
</script>

The labels positions.

"inside"

The labels are positioned inside.

"outside"

The labels are positioned outside.

Default: "inside"

<div id="gauge"></div>
<script>
$("#gauge").kendoArcGauge({
    value: 65,
    scale: {
        labels: {
            position: "outside",
            visible: true
        }
    }
});
</script>

scale.labels.template

String|Function

The label template. Template variables:

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

The visibility of the labels.

Default: false

<div id="gauge"></div>
<script>
$("#gauge").kendoArcGauge({
    value: 65,
    scale: {
        labels: {
            visible: true
        }
    }
});
</script>