series.legendItem.highlight.markers.visualFunction

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

  • rect - the kendo.geometry.Rect that defines where the visual should be rendered.
  • options - the marker options.
  • createVisual - a function that can be used to get the default visual.
  • category - the category of the marker point.
  • dataItem - the dataItem of the marker point.
  • value - the value of the marker point.
  • sender - the chart instance.
  • series - the series of the marker point.

Example - use custom visual for the legend item highlight markers

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: "line",
    name: "Series A",
    data: [1, 2, 3],
    legendItem: {
      highlight: {
        markers: {
          visual: function(e) {
            var rect = new kendo.geometry.Rect([0, 0], [10, 10]);
            var path = kendo.drawing.Path.fromRect(rect, {
              fill: { color: "red" },
              stroke: { color: "black" }
            });
            return path;
          }
        }
      }
    }
  }]
});
</script>