kendo 图表更改了同一系列的单个标记类型

kendo chart change individual markers type on the same series

有没有办法将不同的标记类型(圆形、方形、三角形等)分配给同一系列的特定数据点? (我用的是散点图)

我知道可以用颜色来完成: Assigning specific color to each data point example

您还可以更改整个系列的类型:example

但我需要在同一条线上至少有两种不同的类型(圆形和三角形)

欢迎任何建议,谢谢

您可以使用系列标记的visual property来绘制您想要的形状例如:

series: [{
  type: "line",
  markers: {
    visual: function (e) {
      var origin = e.rect.origin;
      var center = e.rect.center();
      var bottomRight = e.rect.bottomRight();

      if (e.value < 2){
        return e.createVisual();
      } else {
        var path = new kendo.drawing.Path({
          stroke: {color: e.options.border.color, width: 2},
          fill: { color: "white" }
        })
        .moveTo(origin.x, bottomRight.y)
        .lineTo(bottomRight.x, bottomRight.y)
        .lineTo(center.x, origin.y)
        .close();

        return path;
      }
    }
}

DEMO