yAxis.notes.visual Function

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.

Example - use custom visual for the notes

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    yAxis: {
      notes: {
        data: [{
          value: 1.3,
          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>
In this article