Acceptable Range Highlighting of Background in Chart.js 2.0

前端 未结 5 1003
小鲜肉
小鲜肉 2020-12-30 07:13

I\'m working on building a simple line chart using Chart.js (the 2.0.2 beta) and I\'d like to highlight a particular range of the chart\'s background to highlight an \"accep

5条回答
  •  梦谈多话
    2020-12-30 08:12

    Chart.js v2.0.2 doesn't provide this functionality out of the box.

    You can however extend or create new type constructors. See http://www.chartjs.org/docs/#advanced-usage-extending-existing-chart-types.

    You should be able to implement either an area type that is bounded by two lines, or you could create a threshold band similar to xnakos answer.

提交回复
热议问题