Skip to content

Commit 86ae288

Browse files
committed
Fix lineWidth typo and adjust ctx.restore() placement
Corrected canvas context property from linewidth to lineWidth for proper line rendering. Moved ctx.restore() to after both drawing operations to ensure canvas state is restored correctly.
1 parent 8af5786 commit 86ae288

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

blazorbootstrap/wwwroot/blazor.bootstrap.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,18 +1423,17 @@ window.blazorChart.line = {
14231423
ctx.setLineDash([5, 5]);
14241424
ctx.moveTo(activePoint.element.x, chart.chartArea.top);
14251425
ctx.lineTo(activePoint.element.x, activePoint.element.y);
1426-
ctx.linewidth = 2;
1426+
ctx.lineWidth = 2;
14271427
ctx.strokeStyle = 'grey';
14281428
ctx.stroke();
1429-
ctx.restore();
14301429

14311430
ctx.beginPath();
1432-
ctx.setLineDash([5, 5]);
14331431
ctx.moveTo(activePoint.element.x, activePoint.element.y);
14341432
ctx.lineTo(activePoint.element.x, chart.chartArea.bottom);
1435-
ctx.linewidth = 2;
1433+
ctx.lineWidth = 2;
14361434
ctx.strokeStyle = 'grey';
14371435
ctx.stroke();
1436+
14381437
ctx.restore();
14391438
}
14401439
},

0 commit comments

Comments
 (0)