Chart.js/test/fixtures/scale.radialLinear/gridlines-scriptable.js
Evert Timberg 6ac89cbb25
Rename scale gridLines options to be clearer (#8628)
* Rename `options.gridLines` to `options.grid`

* Rename `offsetGridLines` to `offset`
2021-03-13 19:49:09 +02:00

35 lines
729 B
JavaScript

module.exports = {
config: {
type: 'radar',
data: {
labels: ['A', 'B', 'C', 'D', 'E']
},
options: {
responsive: false,
scales: {
r: {
grid: {
display: true,
color: function(context) {
return context.index % 2 === 0 ? 'green' : 'red';
},
lineWidth: function(context) {
return context.index % 2 === 0 ? 5 : 1;
},
},
angleLines: {
color: 'rgba(255, 255, 255, 0.5)',
lineWidth: 2
},
pointLabels: {
display: false
},
ticks: {
display: false
}
}
}
}
}
};