* Fix drawing angle lines on reversed radial scale
* add test
* Show ticks in test
---------
Co-authored-by: Jacco van den Berg <jacco@jem-id.nl>
ctx.setLineDash(optsAtIndex.borderDash);
ctx.lineDashOffset = optsAtIndex.borderDashOffset;
- offset = this.getDistanceFromCenterForValue(opts.ticks.reverse ? this.min : this.max);
+ offset = this.getDistanceFromCenterForValue(opts.reverse ? this.min : this.max);
position = this.getPointPosition(i, offset);
ctx.beginPath();
ctx.moveTo(this.xCenter, this.yCenter);
--- /dev/null
+module.exports = {
+ config: {
+ type: 'radar',
+ data: {
+ labels: ['A', 'B', 'C', 'D', 'E'],
+ datasets: [{
+ data: [1, 1, 2, 3, 5]
+ }]
+ },
+ options: {
+ responsive: false,
+ scales: {
+ r: {
+ reverse: true,
+ grid: {
+ display: true,
+ },
+ angleLines: {
+ color: 'red',
+ lineWidth: 5,
+ },
+ pointLabels: {
+ display: false
+ },
+ ticks: {
+ display: true,
+ }
+ }
+ }
+ }
+ },
+ options: {
+ spriteText: true,
+ }
+};