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

CategoryAxis.notes

configuration

The category axis notes configuration.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        notes: {
            position: "top",
            icon: {
                background: "red",
                size: 10
            },
            label: {
                text: "Important note"
            },
            data: [{
                value: "Q2",
                text: "Peak quarter"
            }]
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

The items of the notes.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [1, 2, 3, 4, 5, 4, 3, 2],
    categoryAxis: {
        notes: {
            data: [{
                value: "Q1",
                text: "First Quarter"
            }, {
                value: "Q3", 
                text: "Third Quarter"
            }]
        }
    }
});
</script>

The icon of the notes.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [1, 2, 3, 4, 5, 4, 3, 2],
    categoryAxis: {
        notes: {
            data: [{
                value: "Q2",
                text: "Q2 Note"
            }],
            icon: {
                background: "red",
                type: "circle",
                size: 15
            }
        }
    }
});
</script>

The label of the notes.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [1, 2, 3, 4, 5, 4, 3, 2],
    categoryAxis: {
        notes: {
            data: [{
                value: "Q2",
                text: "Q2 Label Note"
            }],
            label: {
                background: "yellow",
                color: "black",
                visible: true
            }
        }
    }
});
</script>

The line of the notes.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    data: [1, 2, 3, 4, 5, 4, 3, 2],
    categoryAxis: {
        notes: {
            data: [{
                value: "Q2",
                text: "Q2 Note"
            }],
            line: {
                width: 3,
                color: "blue",
                length: 20
            }
        }
    }
});
</script>

The position of the category 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({
    categoryAxis: {
        notes: {
            position: "bottom",
            data: [{
                value: "Q2",
                text: "Bottom note"
            }]
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>