You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by de...@apache.org on 2018/12/20 12:16:28 UTC
[incubator-echarts] branch master updated: fix(markLine): add
lineStyele.lineWidth fault tolerance
This is an automated email from the ASF dual-hosted git repository.
deqingli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/master by this push:
new e3e0a25 fix(markLine): add lineStyele.lineWidth fault tolerance
e3e0a25 is described below
commit e3e0a251befaf3e8e5a1255e0366fa17b1c3357d
Author: deqingli <an...@gmail.com>
AuthorDate: Thu Dec 20 20:15:56 2018 +0800
fix(markLine): add lineStyele.lineWidth fault tolerance
---
src/chart/helper/Line.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/chart/helper/Line.js b/src/chart/helper/Line.js
index f1670e6..2d7f080 100644
--- a/src/chart/helper/Line.js
+++ b/src/chart/helper/Line.js
@@ -217,8 +217,9 @@ lineProto.beforeUpdate = updateSymbolAndLabelBeforeLineUpdate;
lineProto._createLine = function (lineData, idx, seriesScope) {
var seriesModel = lineData.hostModel;
var linePoints = lineData.getItemLayout(idx);
- var lineStyle = seriesScope && seriesScope.lineStyle;
- var line = createLine(linePoints, lineStyle.lineWidth);
+ var lineStyle = seriesScope.lineStyle;
+ var lineWidth = lineStyle && lineStyle.lineWidth;
+ var line = createLine(linePoints, lineWidth);
line.shape.percent = 0;
graphic.initProps(line, {
shape: {
@@ -253,9 +254,10 @@ lineProto.updateData = function (lineData, idx, seriesScope) {
var target = {
shape: {}
};
- var lineStyle = seriesScope && seriesScope.lineStyle;
+ var lineStyle = seriesScope.lineStyle;
+ var lineWidth = lineStyle && lineStyle.lineWidth;
- setLinePoints(target.shape, linePoints, lineStyle.lineWidth);
+ setLinePoints(target.shape, linePoints, lineWidth);
graphic.updateProps(line, target, seriesModel, idx);
zrUtil.each(SYMBOL_CATEGORIES, function (symbolCategory) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org