2016-07-07 303 views

回答

1

我發現了一個在Chart.js GitHub root page稱爲Chart.Annotations.js插件。這是正是我需要的!

您需要將以下屬性添加到你的選擇對象添加一個註釋:每行屬性,你想畫在我來說,我有2

annotation: { 
annotations: [{ 
    type:'line', 
    mode:'horizontal', 
    scaleID:'y-axis-1', 
    value:'10', 
    borderColor:'#000000', 
    borderWidth:2 
}] 
} 

看看這張截圖我最終實現的: enter image description here