You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2021/04/04 12:51:13 UTC

[echarts] 01/01: fix(line): ensure lineWidth is a number before addition in bolder logic, resolves #14591.

This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch fix-line-width
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit 995637ab18509c8454cf6730b00fb93b5b2830bb
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Sun Apr 4 20:48:23 2021 +0800

    fix(line): ensure lineWidth is a number before addition in bolder logic, resolves #14591.
---
 src/chart/line/LineView.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/chart/line/LineView.ts b/src/chart/line/LineView.ts
index 10b0b26..296e991 100644
--- a/src/chart/line/LineView.ts
+++ b/src/chart/line/LineView.ts
@@ -738,7 +738,7 @@ class LineView extends ChartView {
 
         if (polyline.style.lineWidth > 0 && seriesModel.get(['emphasis', 'lineStyle', 'width']) === 'bolder') {
             const emphasisLineStyle = polyline.getState('emphasis').style;
-            emphasisLineStyle.lineWidth = polyline.style.lineWidth + 1;
+            emphasisLineStyle.lineWidth = +polyline.style.lineWidth + 1;
         }
 
         // Needs seriesIndex for focus

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org