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

ValueAxis.notes

configuration

The value axis notes configuration.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: [{
    notes: {
      position: "top",
      data: [{
        value: 5,
        text: "Important value"
      }]
    }
  }],
  series: [
    { data: [1, 2, 3, 4, 5, 6] }
  ]
});
</script>

The items of the notes.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: [{
    notes: {
      data: [{
        value: 2,
        text: "First note"
      }, {
        value: 4,
        text: "Second note"
      }]
    }
  }],
  series: [
    { data: [1, 2, 3, 4, 5] }
  ]
});
</script>

The icon of the notes.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: [{
    notes: {
      icon: {
        background: "red",
        size: 20
      },
      data: [{
        value: 4,
        text: "Custom icon"
      }]
    }
  }],
  series: [
    { data: [1, 2, 3, 4, 5] }
  ]
});
</script>

The label of the notes.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: [{
    notes: {
      label: {
        background: "yellow",
        color: "black",
        font: "bold 14px Arial"
      },
      data: [{
        value: 3,
        text: "Styled label"
      }]
    }
  }],
  series: [
    { data: [1, 2, 3, 4, 5] }
  ]
});
</script>

The line of the notes.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: [{
    notes: {
      line: {
        color: "red",
        width: 3,
        dashType: "dash"
      },
      data: [{
        value: 3,
        text: "Custom line"
      }]
    }
  }],
  series: [
    { data: [1, 2, 3, 4, 5] }
  ]
});
</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="chart"></div>
<script>
$("#chart").kendoChart({
  valueAxis: [{
    notes: {
      position: "left",
      data: [{
        value: 3,
        text: "Note on left"
      }]
    }
  }],
  series: [
    { data: [1, 2, 3, 4, 5] }
  ]
});
</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]
    }],
    valueAxis: {
      notes: {
        data: [{
          value: 1
        }],
        visual: function (e) {
          var targetPoint = { x: e.rect.origin.x, y: e.rect.center().y };
          var line = new kendo.drawing.Path()
          .moveTo(targetPoint.x, targetPoint.y)
          .lineTo(targetPoint.x + 10, targetPoint.y);
          var circle = new kendo.drawing.Circle(new kendo.geometry.Circle([targetPoint.x + 30, targetPoint.y], 20), {
            fill: {
              color: "red"
            }
          });

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