'Is it possible to set top border on ChartJS Doughnut Gauge chart
Target Doughnut gauge with green top border:
Example Doughnut gauge: https://codesandbox.io/s/jlonjk9zv5
The question: Is it possible to implement abovementioned top green border on given example Doughnut gauge?
Thanks.
Solution 1:[1]
In your example, you're using the really old version 2.7.3 of Chart.js. With this version, it is probably not possible to do what you're looking for. You should first upgrade Chart.js (current latest version is 3.7.1).
In order to make the fewest changes to your code, I updated the version to 2.9.4 (latest available 2.n version) and simply added a second dataset with a lower weight
than the base dataset.
Please take a look at your amended code here at CodeSandbox and see how it works.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | uminder |