Skip to content

Commit c403fa3

Browse files
authored
Fix lineWidth typo and adjust ctx.restore() placement (#1269)
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 c403fa3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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)