I am using ChartJS to generate a radar chart.
I wish for the last gridLine (the outermost) to remain solid, while all the others are dashed.
Picture example:
I've seen that it is possible to have varying borderDash in this pull request which also shows an image of it in action but have yet to find a way to script it. (edit: it seems that the linked pull request has made it onto master, planned for release with V3.0 - meaning it is not yet available(?))
Quick example code of a script:
scale: {
gridLines: {
borderDash: function(context) {
return context.index % 2 === 0 ? [2, 3] : [10, 10];
},
},
You can already use Chart.js version 3, it's available as Chart.js 3.0.0-beta.
Simply add the following
script
tag to yourHTML
page.Please take a look at the following code snippet and see how it works.