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 2022/08/04 07:53:58 UTC
[echarts] branch improve-pie-performance created (now 77ee2a1cc)
This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a change to branch improve-pie-performance
in repository https://gitbox.apache.org/repos/asf/echarts.git
at 77ee2a1cc test(pie): tweak pie-percent case - add time log, percentPrecision & label formatter.
This branch includes the following new commits:
new 77ee2a1cc test(pie): tweak pie-percent case - add time log, percentPrecision & label formatter.
The 1 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] 01/01: test(pie): tweak pie-percent case - add time log, percentPrecision & label formatter.
Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch improve-pie-performance
in repository https://gitbox.apache.org/repos/asf/echarts.git
commit 77ee2a1ccb1f2bf8de7f2f9cf71b4a22deb93a09
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Thu Aug 4 15:51:48 2022 +0800
test(pie): tweak pie-percent case - add time log, percentPrecision & label formatter.
---
test/pie-percent.html | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/test/pie-percent.html b/test/pie-percent.html
index 9bbe0aa42..06372ba5a 100644
--- a/test/pie-percent.html
+++ b/test/pie-percent.html
@@ -46,9 +46,7 @@ under the License.
<script>
require([
- 'echarts',
- // 'map/js/china',
- // './data/nutrients.json'
+ 'echarts'
], function (echarts) {
var option;
var data = [];
@@ -62,17 +60,27 @@ under the License.
series: {
type: 'pie',
data: data,
+ percentPrecision: 5,
+ label: {
+ formatter: '{b} {d}%'
+ }
}
};
var chart = testHelper.create(echarts, 'main0', {
title: [
'Test Pie performance'
- ],
- option: option
- // height: 300,
- // buttons: [{text: 'btn-txt', onclick: function () {}}],
- // recordCanvas: true,
+ ]
+ });
+
+ var startTs = performance.now();
+ chart.setOption(option);
+
+ chart.on('finished', function () {
+ var endTs = performance.now();
+ var time = endTs - startTs;
+ console.log('Finished in ' + time + 'ms');
+ startTs = endTs;
});
});
</script>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org