質問

Image Descriptionの入力 HTML5とKendo UIを使用してラインチャートに垂直線を描画する方法?誰もがこの問題を解決するために私を助けてくれることができますか?

役に立ちましたか?

解決

これを試してみてください:

// 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)
            }]
        }
    }
});
.

デモ: http://jsbin.com/obuweca/29/

他のヒント

Kendoのマニュアルは、チャート上のカスタム行をどのように描画するかの例です。水平と垂直方向。

http://docs.telerik。COM / KENDO-UI /コントロール/チャート/ハウツー/カスタムプロットバンド

ストロークを編集して行をカスタマイズできます。

 stroke: {
          color: "red",
          width: 1,
          dashType:"dash"
        }
.

列図を使用してみることもできます。

シリーズを拡張するだけです:

  series: [{
                type: "line",
                field: "value",
                categoryField: "date"
            },
            {
                type:"column", 
                field: "valueColumn", 
                gap: 300
            }]
.

とdatasource.data:ValueColumn。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top