You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/07/06 12:21:16 UTC
[echarts] 02/02: test: optimize test cases for universal transition
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch fix-universal-transition
in repository https://gitbox.apache.org/repos/asf/echarts.git
commit f96ac55aa62d8f83985572713d37209754d17e9c
Author: pissang <bm...@gmail.com>
AuthorDate: Tue Jul 6 20:20:10 2021 +0800
test: optimize test cases for universal transition
---
src/model/Series.ts | 1 +
test/runTest/actions/universalTransition2.json | 2 +-
test/universalTransition2.html | 24 +++++++++++++++++-------
3 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/src/model/Series.ts b/src/model/Series.ts
index 1972ca7..9ee54c8 100644
--- a/src/model/Series.ts
+++ b/src/model/Series.ts
@@ -541,6 +541,7 @@ class SeriesModel<Opt extends SeriesOption = SeriesOption> extends ComponentMode
return true;
}
+ // NOTE: don't support define universalTransition in global option yet.
const universalTransitionOpt = this.option.universalTransition;
// Quick reject
if (!universalTransitionOpt) {
diff --git a/test/runTest/actions/universalTransition2.json b/test/runTest/actions/universalTransition2.json
index cdc7262..9e746cd 100644
--- a/test/runTest/actions/universalTransition2.json
+++ b/test/runTest/actions/universalTransition2.json
@@ -1 +1 @@
-[{"name":"Action 1","ops":[{"type":"mousedown","time":472,"x":221,"y":267},{"type":"mouseup","time":561,"x":221,"y":267},{"time":562,"delay":100,"type":"screenshot-auto"},{"type":"mousemove","time":1020,"x":220,"y":266},{"type":"mousemove","time":1220,"x":72,"y":121},{"type":"mousemove","time":1420,"x":65,"y":106},{"type":"mousemove","time":1625,"x":68,"y":90},{"type":"mousemove","time":1855,"x":68,"y":90},{"type":"mousedown","time":2046,"x":68,"y":90},{"type":"mouseup","time":2124,"x":6 [...]
\ No newline at end of file
+[{"name":"Action 1","ops":[{"type":"mousedown","time":442,"x":233,"y":291},{"type":"mouseup","time":541,"x":233,"y":291},{"time":542,"delay":100,"type":"screenshot-auto"},{"type":"mousemove","time":796,"x":232,"y":291},{"type":"mousemove","time":1001,"x":113,"y":115},{"type":"mousemove","time":1212,"x":99,"y":92},{"type":"mousemove","time":1412,"x":93,"y":92},{"type":"mousemove","time":1615,"x":87,"y":91},{"type":"mousedown","time":1824,"x":83,"y":90},{"type":"mousemove","time":1834,"x": [...]
\ No newline at end of file
diff --git a/test/universalTransition2.html b/test/universalTransition2.html
index 860ce29..ef3a998 100644
--- a/test/universalTransition2.html
+++ b/test/universalTransition2.html
@@ -149,9 +149,13 @@ under the License.
fontSize: 18
},
onclick() {
- chart.setOption(option);
+ chart.setOption(option, {
+ replaceMerge: ['xAxis', 'yAxis']
+ });
}
}]
+ }, {
+ replaceMerge: ['xAxis', 'yAxis']
});
}
});
@@ -416,21 +420,27 @@ under the License.
yAxis: {
scale: true
},
- universalTransition: {
- enabled: true,
- delay(idx, count) {
- return (idx / count) * 1000;
- }
- },
series: [{
type: 'scatter',
id: 'female',
dataGroupId: 'female',
+ universalTransition: {
+ enabled: true,
+ delay(idx, count) {
+ return (idx / count) * 1000;
+ }
+ },
data: femaleData
}, {
type: 'scatter',
id: 'male',
dataGroupId: 'male',
+ universalTransition: {
+ enabled: true,
+ delay(idx, count) {
+ return (idx / count) * 1000;
+ }
+ },
data: maleDeta
}]
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org