2017-06-05 39 views

回答

0

您可以使用visual property的系列标记画你想e.g形状:

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

+0

感谢很多应该做到这一点。我看到一个图像的例子,不知道形状可以创建。 任何机会,你有更多的形状选择除三角形以外的其他例子(如默认的'方','十字'提供的那些),我真的很感激它..如果不是这样没关系,我会找出 – Coto

+0

@科托,我手上没有形状,你必须画出它们。广场应该很容易:移动到顶角和线到每个角落。十字架,你可以画两条线,等等。 – ezanker