From 42ba17f8b01ef39a1afc29b8422a4bd0b9b584f0 Mon Sep 17 00:00:00 2001 From: plainheart Date: Tue, 23 Jun 2020 11:35:01 +0800 Subject: [PATCH] fix(lines): lines series shouldn't disappear after `setOption({})`, fix apache#12836. --- src/chart/lines/LinesSeries.js | 4 +- test/lines-mergeOption.html | 103 +++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 3 deletions(-) create mode 100644 test/lines-mergeOption.html diff --git a/src/chart/lines/LinesSeries.js b/src/chart/lines/LinesSeries.js index 047f0b6c17..e66098f87a 100644 --- a/src/chart/lines/LinesSeries.js +++ b/src/chart/lines/LinesSeries.js @@ -80,8 +80,6 @@ var LinesSeries = SeriesModel.extend({ }, mergeOption: function (option) { - // The input data may be null/undefined. - option.data = option.data || []; compatEc2(option); @@ -333,4 +331,4 @@ var LinesSeries = SeriesModel.extend({ } }); -export default LinesSeries; \ No newline at end of file +export default LinesSeries; diff --git a/test/lines-mergeOption.html b/test/lines-mergeOption.html new file mode 100644 index 0000000000..67aaabdd88 --- /dev/null +++ b/test/lines-mergeOption.html @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + +
+ + + + +