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/11/15 11:42:55 UTC
[echarts-examples] branch gh-pages updated: tweak `map-usa-pie` example
This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git
The following commit(s) were added to refs/heads/gh-pages by this push:
new d474d8ea tweak `map-usa-pie` example
d474d8ea is described below
commit d474d8ea7962fcfc879a4346c57266a068558877
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Tue Nov 15 19:42:09 2022 +0800
tweak `map-usa-pie` example
---
public/examples/ts/map-usa-pie.ts | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/public/examples/ts/map-usa-pie.ts b/public/examples/ts/map-usa-pie.ts
index 743921d6..cf46ea14 100644
--- a/public/examples/ts/map-usa-pie.ts
+++ b/public/examples/ts/map-usa-pie.ts
@@ -28,7 +28,7 @@ $.get(ROOT_PATH + '/data/asset/geo/USA.json', function (usaJson) {
});
function randomPieSeries(
- center: number[],
+ center: string | number[],
radius: number
): echarts.PieSeriesOption {
const data = ['A', 'B', 'C', 'D'].map((t) => {
@@ -69,7 +69,15 @@ $.get(ROOT_PATH + '/data/asset/geo/USA.json', function (usaJson) {
series: [
randomPieSeries([-86.753504, 33.01077], 15),
randomPieSeries([-116.853504, 39.8], 25),
- randomPieSeries([-99, 31.5], 30)
+ randomPieSeries([-99, 31.5], 30),
+ randomPieSeries(
+ // it's also supported to use geo region name as center since v5.4.1
+ +echarts.version.split('.').slice(0, 3).join('') > 540
+ ? 'Maine'
+ : // or you can only use the LngLat array
+ [-69, 45.5],
+ 12
+ )
]
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org