From cfba5957329197c7760e8894dc604bbb5d33bf9f Mon Sep 17 00:00:00 2001 From: gvreddy04 Date: Wed, 25 Feb 2026 12:30:52 +0530 Subject: [PATCH] #22: Fix lineWidth typo and adjust ctx.restore() placement Corrected 'ctx.linewidth' to 'ctx.lineWidth' to properly set line width in Canvas context. Moved 'ctx.restore()' to after both drawing operations to ensure context is restored at the appropriate time. --- BlazorExpress.ChartJS/wwwroot/blazorexpress.chartjs.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/BlazorExpress.ChartJS/wwwroot/blazorexpress.chartjs.js b/BlazorExpress.ChartJS/wwwroot/blazorexpress.chartjs.js index 794b9b38..c8746fd6 100644 --- a/BlazorExpress.ChartJS/wwwroot/blazorexpress.chartjs.js +++ b/BlazorExpress.ChartJS/wwwroot/blazorexpress.chartjs.js @@ -547,18 +547,17 @@ window.blazorexpress.chartjs.line = { ctx.setLineDash([5, 5]); ctx.moveTo(activePoint.element.x, chart.chartArea.top); ctx.lineTo(activePoint.element.x, activePoint.element.y); - ctx.linewidth = 2; + ctx.lineWidth = 2; ctx.strokeStyle = 'grey'; ctx.stroke(); - ctx.restore(); ctx.beginPath(); - ctx.setLineDash([5, 5]); ctx.moveTo(activePoint.element.x, activePoint.element.y); ctx.lineTo(activePoint.element.x, chart.chartArea.bottom); - ctx.linewidth = 2; + ctx.lineWidth = 2; ctx.strokeStyle = 'grey'; ctx.stroke(); + ctx.restore(); } },