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

ValueAxis.notes

configuration

The value axis notes configuration.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "column",
    valueAxis: {
        notes: {
            position: "left",
            icon: {
                background: "red"
            },
            data: [{
                value: 15,
                text: "Target"
            }]
        }
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

The items of the notes.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [10, 15, 8, 12, 18, 6, 14],
    valueAxis: {
        notes: {
            data: [
                { value: 8, icon: { background: "red" } },
                { value: 18, icon: { background: "green" } },
                { value: 6, icon: { background: "orange" } }
            ]
        }
    }
});
</script>

The icon of the notes.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [10, 15, 8, 12, 18, 6, 14],
    valueAxis: {
        notes: {
            icon: {
                background: "lightblue",
                border: {
                    color: "blue",
                    width: 2
                }
            },
            data: [{ value: 12 }]
        }
    }
});
</script>

The label of the notes.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "column",
    valueAxis: {
        notes: {
            data: [{
                value: 15,
                text: "Target"
            }],
            label: {
                background: "#ffff00",
                color: "#000000",
                position: "outside"
            }
        }
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

The line of the notes.

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

The position of the value axis note.

  • "top" - The note is positioned on the top.
  • "bottom" - The note is positioned on the bottom.
  • "left" - The note is positioned on the left.
  • "right" - The note is positioned on the right.
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "column",
    valueAxis: {
        notes: {
            position: "top",
            data: [{
                value: 15,
                text: "Peak"
            }]
        }
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>