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/06/05 14:42:40 UTC
[echarts] branch fix-lines-clear created (now 757350c)
This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a change to branch fix-lines-clear
in repository https://gitbox.apache.org/repos/asf/echarts.git.
at 757350c fix(lint): remove unused import `DISPLAY_STATES` in `LineView.ts` to resolves the maxlen lint error, brought by #15072.
This branch includes the following new commits:
new 65b6455 fix(lines): fix lines can't be cleared by `chart.clear()`. - fix #4206 - fix #8225 - fix #8226 - fix #10828 - fix #13428 - fix #13725
new eb0c794 test(lines): add test case for clearing lines.
new 757350c fix(lint): remove unused import `DISPLAY_STATES` in `LineView.ts` to resolves the maxlen lint error, brought by #15072.
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[echarts] 02/03: test(lines): add test case for clearing lines.
Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch fix-lines-clear
in repository https://gitbox.apache.org/repos/asf/echarts.git
commit eb0c79412ae351b1664428faf9a230d284951a03
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Sat Jun 5 22:38:16 2021 +0800
test(lines): add test case for clearing lines.
---
test/lines-bus.html | 32 +++++++++++++++++++++-----------
test/runTest/actions/__meta__.json | 1 +
test/runTest/actions/lines-bus.json | 1 +
3 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/test/lines-bus.html b/test/lines-bus.html
index ac6989d..08dce49 100644
--- a/test/lines-bus.html
+++ b/test/lines-bus.html
@@ -39,9 +39,15 @@ under the License.
left: 10px;
top: 10px;
}
+ #clear2 {
+ position: absolute;
+ left: 10px;
+ top: 40px;
+ }
</style>
<div id='main'></div>
- <button id='clear'>Clear</button>
+ <button id='clear'>Clear(`chart.setOption`)</button>
+ <button id='clear2'>Clear(`chart.clear`)</button>
<script>
require([
@@ -246,15 +252,19 @@ under the License.
}]
});
- });
-
- document.getElementById('clear').addEventListener('click', function() {
- myChart.setOption({
- series: [{
- data: []
- }]
- });
- });
+ document.getElementById('clear').addEventListener('click', function() {
+ myChart.setOption({
+ series: [{
+ data: []
+ }, {
+ data: []
+ }]
+ });
+ });
+ document.getElementById('clear2').addEventListener('click', function() {
+ myChart.clear();
+ });
+ });
</script>
</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/test/runTest/actions/__meta__.json b/test/runTest/actions/__meta__.json
index 646e5d8..fa58c5b 100644
--- a/test/runTest/actions/__meta__.json
+++ b/test/runTest/actions/__meta__.json
@@ -108,6 +108,7 @@
"line-crash": 1,
"line-endLabel": 1,
"line-extraneous": 2,
+ "lines-bus": 1,
"map": 3,
"map-contour": 2,
"map-default": 1,
diff --git a/test/runTest/actions/lines-bus.json b/test/runTest/actions/lines-bus.json
new file mode 100644
index 0000000..52bb26d
--- /dev/null
+++ b/test/runTest/actions/lines-bus.json
@@ -0,0 +1 @@
+[{"name":"Action 1","ops":[{"type":"mousemove","time":355,"x":281,"y":183},{"type":"mousemove","time":579,"x":97,"y":93},{"type":"mousemove","time":781,"x":62,"y":57},{"type":"mousemove","time":1000,"x":62,"y":53},{"type":"mousedown","time":1249,"x":62,"y":53},{"type":"mouseup","time":1349,"x":62,"y":53},{"time":1350,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1630,"x":66,"y":53},{"type":"mousemove","time":1834,"x":260,"y":184},{"type":"mousedown","time":1935,"x":260 [...]
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[echarts] 03/03: fix(lint): remove unused import `DISPLAY_STATES`
in `LineView.ts` to resolves the maxlen lint error, brought by #15072.
Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch fix-lines-clear
in repository https://gitbox.apache.org/repos/asf/echarts.git
commit 757350c5fbcfb9bbc471baed4a46d291a53b8bfb
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Sat Jun 5 22:40:01 2021 +0800
fix(lint): remove unused import `DISPLAY_STATES` in `LineView.ts` to resolves the maxlen lint error, brought by #15072.
---
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 282ad3f..988460d 100644
--- a/src/chart/line/LineView.ts
+++ b/src/chart/line/LineView.ts
@@ -48,7 +48,7 @@ import type {
import type OrdinalScale from '../../scale/Ordinal';
import type Axis2D from '../../coord/cartesian/Axis2D';
import { CoordinateSystemClipArea, isCoordinateSystemType } from '../../coord/CoordinateSystem';
-import { setStatesStylesFromModel, setStatesFlag, enableHoverEmphasis, DISPLAY_STATES, SPECIAL_STATES } from '../../util/states';
+import { setStatesStylesFromModel, setStatesFlag, enableHoverEmphasis, SPECIAL_STATES } from '../../util/states';
import Model from '../../model/Model';
import {setLabelStyle, getLabelStatesModels, labelInner} from '../../label/labelStyle';
import {getDefaultLabel, getDefaultInterpolatedLabel} from '../helper/labelHelper';
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[echarts] 01/03: fix(lines): fix lines can't be cleared by
`chart.clear()`. - fix #4206 - fix #8225 - fix #8226 - fix #10828 - fix
#13428 - fix #13725
Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch fix-lines-clear
in repository https://gitbox.apache.org/repos/asf/echarts.git
commit 65b64550e5bb2ecb6cd51cbd60d4d09c5f70bca1
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Sat Jun 5 22:35:02 2021 +0800
fix(lines): fix lines can't be cleared by `chart.clear()`.
- fix #4206
- fix #8225
- fix #8226
- fix #10828
- fix #13428
- fix #13725
---
src/chart/lines/LinesView.ts | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/chart/lines/LinesView.ts b/src/chart/lines/LinesView.ts
index 72453c1..2afd397 100644
--- a/src/chart/lines/LinesView.ts
+++ b/src/chart/lines/LinesView.ts
@@ -212,8 +212,13 @@ class LinesView extends ChartView {
this._lineDraw = null;
// Clear motion when lineDraw is removed
this._clearLayer(api);
+ this.group.removeAll();
+ }
+
+ dispose(ecModel: GlobalModel, api: ExtensionAPI) {
+ this.remove(ecModel, api);
}
}
-export default LinesView;
\ No newline at end of file
+export default LinesView;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org