New to Kendo UI for jQuery? Start a free 30-day trial

Series.notes.label

configuration

The label of the notes.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "line",
    series: [{
        data: [10, 15, 8, 12],
        notes: {
            data: [{
                value: 15,
                text: "Peak Value"
            }],
            label: {
                background: "yellow",
                color: "black",
                font: "12px Arial"
            }
        }
    }]
});
</script>

The background color of the label. Accepts a valid CSS color string, including hex and rgb.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "line",
    series: [{
        data: [10, 15, 8, 12],
        notes: {
            data: [{
                value: 15,
                text: "Peak Value"
            }],
            label: {
                background: "lightgreen"
            }
        }
    }]
});
</script>

The border of the label.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "line",
    series: [{
        data: [10, 15, 8, 12],
        notes: {
            data: [{
                value: 15,
                text: "Peak Value"
            }],
            label: {
                border: {
                    color: "red",
                    width: 2,
                    dashType: "solid"
                }
            }
        }
    }]
});
</script>

The text color of the label. Accepts a valid CSS color string, including hex and rgb.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "line",
    series: [{
        data: [10, 15, 8, 12],
        notes: {
            data: [{
                value: 15,
                text: "Peak Value"
            }],
            label: {
                color: "blue"
            }
        }
    }]
});
</script>

The font style of the label.

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

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "line",
    series: [{
        data: [10, 15, 8, 12],
        notes: {
            data: [{
                value: 15,
                text: "Peak Value"
            }],
            label: {
                font: "16px Arial, sans-serif"
            }
        }
    }]
});
</script>

The format used to display the notes label. Uses kendo.format. Contains one placeholder ("{0}") which represents the axis value.

Default: "{0}"

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "line",
    series: [{
        data: [10, 15, 8, 12],
        notes: {
            data: [{
                value: 15,
                text: "Peak Value"
            }],
            label: {
                format: "Value: {0}"
            }
        }
    }]
});
</script>

The position of the labels.

  • "inside" - the label is positioned inside of the icon.
  • "outside" - the label is positioned outside of the icon.

Default: "inside"

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "line",
    series: [{
        data: [10, 15, 8, 12],
        notes: {
            data: [{
                value: 15,
                text: "Peak Value"
            }],
            label: {
                position: "outside"
            }
        }
    }]
});
</script>

The rotation angle of the label. By default the label are not rotated.

Default: 0

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "line",
    series: [{
        data: [10, 15, 8, 12],
        notes: {
            data: [{
                value: 15,
                text: "Peak Value"
            }],
            label: {
                rotation: 45
            }
        }
    }]
});
</script>

The template which renders the labels.

The fields which can be used in the template are:

  • value - the point value
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "line",
    series: [{
        data: [10, 15, 8, 12],
        notes: {
            data: [{
                value: 15,
                text: "Peak Value"
            }],
            label: {
                template: (data) => `Value: ${data.value}`
            }
        }
    }]
});
</script>

If set to true the chart will display the series notes label. By default the series notes label are visible.

Default: true

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "line",
    series: [{
        data: [10, 15, 8, 12],
        notes: {
            data: [{
                value: 15,
                text: "Peak Value"
            }],
            label: {
                visible: false
            }
        }
    }]
});
</script>