在kendo UI中如何在折线图中绘制垂直线

时间:2014-02-25 12:08:04

标签: kendo-ui kendo-grid kendo-mobile kendo-treeview

enter image description here如何使用Html5和kendo UI在折线图中绘制垂直线?任何人都可以帮我解决这个问题吗?

2 个答案:

答案 0 :(得分:3)

试试这个:

// let chart be the id
$("#chart").kendoChart({
     categoryAxis: {
         notes: {
             line: {
                 length: 300
             },
             data: [{
                 value: new Date(2012, 0, 3),
                 label: {
                     text: "-" //text you want to show
                 } 
             }]
         }
     }
 });

演示:http://jsbin.com/obuweca/26

/ *没有圆圈* /

$("#chart").kendoChart({
    categoryAxis: {
        notes: {
            line: {
                length: 300
            },
            icon: {
                border: {
                    width: 0
                }
            },
            // Initial notes
            data: [{
                value: new Date(2012, 0, 3)
            }]
        }
    }
});

DEMO:http://jsbin.com/obuweca/29/

答案 1 :(得分:1)

在kendo文档中,示例如何在图表上绘制自定义行。水平和垂直。

http://docs.telerik.com/kendo-ui/controls/charts/how-to/custom-plot-bands

您可以通过编辑笔划来自定义线条:

 stroke: {
          color: "red",
          width: 1,
          dashType:"dash"
        }
相关问题