![](/img/trans.png)
[英]chart.js: hide specific ticks in y-axis and hide all x-axis grid line
[英]Plugin for custom horizontal line Y-axis marker on grid of a Line chart with Chart.js
我在Chart.js GitHub根頁面上找到了一個名為Chart.Annotations.js的插件。 這正是我所需要的!
您需要將以下屬性添加到選項對象。 在要繪制的每行上添加一個注解:屬性。 就我而言,我有2。
annotation: {
annotations: [{
type:'line',
mode:'horizontal',
scaleID:'y-axis-1',
value:'10',
borderColor:'#000000',
borderWidth:2
}]
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.