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

CategoryAxis.notes

configuration

The category axis notes configuration.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: {
    categories: ["Q1", "Q2", "Q3", "Q4"],
    notes: {
      position: "top",
      icon: {
        background: "red",
        size: 15
      },
      label: {
        text: "Note",
        position: "outside"
      },
      line: {
        dashType: "dash"
      }
    }
  },
  series: [
    { data: [1, 2, 3, 4] }
  ]
});
</script>

The items of the notes.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: {
    categories: ["Q1", "Q2", "Q3", "Q4"],
    notes: {
      data: [
        { value: "Q1", text: "First Quarter" },
        { value: "Q3", text: "Third Quarter" }
      ]
    }
  },
  series: [
    { data: [1, 2, 3, 4] }
  ]
});
</script>

The icon of the notes.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: {
    categories: ["Q1", "Q2", "Q3", "Q4"],
    notes: {
      icon: {
        background: "blue",
        border: {
          color: "red",
          width: 2
        },
        size: 20,
        type: "circle",
        visible: true
      }
    }
  },
  series: [
    { data: [1, 2, 3, 4] }
  ]
});
</script>

The label of the notes.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: {
    categories: ["Q1", "Q2", "Q3", "Q4"],
    notes: {
      label: {
        background: "lightblue",
        color: "darkblue",
        font: "14px Arial",
        template: (data) => `Value: ${data.value}`,
        visible: true,
        position: "outside"
      },
      data: [{ value: "Q2" }]
    }
  },
  series: [
    { data: [1, 2, 3, 4] }
  ]
});
</script>

The line of the notes.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: {
    categories: ["Q1", "Q2", "Q3", "Q4"],
    notes: {
      line: {
        color: "red",
        width: 3,
        dashType: "dash"
      },
      data: [{ value: "Q2" }]
    }
  },
  series: [
    { data: [1, 2, 3, 4] }
  ]
});
</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="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: {
    categories: ["Q1", "Q2", "Q3", "Q4"],
    notes: {
      position: "left",
      icon: {
        background: "green",
        size: 12
      },
      label: {
        text: "Important"
      }
    }
  },
  series: [
    { data: [1, 2, 3, 4] }
  ]
});
</script>

A function that can be used to create a custom visual for the notes. The available argument fields are:

  • rect - the kendo.geometry.Rect that defines the note target rect.
  • options - the note options.
  • createVisual - a function that can be used to get the default visual.
  • value - the note value.
<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      data: [1, 2, 3]
    }],
    categoryAxis: {
      notes: {
        data: [{
          value: 1
        }],
        visual: function (e) {
          var targetPoint = { x: e.rect.center().x, y: e.rect.origin.y };
          var line = new kendo.drawing.Path()
          .moveTo(targetPoint.x, targetPoint.y)
          .lineTo(targetPoint.x, targetPoint.y - 10);
          var circle = new kendo.drawing.Circle(new kendo.geometry.Circle([targetPoint.x, targetPoint.y - 30], 20), {
            fill: {
              color: "red"
            }
          });

          return new kendo.drawing.Group({
            zIndex: 1
          }).append(line, circle);
        }
      }
    }
  });
</script>