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 2020/11/10 15:37:10 UTC
[incubator-echarts-examples] branch next updated: update examples.
update echarts version
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-examples.git
The following commit(s) were added to refs/heads/next by this push:
new e9ad6bf update examples. update echarts version
e9ad6bf is described below
commit e9ad6bf250e1ba1b21523d2d34bf7b5a12529864
Author: pissang <bm...@gmail.com>
AuthorDate: Tue Nov 10 23:30:45 2020 +0800
update examples. update echarts version
---
public/data/bar-rich-text.js | 4 +-
public/data/calendar-pie.js | 4 +-
public/data/custom-hexbin.js | 6 +-
public/data/sankey-itemstyle.js | 594 ++++++----------
public/data/scatter-nebula.js | 8 -
public/types/echarts.d.ts | 1456 +++++++++++++++++++++++++++++++++++----
src/common/config.js | 4 +-
src/editor/CodeMonaco.vue | 93 ++-
8 files changed, 1590 insertions(+), 579 deletions(-)
diff --git a/public/data/bar-rich-text.js b/public/data/bar-rich-text.js
index 2fa6a32..d0c35d4 100644
--- a/public/data/bar-rich-text.js
+++ b/public/data/bar-rich-text.js
@@ -13,9 +13,7 @@ var weatherIcons = {
};
var seriesLabel = {
- normal: {
- show: true
- }
+ show: true
}
option = {
diff --git a/public/data/calendar-pie.js b/public/data/calendar-pie.js
index 7edde6c..6097b0c 100644
--- a/public/data/calendar-pie.js
+++ b/public/data/calendar-pie.js
@@ -93,9 +93,7 @@ option = {
return echarts.format.formatTime('dd', params.value[0]);
},
offset: [-cellSize[0] / 2 + 10, -cellSize[1] / 2 + 10],
- textStyle: {
- fontSize: 14
- }
+ fontSize: 14
},
data: scatterData
}]
diff --git a/public/data/custom-hexbin.js b/public/data/custom-hexbin.js
index e67b496..0052228 100644
--- a/public/data/custom-hexbin.js
+++ b/public/data/custom-hexbin.js
@@ -196,10 +196,8 @@ $.when(
roam: true,
silent: true,
itemStyle: {
- normal: {
- color: backgroundColor,
- borderWidth: 0
- }
+ color: backgroundColor,
+ borderWidth: 0
},
map: 'nbaCourt'
},
diff --git a/public/data/sankey-itemstyle.js b/public/data/sankey-itemstyle.js
index e1f70be..926ea6c 100644
--- a/public/data/sankey-itemstyle.js
+++ b/public/data/sankey-itemstyle.js
@@ -23,892 +23,694 @@ option = {
{
'name': 'Werne',
'itemStyle': {
- 'normal': {
- 'color': '#f18bbf',
- 'borderColor': '#f18bbf'
- }
+ 'color': '#f18bbf',
+ 'borderColor': '#f18bbf'
}
},
{
'name': 'Duesseldorf',
'itemStyle': {
- 'normal': {
- 'color': '#0078D7',
- 'borderColor': '#0078D7'
- }
+ 'color': '#0078D7',
+ 'borderColor': '#0078D7'
}
},
{
'name': 'Cambridge',
'itemStyle': {
- 'normal': {
- 'color': '#3891A7',
- 'borderColor': '#3891A7'
- }
+ 'color': '#3891A7',
+ 'borderColor': '#3891A7'
}
},
{
'name': 'Colma',
'itemStyle': {
- 'normal': {
- 'color': '#0037DA',
- 'borderColor': '#0037DA'
- }
+ 'color': '#0037DA',
+ 'borderColor': '#0037DA'
}
},
{
'name': 'W. York',
'itemStyle': {
- 'normal': {
- 'color': '#C0BEAF',
- 'borderColor': '#C0BEAF'
- }
+ 'color': '#C0BEAF',
+ 'borderColor': '#C0BEAF'
}
},
{
'name': 'Frankfurt am Main',
'itemStyle': {
- 'normal': {
- 'color': '#EA005E',
- 'borderColor': '#EA005E'
- }
+ 'color': '#EA005E',
+ 'borderColor': '#EA005E'
}
},
{
'name': 'Metz',
'itemStyle': {
- 'normal': {
- 'color': '#D13438',
- 'borderColor': '#D13438'
- }
+ 'color': '#D13438',
+ 'borderColor': '#D13438'
}
},
{
'name': 'Orleans',
'itemStyle': {
- 'normal': {
- 'color': '#567C73',
- 'borderColor': '#567C73'
- }
+ 'color': '#567C73',
+ 'borderColor': '#567C73'
}
},
{
'name': 'Saint-Denis',
'itemStyle': {
- 'normal': {
- 'color': '#9ed566',
- 'borderColor': '#9ed566'
- }
+ 'color': '#9ed566',
+ 'borderColor': '#9ed566'
}
},
{
'name': 'Hof',
'itemStyle': {
- 'normal': {
- 'color': '#2BCC7F',
- 'borderColor': '#2BCC7F'
- }
+ 'color': '#2BCC7F',
+ 'borderColor': '#2BCC7F'
}
},
{
'name': 'Cliffside',
'itemStyle': {
- 'normal': {
- 'color': '#809B48',
- 'borderColor': '#809B48'
- }
+ 'color': '#809B48',
+ 'borderColor': '#809B48'
}
},
{
'name': 'Leeds',
'itemStyle': {
- 'normal': {
- 'color': '#9B2D1F',
- 'borderColor': '#9B2D1F'
- }
+ 'color': '#9B2D1F',
+ 'borderColor': '#9B2D1F'
}
},
{
'name': 'Victoria',
'itemStyle': {
- 'normal': {
- 'color': '#604878',
- 'borderColor': '#604878'
- }
+ 'color': '#604878',
+ 'borderColor': '#604878'
}
},
{
'name': 'Erlangen',
'itemStyle': {
- 'normal': {
- 'color': '#A5644E',
- 'borderColor': '#A5644E'
- }
+ 'color': '#A5644E',
+ 'borderColor': '#A5644E'
}
},
{
'name': 'Saint Germain en Laye',
'itemStyle': {
- 'normal': {
- 'color': '#2D3F3A',
- 'borderColor': '#2D3F3A'
- }
+ 'color': '#2D3F3A',
+ 'borderColor': '#2D3F3A'
}
},
{
'name': 'Roissy en Brie',
'itemStyle': {
- 'normal': {
- 'color': '#761721',
- 'borderColor': '#761721'
- }
+ 'color': '#761721',
+ 'borderColor': '#761721'
}
},
{
'name': 'Wokingham',
'itemStyle': {
- 'normal': {
- 'color': '#B1BADD',
- 'borderColor': '#B1BADD'
- }
+ 'color': '#B1BADD',
+ 'borderColor': '#B1BADD'
}
},
{
'name': 'Runcorn',
'itemStyle': {
- 'normal': {
- 'color': '#B0CCB0',
- 'borderColor': '#B0CCB0'
- }
+ 'color': '#B0CCB0',
+ 'borderColor': '#B0CCB0'
}
},
{
'name': 'Newton',
'itemStyle': {
- 'normal': {
- 'color': '#8164A3',
- 'borderColor': '#8164A3'
- }
+ 'color': '#8164A3',
+ 'borderColor': '#8164A3'
}
},
{
'name': 'Morangis',
'itemStyle': {
- 'normal': {
- 'color': '#8E562E',
- 'borderColor': '#8E562E'
- }
+ 'color': '#8E562E',
+ 'borderColor': '#8E562E'
}
},
{
'name': 'Metchosin',
'itemStyle': {
- 'normal': {
- 'color': '#C1504D',
- 'borderColor': '#C1504D'
- }
+ 'color': '#C1504D',
+ 'borderColor': '#C1504D'
}
},
{
'name': 'Kirkby',
'itemStyle': {
- 'normal': {
- 'color': '#CCAF0A',
- 'borderColor': '#CCAF0A'
- }
+ 'color': '#CCAF0A',
+ 'borderColor': '#CCAF0A'
}
},
{
'name': 'London',
'itemStyle': {
- 'normal': {
- 'color': '#956251',
- 'borderColor': '#956251'
- }
+ 'color': '#956251',
+ 'borderColor': '#956251'
}
},
{
'name': 'Offenbach',
'itemStyle': {
- 'normal': {
- 'color': '#C17529',
- 'borderColor': '#C17529'
- }
+ 'color': '#C17529',
+ 'borderColor': '#C17529'
}
},
{
'name': 'Warrington',
'itemStyle': {
- 'normal': {
- 'color': '#CEC597',
- 'borderColor': '#CEC597'
- }
+ 'color': '#CEC597',
+ 'borderColor': '#CEC597'
}
},
{
'name': 'Vancouver',
'itemStyle': {
- 'normal': {
- 'color': '#9F2936',
- 'borderColor': '#9F2936'
- }
+ 'color': '#9F2936',
+ 'borderColor': '#9F2936'
}
},
{
'name': 'SuperiorCard',
'itemStyle': {
- 'normal': {
- 'color': 'rgba(128,155,72,255)',
- 'borderColor': 'rgba(128,155,72,255)'
- }
+ 'color': 'rgba(128,155,72,255)',
+ 'borderColor': 'rgba(128,155,72,255)'
}
},
{
'name': 'Lille',
'itemStyle': {
- 'normal': {
- 'color': '#ac7430',
- 'borderColor': '#ac7430'
- }
+ 'color': '#ac7430',
+ 'borderColor': '#ac7430'
}
},
{
'name': 'Hamburg',
'itemStyle': {
- 'normal': {
- 'color': '#00BCF2',
- 'borderColor': '#00BCF2'
- }
+ 'color': '#00BCF2',
+ 'borderColor': '#00BCF2'
}
},
{
'name': 'Langley',
'itemStyle': {
- 'normal': {
- 'color': '#CD7B38',
- 'borderColor': '#CD7B38'
- }
+ 'color': '#CD7B38',
+ 'borderColor': '#CD7B38'
}
},
{
'name': 'Les Ulis',
'itemStyle': {
- 'normal': {
- 'color': '#424242',
- 'borderColor': '#424242'
- }
+ 'color': '#424242',
+ 'borderColor': '#424242'
}
},
{
'name': 'Saarbrücken',
'itemStyle': {
- 'normal': {
- 'color': '#f63185',
- 'borderColor': '#f63185'
- }
+ 'color': '#f63185',
+ 'borderColor': '#f63185'
}
},
{
'name': 'N. Vancouver',
'itemStyle': {
- 'normal': {
- 'color': '#9CBC59',
- 'borderColor': '#9CBC59'
- }
+ 'color': '#9CBC59',
+ 'borderColor': '#9CBC59'
}
},
{
'name': 'Chalk Riber',
'itemStyle': {
- 'normal': {
- 'color': '#4F4BD9',
- 'borderColor': '#4F4BD9'
- }
+ 'color': '#4F4BD9',
+ 'borderColor': '#4F4BD9'
}
},
{
'name': 'Esher-Molesey',
'itemStyle': {
- 'normal': {
- 'color': '#3EC562',
- 'borderColor': '#3EC562'
- }
+ 'color': '#3EC562',
+ 'borderColor': '#3EC562'
}
},
{
'name': 'Chatou',
'itemStyle': {
- 'normal': {
- 'color': '#F06F2E',
- 'borderColor': '#F06F2E'
- }
+ 'color': '#F06F2E',
+ 'borderColor': '#F06F2E'
}
},
{
'name': 'Hannover',
'itemStyle': {
- 'normal': {
- 'color': '#C3986D',
- 'borderColor': '#C3986D'
- }
+ 'color': '#C3986D',
+ 'borderColor': '#C3986D'
}
},
{
'name': 'Roncq',
'itemStyle': {
- 'normal': {
- 'color': '#4D291C',
- 'borderColor': '#4D291C'
- }
+ 'color': '#4D291C',
+ 'borderColor': '#4D291C'
}
},
{
'name': 'Ingolstadt',
'itemStyle': {
- 'normal': {
- 'color': '#009c7a',
- 'borderColor': '#009c7a'
- }
+ 'color': '#009c7a',
+ 'borderColor': '#009c7a'
}
},
{
'name': 'Drancy',
'itemStyle': {
- 'normal': {
- 'color': '#986F0B',
- 'borderColor': '#986F0B'
- }
+ 'color': '#986F0B',
+ 'borderColor': '#986F0B'
}
},
{
'name': 'Langford',
'itemStyle': {
- 'normal': {
- 'color': '#3C8EA4',
- 'borderColor': '#3C8EA4'
- }
+ 'color': '#3C8EA4',
+ 'borderColor': '#3C8EA4'
}
},
{
'name': 'Lebanon',
'itemStyle': {
- 'normal': {
- 'color': '#4F82BE',
- 'borderColor': '#4F82BE'
- }
+ 'color': '#4F82BE',
+ 'borderColor': '#4F82BE'
}
},
{
'name': 'Maidenhead',
'itemStyle': {
- 'normal': {
- 'color': '#D38017',
- 'borderColor': '#D38017'
- }
+ 'color': '#D38017',
+ 'borderColor': '#D38017'
}
},
{
'name': 'Stoke-on-Trent',
'itemStyle': {
- 'normal': {
- 'color': '#A8CDD7',
- 'borderColor': '#A8CDD7'
- }
+ 'color': '#A8CDD7',
+ 'borderColor': '#A8CDD7'
}
},
{
'name': 'Peterborough',
'itemStyle': {
- 'normal': {
- 'color': '#7A072D',
- 'borderColor': '#7A072D'
- }
+ 'color': '#7A072D',
+ 'borderColor': '#7A072D'
}
},
{
'name': 'Suresnes',
'itemStyle': {
- 'normal': {
- 'color': '#859599',
- 'borderColor': '#859599'
- }
+ 'color': '#859599',
+ 'borderColor': '#859599'
}
},
{
'name': 'Versailles',
'itemStyle': {
- 'normal': {
- 'color': '#84AA33',
- 'borderColor': '#84AA33'
- }
+ 'color': '#84AA33',
+ 'borderColor': '#84AA33'
}
},
{
'name': 'Neunkirchen',
'itemStyle': {
- 'normal': {
- 'color': '#ff8b67',
- 'borderColor': '#ff8b67'
- }
+ 'color': '#ff8b67',
+ 'borderColor': '#ff8b67'
}
},
{
'name': 'Vista',
'itemStyle': {
- 'normal': {
- 'color': 'rgba(106,82,134,255)',
- 'borderColor': 'rgba(106,82,134,255)'
- }
+ 'color': 'rgba(106,82,134,255)',
+ 'borderColor': 'rgba(106,82,134,255)'
}
},
{
'name': 'Westminster',
'itemStyle': {
- 'normal': {
- 'color': '#1B587C',
- 'borderColor': '#1B587C'
- }
+ 'color': '#1B587C',
+ 'borderColor': '#1B587C'
}
},
{
'name': 'Kiel',
'itemStyle': {
- 'normal': {
- 'color': '#A19574',
- 'borderColor': '#A19574'
- }
+ 'color': '#A19574',
+ 'borderColor': '#A19574'
}
},
{
'name': 'Newcastle upon Tyne',
'itemStyle': {
- 'normal': {
- 'color': '#918485',
- 'borderColor': '#918485'
- }
+ 'color': '#918485',
+ 'borderColor': '#918485'
}
},
{
'name': 'Oxon',
'itemStyle': {
- 'normal': {
- 'color': '#FFA98C',
- 'borderColor': '#FFA98C'
- }
+ 'color': '#FFA98C',
+ 'borderColor': '#FFA98C'
}
},
{
'name': 'West Sussex',
'itemStyle': {
- 'normal': {
- 'color': '#B0E3C0',
- 'borderColor': '#B0E3C0'
- }
+ 'color': '#B0E3C0',
+ 'borderColor': '#B0E3C0'
}
},
{
'name': 'Oak Bay',
'itemStyle': {
- 'normal': {
- 'color': '#4BADC7',
- 'borderColor': '#4BADC7'
- }
+ 'color': '#4BADC7',
+ 'borderColor': '#4BADC7'
}
},
{
'name': 'Milton Keynes',
'itemStyle': {
- 'normal': {
- 'color': '#BA144C',
- 'borderColor': '#BA144C'
- }
+ 'color': '#BA144C',
+ 'borderColor': '#BA144C'
}
},
{
'name': 'Eilenburg',
'itemStyle': {
- 'normal': {
- 'color': '#F0A22E',
- 'borderColor': '#F0A22E'
- }
+ 'color': '#F0A22E',
+ 'borderColor': '#F0A22E'
}
},
{
'name': 'ColonialVoice',
'itemStyle': {
- 'normal': {
- 'color': 'rgba(64,105,157,255)',
- 'borderColor': 'rgba(64,105,157,255)'
- }
+ 'color': 'rgba(64,105,157,255)',
+ 'borderColor': 'rgba(64,105,157,255)'
}
},
{
'name': 'Liverpool',
'itemStyle': {
- 'normal': {
- 'color': '#A28E6A',
- 'borderColor': '#A28E6A'
- }
+ 'color': '#A28E6A',
+ 'borderColor': '#A28E6A'
}
},
{
'name': 'Calgary',
'itemStyle': {
- 'normal': {
- 'color': '#9F413E',
- 'borderColor': '#9F413E'
- }
+ 'color': '#9F413E',
+ 'borderColor': '#9F413E'
}
},
{
'name': 'CAD',
'itemStyle': {
- 'normal': {
- 'color': '#40699D',
- 'borderColor': '#40699D'
- }
+ 'color': '#40699D',
+ 'borderColor': '#40699D'
}
},
{
'name': 'Paris La Defense',
'itemStyle': {
- 'normal': {
- 'color': '#989391',
- 'borderColor': '#989391'
- }
+ 'color': '#989391',
+ 'borderColor': '#989391'
}
},
{
'name': 'Villeneuve-d\'Ascq',
'itemStyle': {
- 'normal': {
- 'color': '#886CE4',
- 'borderColor': '#886CE4'
- }
+ 'color': '#886CE4',
+ 'borderColor': '#886CE4'
}
},
{
'name': 'Gloucestershire',
'itemStyle': {
- 'normal': {
- 'color': '#964305',
- 'borderColor': '#964305'
- }
+ 'color': '#964305',
+ 'borderColor': '#964305'
}
},
{
'name': 'Gateshead',
'itemStyle': {
- 'normal': {
- 'color': '#485FB5',
- 'borderColor': '#485FB5'
- }
+ 'color': '#485FB5',
+ 'borderColor': '#485FB5'
}
},
{
'name': 'Salzgitter',
'itemStyle': {
- 'normal': {
- 'color': '#87a0c7',
- 'borderColor': '#87a0c7'
- }
+ 'color': '#87a0c7',
+ 'borderColor': '#87a0c7'
}
},
{
'name': 'Woolston',
'itemStyle': {
- 'normal': {
- 'color': '#FFE2C5',
- 'borderColor': '#FFE2C5'
- }
+ 'color': '#FFE2C5',
+ 'borderColor': '#FFE2C5'
}
},
{
'name': 'Frankfurt',
'itemStyle': {
- 'normal': {
- 'color': '#40699D',
- 'borderColor': '#40699D'
- }
+ 'color': '#40699D',
+ 'borderColor': '#40699D'
}
},
{
'name': 'Münster',
'itemStyle': {
- 'normal': {
- 'color': '#7e7eb2',
- 'borderColor': '#7e7eb2'
- }
+ 'color': '#7e7eb2',
+ 'borderColor': '#7e7eb2'
}
},
{
'name': 'York',
'itemStyle': {
- 'normal': {
- 'color': '#587C7D',
- 'borderColor': '#587C7D'
- }
+ 'color': '#587C7D',
+ 'borderColor': '#587C7D'
}
},
{
'name': 'High Wycombe',
'itemStyle': {
- 'normal': {
- 'color': '#F07F09',
- 'borderColor': '#F07F09'
- }
+ 'color': '#F07F09',
+ 'borderColor': '#F07F09'
}
},
{
'name': 'Stuttgart',
'itemStyle': {
- 'normal': {
- 'color': '#E3008C',
- 'borderColor': '#E3008C'
- }
+ 'color': '#E3008C',
+ 'borderColor': '#E3008C'
}
},
{
'name': 'Sooke',
'itemStyle': {
- 'normal': {
- 'color': '#4E8542',
- 'borderColor': '#4E8542'
- }
+ 'color': '#4E8542',
+ 'borderColor': '#4E8542'
}
},
{
'name': 'Essen',
'itemStyle': {
- 'normal': {
- 'color': '#B58B80',
- 'borderColor': '#B58B80'
- }
+ 'color': '#B58B80',
+ 'borderColor': '#B58B80'
}
},
{
'name': 'München',
'itemStyle': {
- 'normal': {
- 'color': '#4dc0a6',
- 'borderColor': '#4dc0a6'
- }
+ 'color': '#4dc0a6',
+ 'borderColor': '#4dc0a6'
}
},
{
'name': 'Haney',
'itemStyle': {
- 'normal': {
- 'color': '#6A5286',
- 'borderColor': '#6A5286'
- }
+ 'color': '#6A5286',
+ 'borderColor': '#6A5286'
}
},
{
'name': 'Port Hammond',
'itemStyle': {
- 'normal': {
- 'color': '#F89746',
- 'borderColor': '#F89746'
- }
+ 'color': '#F89746',
+ 'borderColor': '#F89746'
}
},
{
'name': 'Saint Ouen',
'itemStyle': {
- 'normal': {
- 'color': '#744DA9',
- 'borderColor': '#744DA9'
- }
+ 'color': '#744DA9',
+ 'borderColor': '#744DA9'
}
},
{
'name': 'Watford',
'itemStyle': {
- 'normal': {
- 'color': '#E8B7B7',
- 'borderColor': '#E8B7B7'
- }
+ 'color': '#E8B7B7',
+ 'borderColor': '#E8B7B7'
}
},
{
'name': 'GBP',
'itemStyle': {
- 'normal': {
- 'color': '#C32D2E',
- 'borderColor': '#C32D2E'
- }
+ 'color': '#C32D2E',
+ 'borderColor': '#C32D2E'
}
},
{
'name': 'Paderborn',
'itemStyle': {
- 'normal': {
- 'color': '#F0C42E',
- 'borderColor': '#F0C42E'
- }
+ 'color': '#F0C42E',
+ 'borderColor': '#F0C42E'
}
},
{
'name': 'Dunkerque',
'itemStyle': {
- 'normal': {
- 'color': '#881798',
- 'borderColor': '#881798'
- }
+ 'color': '#881798',
+ 'borderColor': '#881798'
}
},
{
'name': 'Colomiers',
'itemStyle': {
- 'normal': {
- 'color': '#efa835',
- 'borderColor': '#efa835'
- }
+ 'color': '#efa835',
+ 'borderColor': '#efa835'
}
},
{
'name': 'Oxford',
'itemStyle': {
- 'normal': {
- 'color': '#D8B25C',
- 'borderColor': '#D8B25C'
- }
+ 'color': '#D8B25C',
+ 'borderColor': '#D8B25C'
}
},
{
'name': 'Bury',
'itemStyle': {
- 'normal': {
- 'color': '#FEB80A',
- 'borderColor': '#FEB80A'
- }
+ 'color': '#FEB80A',
+ 'borderColor': '#FEB80A'
}
},
{
'name': 'Royal Oak',
'itemStyle': {
- 'normal': {
- 'color': '#009DD9',
- 'borderColor': '#009DD9'
- }
+ 'color': '#009DD9',
+ 'borderColor': '#009DD9'
}
},
{
'name': 'Shawnee',
'itemStyle': {
- 'normal': {
- 'color': '#F07F09',
- 'borderColor': '#F07F09'
- }
+ 'color': '#F07F09',
+ 'borderColor': '#F07F09'
}
},
{
'name': 'Lancaster',
'itemStyle': {
- 'normal': {
- 'color': '#D34817',
- 'borderColor': '#D34817'
- }
+ 'color': '#D34817',
+ 'borderColor': '#D34817'
}
},
{
'name': 'DEM',
'itemStyle': {
- 'normal': {
- 'color': '#4E342E',
- 'borderColor': '#4E342E'
- }
+ 'color': '#4E342E',
+ 'borderColor': '#4E342E'
}
},
{
'name': 'Grevenbroich',
'itemStyle': {
- 'normal': {
- 'color': '#FFA836',
- 'borderColor': '#FFA836'
- }
+ 'color': '#FFA836',
+ 'borderColor': '#FFA836'
}
},
{
'name': 'Distinguish',
'itemStyle': {
- 'normal': {
- 'color': 'rgba(159,65,62,255)',
- 'borderColor': 'rgba(159,65,62,255)'
- }
+ 'color': 'rgba(159,65,62,255)',
+ 'borderColor': 'rgba(159,65,62,255)'
}
},
{
'name': 'Cheltenham',
'itemStyle': {
- 'normal': {
- 'color': '#FF6551',
- 'borderColor': '#FF6551'
- }
+ 'color': '#FF6551',
+ 'borderColor': '#FF6551'
}
},
{
'name': 'Reading',
'itemStyle': {
- 'normal': {
- 'color': '#72A376',
- 'borderColor': '#72A376'
- }
+ 'color': '#72A376',
+ 'borderColor': '#72A376'
}
},
{
'name': 'Pantin',
'itemStyle': {
- 'normal': {
- 'color': '#69797E',
- 'borderColor': '#69797E'
- }
+ 'color': '#69797E',
+ 'borderColor': '#69797E'
}
},
{
'name': 'Kassel',
'itemStyle': {
- 'normal': {
- 'color': '#e65e20',
- 'borderColor': '#e65e20'
- }
+ 'color': '#e65e20',
+ 'borderColor': '#e65e20'
}
},
{
'name': 'Orly',
'itemStyle': {
- 'normal': {
- 'color': '#6E6A68',
- 'borderColor': '#6E6A68'
- }
+ 'color': '#6E6A68',
+ 'borderColor': '#6E6A68'
}
},
{
'name': 'FRF',
'itemStyle': {
- 'normal': {
- 'color': '#5ba33b',
- 'borderColor': '#5ba33b'
- }
+ 'color': '#5ba33b',
+ 'borderColor': '#5ba33b'
}
},
{
'name': 'Cergy',
'itemStyle': {
- 'normal': {
- 'color': '#B4009E',
- 'borderColor': '#B4009E'
- }
+ 'color': '#B4009E',
+ 'borderColor': '#B4009E'
}
},
{
'name': 'Paris',
'itemStyle': {
- 'normal': {
- 'color': '#666666',
- 'borderColor': '#666666'
- }
+ 'color': '#666666',
+ 'borderColor': '#666666'
}
}
],
diff --git a/public/data/scatter-nebula.js b/public/data/scatter-nebula.js
index b7b9aaf..a1092cc 100644
--- a/public/data/scatter-nebula.js
+++ b/public/data/scatter-nebula.js
@@ -35,16 +35,8 @@ xhr.onload = function (e) {
bottom: 70
},
xAxis: [{
- scalse: false,
- axisLabel: {
- fontSize: 16
- },
}],
yAxis: [{
- scalse: false,
- axisLabel: {
- fontSize: 16
- },
}],
dataZoom: [{
type: 'inside'
diff --git a/public/types/echarts.d.ts b/public/types/echarts.d.ts
index 0e9f62d..ed8c77d 100644
--- a/public/types/echarts.d.ts
+++ b/public/types/echarts.d.ts
@@ -1,20 +1,5 @@
-import { RadialGradientObject } from 'zrender/esm/graphic/RadialGradient';
-import { LinearGradientObject } from 'zrender/esm/graphic/LinearGradient';
-import { PatternObject } from 'zrender/esm/graphic/Pattern';
-import { ZRenderType } from 'zrender/esm/zrender';
-import Eventful from 'zrender/esm/core/Eventful';
-import Element, { ElementTextConfig, ElementEvent } from 'zrender/esm/Element';
-import { Dictionary, TextAlign, TextVerticalAlign, ImageLike } from 'zrender/esm/core/types';
-import { RectLike } from 'zrender/esm/core/BoundingRect';
-import { PathStyleProps, PathProps } from 'zrender/esm/graphic/Path';
-import { ImageStyleProps } from 'zrender/esm/graphic/Image';
-import Text, { TextStyleProps } from 'zrender/esm/graphic/Text';
-import Displayable from 'zrender/esm/graphic/Displayable';
-import { MorphDividingMethod } from 'zrender/esm/tool/morphPath';
-import { AnimationEasing } from 'zrender/esm/animation/easing';
-import { TSpanStyleProps } from 'zrender/esm/graphic/TSpan';
-import { parseXML } from 'zrender/esm/tool/parseSVG';
+type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
interface NameMap {
[regionName: string]: string;
}
@@ -83,6 +68,1231 @@ interface GeoJSONGeometryMultiPolygonCompressed {
encodeOffsets: number[][][];
}
+interface GradientObject {
+ id?: number;
+ type: string;
+ colorStops: GradientColorStop[];
+ __canvasGradient: CanvasGradient;
+}
+interface GradientColorStop {
+ offset: number;
+ color: string;
+}
+
+interface RadialGradientObject extends GradientObject {
+ type: 'radial';
+ x: number;
+ y: number;
+ r: number;
+ global: boolean;
+}
+
+interface LinearGradientObject extends GradientObject {
+ type: 'linear';
+ x: number;
+ y: number;
+ x2: number;
+ y2: number;
+ global: boolean;
+}
+
+declare type Dictionary<T> = {
+ [key: string]: T;
+};
+declare type ImageLike = HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
+declare type TextVerticalAlign = 'top' | 'middle' | 'bottom';
+declare type TextAlign = 'left' | 'center' | 'right';
+declare type BuiltinTextPosition = 'left' | 'right' | 'top' | 'bottom' | 'inside' | 'insideLeft' | 'insideRight' | 'insideTop' | 'insideBottom' | 'insideTopLeft' | 'insideTopRight' | 'insideBottomLeft' | 'insideBottomRight';
+declare type ZREventProperties = {
+ zrX: number;
+ zrY: number;
+ zrDelta: number;
+ zrEventControl: 'no_globalout' | 'only_globalout';
+ zrIsToLocalDOM: boolean;
+ zrByTouch: boolean;
+};
+declare type ZRRawMouseEvent = MouseEvent & ZREventProperties;
+declare type ZRRawTouchEvent = TouchEvent & ZREventProperties;
+declare type ZRRawPointerEvent = TouchEvent & ZREventProperties;
+declare type ZRRawEvent = ZRRawMouseEvent | ZRRawTouchEvent | ZRRawPointerEvent;
+declare type ElementEventName = 'click' | 'dblclick' | 'mousewheel' | 'mouseout' | 'mouseover' | 'mouseup' | 'mousedown' | 'mousemove' | 'contextmenu' | 'drag' | 'dragstart' | 'dragend' | 'dragenter' | 'dragleave' | 'dragover' | 'drop';
+declare type PropType<TObj, TProp extends keyof TObj> = TObj[TProp];
+declare type MapToType<T extends Dictionary<any>, S> = {
+ [P in keyof T]: T[P] extends Dictionary<any> ? MapToType<T[P], S> : S;
+};
+
+declare type CanvasPatternRepeat = 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';
+interface PatternObject {
+ id?: number;
+ type: 'pattern';
+ image: ImageLike | string;
+ svgElement: SVGElement;
+ svgWidth: number;
+ svgHeight: number;
+ repeat: CanvasPatternRepeat;
+ x?: number;
+ y?: number;
+ rotation?: number;
+ scaleX?: number;
+ scaleY?: number;
+ __image?: ImageLike;
+}
+
+declare type EventCallback<Ctx, Impl, EvtParam = unknown> = (this: CbThis<Ctx, Impl>, eventParam?: EvtParam, ...args: unknown[]) => boolean | void;
+declare type EventQuery = string | Object;
+declare type CbThis<Ctx, Impl> = unknown extends Ctx ? Impl : Ctx;
+declare type DefaultEventDefinition = {
+ [eventName: string]: unknown;
+};
+interface EventProcessor<EvtDef = DefaultEventDefinition> {
+ normalizeQuery?: (query: EventQuery) => EventQuery;
+ filter?: (eventType: keyof EvtDef, query: EventQuery) => boolean;
+ afterTrigger?: (eventType: keyof EvtDef) => void;
+}
+declare class Eventful<EvtDef = DefaultEventDefinition> {
+ private _$handlers;
+ protected _$eventProcessor: EventProcessor<EvtDef>;
+ constructor(eventProcessors?: EventProcessor<EvtDef>);
+ on<Ctx, EvtNm extends keyof EvtDef>(event: EvtNm, handler: EventCallback<Ctx, this, EvtDef[EvtNm]>, context?: Ctx): this;
+ on<Ctx, EvtNm extends keyof EvtDef>(event: EvtNm, query: EventQuery, handler: EventCallback<Ctx, this, EvtDef[EvtNm]>, context?: Ctx): this;
+ isSilent(eventName: keyof EvtDef): boolean;
+ off(eventType?: keyof EvtDef, handler?: Function): this;
+ trigger(eventType: keyof EvtDef, eventParam?: EvtDef[keyof EvtDef], ...args: any[]): this;
+ triggerWithContext(type: keyof EvtDef): this;
+}
+
+declare type VectorArray = number[];
+
+declare type MatrixArray = number[];
+
+interface PointLike {
+ x: number;
+ y: number;
+}
+declare class Point {
+ x: number;
+ y: number;
+ constructor(x?: number, y?: number);
+ copy(other: PointLike): this;
+ clone(): Point;
+ set(x: number, y: number): this;
+ equal(other: PointLike): boolean;
+ add(other: PointLike): this;
+ scale(scalar: number): void;
+ scaleAndAdd(other: PointLike, scalar: number): void;
+ sub(other: PointLike): this;
+ dot(other: PointLike): number;
+ len(): number;
+ lenSquare(): number;
+ normalize(): this;
+ distance(other: PointLike): number;
+ distanceSquare(other: Point): number;
+ negate(): this;
+ transform(m: MatrixArray): this;
+ toArray(out: number[]): number[];
+ fromArray(input: number[]): void;
+ static set(p: PointLike, x: number, y: number): void;
+ static copy(p: PointLike, p2: PointLike): void;
+ static len(p: PointLike): number;
+ static lenSquare(p: PointLike): number;
+ static dot(p0: PointLike, p1: PointLike): number;
+ static add(out: PointLike, p0: PointLike, p1: PointLike): void;
+ static sub(out: PointLike, p0: PointLike, p1: PointLike): void;
+ static scale(out: PointLike, p0: PointLike, scalar: number): void;
+ static scaleAndAdd(out: PointLike, p0: PointLike, p1: PointLike, scalar: number): void;
+ static lerp(out: PointLike, p0: PointLike, p1: PointLike, t: number): void;
+}
+
+declare class BoundingRect {
+ x: number;
+ y: number;
+ width: number;
+ height: number;
+ constructor(x: number, y: number, width: number, height: number);
+ union(other: BoundingRect): void;
+ applyTransform(m: MatrixArray): void;
+ calculateTransform(b: RectLike): MatrixArray;
+ intersect(b: RectLike, mtv?: PointLike): boolean;
+ contain(x: number, y: number): boolean;
+ clone(): BoundingRect;
+ copy(other: RectLike): void;
+ plain(): RectLike;
+ isFinite(): boolean;
+ isZero(): boolean;
+ static create(rect: RectLike): BoundingRect;
+ static copy(target: RectLike, source: RectLike): void;
+ static applyTransform(target: RectLike, source: RectLike, m: MatrixArray): void;
+}
+declare type RectLike = {
+ x: number;
+ y: number;
+ width: number;
+ height: number;
+};
+
+interface ExtendedCanvasRenderingContext2D extends CanvasRenderingContext2D {
+ dpr?: number;
+}
+declare class PathProxy {
+ dpr: number;
+ data: number[] | Float32Array;
+ private _version;
+ private _saveData;
+ private _ctx;
+ private _xi;
+ private _yi;
+ private _x0;
+ private _y0;
+ private _len;
+ private _pathSegLen;
+ private _pathLen;
+ private _ux;
+ private _uy;
+ private _lineDash;
+ private _needsDash;
+ private _dashOffset;
+ private _dashIdx;
+ private _dashSum;
+ static CMD: {
+ M: number;
+ L: number;
+ C: number;
+ Q: number;
+ A: number;
+ Z: number;
+ R: number;
+ };
+ constructor(notSaveData?: boolean);
+ increaseVersion(): void;
+ getVersion(): number;
+ setScale(sx: number, sy: number, segmentIgnoreThreshold?: number): void;
+ setDPR(dpr: number): void;
+ setContext(ctx: ExtendedCanvasRenderingContext2D): void;
+ getContext(): ExtendedCanvasRenderingContext2D;
+ beginPath(): this;
+ reset(): void;
+ moveTo(x: number, y: number): this;
+ lineTo(x: number, y: number): this;
+ bezierCurveTo(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): this;
+ quadraticCurveTo(x1: number, y1: number, x2: number, y2: number): this;
+ arc(cx: number, cy: number, r: number, startAngle: number, endAngle: number, anticlockwise?: boolean): this;
+ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this;
+ rect(x: number, y: number, w: number, h: number): this;
+ closePath(): this;
+ fill(ctx: CanvasRenderingContext2D): void;
+ stroke(ctx: CanvasRenderingContext2D): void;
+ setLineDash(lineDash: number[] | false): this;
+ setLineDashOffset(offset: number): this;
+ len(): number;
+ setData(data: Float32Array | number[]): void;
+ appendPath(path: PathProxy | PathProxy[]): void;
+ addData(cmd: number, a?: number, b?: number, c?: number, d?: number, e?: number, f?: number, g?: number, h?: number): void;
+ _expandData(): void;
+ _dashedLineTo(x1: number, y1: number): void;
+ _dashedBezierTo(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): void;
+ _dashedQuadraticTo(x1: number, y1: number, x2: number, y2: number): void;
+ toStatic(): void;
+ getBoundingRect(): BoundingRect;
+ private _calculateLength;
+ rebuildPath(ctx: PathRebuilder, percent: number): void;
+ private static initDefaultProps;
+}
+interface PathRebuilder {
+ moveTo(x: number, y: number): void;
+ lineTo(x: number, y: number): void;
+ bezierCurveTo(x: number, y: number, x2: number, y2: number, x3: number, y3: number): void;
+ quadraticCurveTo(x: number, y: number, x2: number, y2: number): void;
+ arc(cx: number, cy: number, r: number, startAngle: number, endAngle: number, anticlockwise: boolean): void;
+ ellipse(cx: number, cy: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise: boolean): void;
+ rect(x: number, y: number, width: number, height: number): void;
+ closePath(): void;
+}
+
+declare type easingFunc = (percent: number) => number;
+declare type AnimationEasing = keyof typeof easing | easingFunc | 'spline';
+declare const easing: {
+ linear(k: number): number;
+ quadraticIn(k: number): number;
+ quadraticOut(k: number): number;
+ quadraticInOut(k: number): number;
+ cubicIn(k: number): number;
+ cubicOut(k: number): number;
+ cubicInOut(k: number): number;
+ quarticIn(k: number): number;
+ quarticOut(k: number): number;
+ quarticInOut(k: number): number;
+ quinticIn(k: number): number;
+ quinticOut(k: number): number;
+ quinticInOut(k: number): number;
+ sinusoidalIn(k: number): number;
+ sinusoidalOut(k: number): number;
+ sinusoidalInOut(k: number): number;
+ exponentialIn(k: number): number;
+ exponentialOut(k: number): number;
+ exponentialInOut(k: number): number;
+ circularIn(k: number): number;
+ circularOut(k: number): number;
+ circularInOut(k: number): number;
+ elasticIn(k: number): number;
+ elasticOut(k: number): number;
+ elasticInOut(k: number): number;
+ backIn(k: number): number;
+ backOut(k: number): number;
+ backInOut(k: number): number;
+ bounceIn(k: number): number;
+ bounceOut(k: number): number;
+ bounceInOut(k: number): number;
+};
+
+interface Stage {
+ update?: () => void;
+}
+declare type OnframeCallback = (deltaTime: number) => void;
+interface AnimationOption {
+ stage?: Stage;
+ onframe?: OnframeCallback;
+}
+declare class Animation extends Eventful {
+ stage: Stage;
+ onframe: OnframeCallback;
+ private _clipsHead;
+ private _clipsTail;
+ private _running;
+ private _time;
+ private _pausedTime;
+ private _pauseStart;
+ private _paused;
+ constructor(opts?: AnimationOption);
+ addClip(clip: Clip): void;
+ addAnimator(animator: Animator<any>): void;
+ removeClip(clip: Clip): void;
+ removeAnimator(animator: Animator<any>): void;
+ update(notTriggerStageUpdate?: boolean): void;
+ _startLoop(): void;
+ start(): void;
+ stop(): void;
+ pause(): void;
+ resume(): void;
+ clear(): void;
+ isFinished(): boolean;
+ animate<T>(target: T, options: {
+ loop?: boolean;
+ }): Animator<T>;
+}
+
+declare type OnframeCallback$1 = (percent: number) => void;
+declare type ondestroyCallback = () => void;
+declare type onrestartCallback = () => void;
+interface ClipProps {
+ life?: number;
+ delay?: number;
+ loop?: boolean;
+ gap?: number;
+ easing?: AnimationEasing;
+ onframe?: OnframeCallback$1;
+ ondestroy?: ondestroyCallback;
+ onrestart?: onrestartCallback;
+}
+declare class Clip {
+ private _life;
+ private _delay;
+ private _initialized;
+ private _startTime;
+ private _pausedTime;
+ private _paused;
+ animation: Animation;
+ loop: boolean;
+ gap: number;
+ easing: AnimationEasing;
+ next: Clip;
+ prev: Clip;
+ onframe: OnframeCallback$1;
+ ondestroy: ondestroyCallback;
+ onrestart: onrestartCallback;
+ constructor(opts: ClipProps);
+ step(globalTime: number, deltaTime: number): boolean;
+ private _restart;
+ pause(): void;
+ resume(): void;
+}
+
+declare type Keyframe = {
+ time: number;
+ value: unknown;
+ percent: number;
+ additiveValue?: unknown;
+};
+declare class Track {
+ keyframes: Keyframe[];
+ maxTime: number;
+ propName: string;
+ useSpline: boolean;
+ arrDim: number;
+ isValueColor: boolean;
+ interpolable: boolean;
+ private _finished;
+ private _needsSort;
+ private _isAllValueEqual;
+ private _additiveTrack;
+ private _additiveValue;
+ private _lastFrame;
+ private _lastFramePercent;
+ constructor(propName: string);
+ isFinished(): boolean;
+ setFinished(): void;
+ needsAnimate(): boolean;
+ getAdditiveTrack(): Track;
+ addKeyframe(time: number, value: unknown): {
+ time: number;
+ value: unknown;
+ percent: number;
+ };
+ prepare(additiveTrack?: Track): void;
+ step(target: any, percent: number): void;
+ private _addToTarget;
+}
+declare type DoneCallback = () => void;
+declare type AbortCallback = () => void;
+declare type OnframeCallback$2<T> = (target: T, percent: number) => void;
+declare class Animator<T> {
+ animation?: Animation;
+ targetName?: string;
+ scope?: string;
+ __fromStateTransition?: string;
+ private _tracks;
+ private _trackKeys;
+ private _target;
+ private _loop;
+ private _delay;
+ private _maxTime;
+ private _paused;
+ private _started;
+ private _additiveAnimators;
+ private _doneList;
+ private _onframeList;
+ private _abortedList;
+ private _clip;
+ constructor(target: T, loop: boolean, additiveTo?: Animator<any>[]);
+ getTarget(): T;
+ changeTarget(target: T): void;
+ when(time: number, props: Dictionary<any>): this;
+ whenWithKeys(time: number, props: Dictionary<any>, propNames: string[]): this;
+ pause(): void;
+ resume(): void;
+ isPaused(): boolean;
+ private _doneCallback;
+ private _abortedCallback;
+ private _setTracksFinished;
+ private _getAdditiveTrack;
+ start(easing?: AnimationEasing, forceAnimate?: boolean): this;
+ stop(forwardToLast?: boolean): void;
+ delay(time: number): this;
+ during(cb: OnframeCallback$2<T>): this;
+ done(cb: DoneCallback): this;
+ aborted(cb: AbortCallback): this;
+ getClip(): Clip;
+ getTrack(propName: string): Track;
+ stopTracks(propNames: string[], forwardToLast?: boolean): boolean;
+ saveFinalToTarget(target: T, trackKeys?: readonly string[]): void;
+ __changeFinalValue(finalProps: Dictionary<any>, trackKeys?: readonly string[]): void;
+}
+
+interface PathStyleProps extends CommonStyleProps {
+ fill?: string | PatternObject | LinearGradientObject | RadialGradientObject;
+ stroke?: string | PatternObject | LinearGradientObject | RadialGradientObject;
+ decal?: PatternObject;
+ strokePercent?: number;
+ strokeNoScale?: boolean;
+ fillOpacity?: number;
+ strokeOpacity?: number;
+ lineDash?: false | number[] | 'solid' | 'dashed' | 'dotted';
+ lineDashOffset?: number;
+ lineWidth?: number;
+ lineCap?: CanvasLineCap;
+ lineJoin?: CanvasLineJoin;
+ miterLimit?: number;
+ strokeFirst?: boolean;
+}
+interface PathProps extends DisplayableProps {
+ strokeContainThreshold?: number;
+ segmentIgnoreThreshold?: number;
+ subPixelOptimize?: boolean;
+ style?: PathStyleProps;
+ shape?: Dictionary<any>;
+ autoBatch?: boolean;
+ __value?: (string | number)[] | (string | number);
+ buildPath?: (ctx: PathProxy | CanvasRenderingContext2D, shapeCfg: Dictionary<any>, inBundle?: boolean) => void;
+}
+declare type PathKey = keyof PathProps;
+declare type PathPropertyType = PropType<PathProps, PathKey>;
+interface Path<Props extends PathProps = PathProps> {
+ animate(key?: '', loop?: boolean): Animator<this>;
+ animate(key: 'style', loop?: boolean): Animator<this['style']>;
+ animate(key: 'shape', loop?: boolean): Animator<this['shape']>;
+ getState(stateName: string): PathState;
+ ensureState(stateName: string): PathState;
+ states: Dictionary<PathState>;
+ stateProxy: (stateName: string) => PathState;
+}
+declare class Path<Props extends PathProps = PathProps> extends Displayable<Props> {
+ path: PathProxy;
+ strokeContainThreshold: number;
+ segmentIgnoreThreshold: number;
+ subPixelOptimize: boolean;
+ style: PathStyleProps;
+ autoBatch: boolean;
+ private _rectWithStroke;
+ protected _normalState: PathState;
+ protected _decalEl: Path;
+ shape: Dictionary<any>;
+ constructor(opts?: Props);
+ update(): void;
+ getDecalElement(): Path<PathProps>;
+ protected _init(props?: Props): void;
+ protected getDefaultStyle(): Props['style'];
+ protected getDefaultShape(): {};
+ protected canBeInsideText(): boolean;
+ protected getInsideTextFill(): "#333" | "#ccc" | "#eee";
+ protected getInsideTextStroke(textFill?: string): string;
+ buildPath(ctx: PathProxy | CanvasRenderingContext2D, shapeCfg: Dictionary<any>, inBundle?: boolean): void;
+ pathUpdated(): void;
+ createPathProxy(): void;
+ hasStroke(): boolean;
+ hasFill(): boolean;
+ getBoundingRect(): BoundingRect;
+ contain(x: number, y: number): boolean;
+ dirtyShape(): void;
+ dirty(): void;
+ animateShape(loop: boolean): Animator<this["shape"]>;
+ updateDuringAnimation(targetKey: string): void;
+ attrKV(key: PathKey, value: PathPropertyType): void;
+ setShape(obj: Props['shape']): this;
+ setShape<T extends keyof Props['shape']>(obj: T, value: Props['shape'][T]): this;
+ shapeChanged(): boolean;
+ createStyle(obj?: Props['style']): Props["style"];
+ protected _innerSaveToNormal(toState: PathState): void;
+ protected _applyStateObj(stateName: string, state: PathState, normalState: PathState, keepCurrentStates: boolean, transition: boolean, animationCfg: ElementAnimateConfig): void;
+ protected _mergeStates(states: PathState[]): PathState;
+ getAnimationStyleProps(): MapToType<PathProps, boolean>;
+ isZeroArea(): boolean;
+ static extend<Shape extends Dictionary<any>>(defaultProps: {
+ type?: string;
+ shape?: Shape;
+ style?: PathStyleProps;
+ beforeBrush?: Displayable['beforeBrush'];
+ afterBrush?: Displayable['afterBrush'];
+ getBoundingRect?: Displayable['getBoundingRect'];
+ calculateTextPosition?: Element['calculateTextPosition'];
+ buildPath(this: Path, ctx: CanvasRenderingContext2D | PathProxy, shape: Shape, inBundle?: boolean): void;
+ init?(this: Path, opts: PathProps): void;
+ }): {
+ new (opts?: PathProps & {
+ shape: Shape;
+ }): Path;
+ };
+ static SHAPE_CHANGED_BIT: number;
+ protected static initDefaultProps: void;
+}
+declare type PathStatePropNames = DisplayableStatePropNames | 'shape';
+declare type PathState = Pick<PathProps, PathStatePropNames> & {
+ hoverLayer?: boolean;
+};
+
+declare class Transformable {
+ parent: Transformable;
+ x: number;
+ y: number;
+ scaleX: number;
+ scaleY: number;
+ rotation: number;
+ originX: number;
+ originY: number;
+ globalScaleRatio: number;
+ transform: MatrixArray;
+ invTransform: MatrixArray;
+ setPosition(arr: number[]): void;
+ setScale(arr: number[]): void;
+ setOrigin(arr: number[]): void;
+ needLocalTransform(): boolean;
+ updateTransform(): void;
+ private _resolveGlobalScaleRatio;
+ getLocalTransform(m?: MatrixArray): MatrixArray;
+ getComputedTransform(): MatrixArray;
+ setLocalTransform(m: VectorArray): void;
+ decomposeTransform(): void;
+ getGlobalScale(out?: VectorArray): VectorArray;
+ transformCoordToLocal(x: number, y: number): number[];
+ transformCoordToGlobal(x: number, y: number): number[];
+ getLineScale(): number;
+ static getLocalTransform(target: Transformable, m?: MatrixArray): MatrixArray;
+ private static initDefaultProps;
+}
+
+interface TSpanStyleProps extends PathStyleProps {
+ x?: number;
+ y?: number;
+ text?: string;
+ font?: string;
+ textAlign?: CanvasTextAlign;
+ textBaseline?: CanvasTextBaseline;
+}
+interface TSpanProps extends DisplayableProps {
+ style?: TSpanStyleProps;
+}
+declare class TSpan extends Displayable<TSpanProps> {
+ style: TSpanStyleProps;
+ hasStroke(): boolean;
+ hasFill(): boolean;
+ createStyle(obj?: TSpanStyleProps): TSpanStyleProps;
+ setBoundingRect(rect: BoundingRect): void;
+ getBoundingRect(): BoundingRect;
+ protected static initDefaultProps: void;
+}
+
+interface ImageStyleProps extends CommonStyleProps {
+ image?: string | ImageLike;
+ x?: number;
+ y?: number;
+ width?: number;
+ height?: number;
+ sx?: number;
+ sy?: number;
+ sWidth?: number;
+ sHeight?: number;
+}
+interface ImageProps extends DisplayableProps {
+ style?: ImageStyleProps;
+ onload?: (image: ImageLike) => void;
+}
+declare class ZRImage extends Displayable<ImageProps> {
+ style: ImageStyleProps;
+ __image: ImageLike;
+ __imageSrc: string;
+ onload: (image: ImageLike) => void;
+ createStyle(obj?: ImageStyleProps): ImageStyleProps;
+ private _getSize;
+ getWidth(): number;
+ getHeight(): number;
+ getAnimationStyleProps(): MapToType<ImageProps, boolean>;
+ getBoundingRect(): BoundingRect;
+}
+
+declare class RectShape {
+ r?: number | number[];
+ x: number;
+ y: number;
+ width: number;
+ height: number;
+}
+interface RectProps extends PathProps {
+ shape?: Partial<RectShape>;
+}
+declare class Rect extends Path<RectProps> {
+ shape: RectShape;
+ constructor(opts?: RectProps);
+ getDefaultShape(): RectShape;
+ buildPath(ctx: CanvasRenderingContext2D, shape: RectShape): void;
+ isZeroArea(): boolean;
+}
+
+interface TextStylePropsPart {
+ text?: string;
+ fill?: string;
+ stroke?: string;
+ opacity?: number;
+ fillOpacity?: number;
+ strokeOpacity?: number;
+ lineWidth?: number;
+ lineDash?: false | number[];
+ lineDashOffset?: number;
+ borderDash?: false | number[];
+ borderDashOffset?: number;
+ font?: string;
+ textFont?: string;
+ fontStyle?: 'normal' | 'italic' | 'oblique';
+ fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | number;
+ fontFamily?: string;
+ fontSize?: number | string;
+ align?: TextAlign;
+ verticalAlign?: TextVerticalAlign;
+ lineHeight?: number;
+ width?: number | string;
+ height?: number;
+ tag?: string;
+ textShadowColor?: string;
+ textShadowBlur?: number;
+ textShadowOffsetX?: number;
+ textShadowOffsetY?: number;
+ backgroundColor?: string | {
+ image: ImageLike | string;
+ };
+ padding?: number | number[];
+ margin?: number;
+ borderColor?: string;
+ borderWidth?: number;
+ borderRadius?: number | number[];
+ shadowColor?: string;
+ shadowBlur?: number;
+ shadowOffsetX?: number;
+ shadowOffsetY?: number;
+}
+interface TextStyleProps extends TextStylePropsPart {
+ text?: string;
+ x?: number;
+ y?: number;
+ width?: number;
+ rich?: Dictionary<TextStylePropsPart>;
+ overflow?: 'break' | 'breakAll' | 'truncate';
+ lineOverflow?: 'truncate';
+ ellipsis?: string;
+ placeholder?: string;
+ truncateMinChar?: number;
+}
+interface TextProps extends DisplayableProps {
+ style?: TextStyleProps;
+ zlevel?: number;
+ z?: number;
+ z2?: number;
+ culling?: boolean;
+ cursor?: string;
+}
+declare type TextState = Pick<TextProps, DisplayableStatePropNames> & ElementCommonState;
+declare type DefaultTextStyle = Pick<TextStyleProps, 'fill' | 'stroke' | 'align' | 'verticalAlign'> & {
+ autoStroke?: boolean;
+};
+interface ZRText {
+ animate(key?: '', loop?: boolean): Animator<this>;
+ animate(key: 'style', loop?: boolean): Animator<this['style']>;
+ getState(stateName: string): TextState;
+ ensureState(stateName: string): TextState;
+ states: Dictionary<TextState>;
+ stateProxy: (stateName: string) => TextState;
+}
+declare class ZRText extends Displayable<TextProps> {
+ type: string;
+ style: TextStyleProps;
+ overlap: 'hidden' | 'show' | 'blur';
+ attachedTransform: Transformable;
+ private _children;
+ private _childCursor;
+ private _defaultStyle;
+ constructor(opts?: TextProps);
+ childrenRef(): (TSpan | ZRImage | Rect)[];
+ update(): void;
+ getComputedTransform(): MatrixArray;
+ private _updateSubTexts;
+ addSelfToZr(zr: ZRenderType): void;
+ removeSelfFromZr(zr: ZRenderType): void;
+ getBoundingRect(): BoundingRect;
+ setDefaultTextStyle(defaultTextStyle: DefaultTextStyle): void;
+ setTextContent(textContent: never): void;
+ protected _mergeStyle(targetStyle: TextStyleProps, sourceStyle: TextStyleProps): TextStyleProps;
+ private _mergeRich;
+ getAnimationStyleProps(): MapToType<TextProps, boolean>;
+ private _getOrCreateChild;
+ private _updatePlainTexts;
+ private _updateRichTexts;
+ private _placeToken;
+ private _renderBackground;
+ static makeFont(style: TextStylePropsPart): string;
+}
+
+interface TextPositionCalculationResult {
+ x: number;
+ y: number;
+ align: TextAlign;
+ verticalAlign: TextVerticalAlign;
+}
+
+declare class PolylineShape {
+ points: VectorArray[];
+ percent?: number;
+ smooth?: number | 'spline';
+ smoothConstraint?: VectorArray[];
+}
+interface PolylineProps extends PathProps {
+ shape?: Partial<PolylineShape>;
+}
+declare class Polyline extends Path<PolylineProps> {
+ shape: PolylineShape;
+ constructor(opts?: PolylineProps);
+ getDefaultStyle(): {
+ stroke: string;
+ fill: string;
+ };
+ getDefaultShape(): PolylineShape;
+ buildPath(ctx: CanvasRenderingContext2D, shape: PolylineShape): void;
+}
+
+interface GroupProps extends ElementProps {
+}
+declare class Group extends Element<GroupProps> {
+ readonly isGroup = true;
+ private _children;
+ constructor(opts?: GroupProps);
+ childrenRef(): Element<ElementProps>[];
+ children(): Element<ElementProps>[];
+ childAt(idx: number): Element;
+ childOfName(name: string): Element;
+ childCount(): number;
+ add(child: Element): Group;
+ addBefore(child: Element, nextSibling: Element): this;
+ replaceAt(child: Element, index: number): this;
+ _doAdd(child: Element): void;
+ remove(child: Element): this;
+ removeAll(): this;
+ eachChild<Context>(cb: (this: Context, el: Element, index?: number) => void, context?: Context): this;
+ traverse<T>(cb: (this: T, el: Element) => boolean | void, context?: T): this;
+ addSelfToZr(zr: ZRenderType): void;
+ removeSelfFromZr(zr: ZRenderType): void;
+ getBoundingRect(includeChildren?: Element[]): BoundingRect;
+}
+
+interface ElementAnimateConfig {
+ duration?: number;
+ delay?: number;
+ easing?: AnimationEasing;
+ during?: (percent: number) => void;
+ done?: Function;
+ aborted?: Function;
+ scope?: string;
+ force?: boolean;
+ additive?: boolean;
+ setToFinal?: boolean;
+}
+interface ElementTextConfig {
+ position?: BuiltinTextPosition | (number | string)[];
+ rotation?: number;
+ layoutRect?: RectLike;
+ offset?: number[];
+ origin?: (number | string)[] | 'center';
+ distance?: number;
+ local?: boolean;
+ insideFill?: string;
+ insideStroke?: string;
+ outsideFill?: string;
+ outsideStroke?: string;
+ inside?: boolean;
+}
+interface ElementTextGuideLineConfig {
+ anchor?: Point;
+ showAbove?: boolean;
+ candidates?: ('left' | 'top' | 'right' | 'bottom')[];
+}
+interface ElementEvent {
+ type: ElementEventName;
+ event: ZRRawEvent;
+ target: Element;
+ topTarget: Element;
+ cancelBubble: boolean;
+ offsetX: number;
+ offsetY: number;
+ gestureEvent: string;
+ pinchX: number;
+ pinchY: number;
+ pinchScale: number;
+ wheelDelta: number;
+ zrByTouch: boolean;
+ which: number;
+ stop: (this: ElementEvent) => void;
+}
+declare type ElementEventCallback<Ctx, Impl> = (this: CbThis$1<Ctx, Impl>, e: ElementEvent) => boolean | void;
+declare type CbThis$1<Ctx, Impl> = unknown extends Ctx ? Impl : Ctx;
+interface ElementEventHandlerProps {
+ onclick: ElementEventCallback<unknown, unknown>;
+ ondblclick: ElementEventCallback<unknown, unknown>;
+ onmouseover: ElementEventCallback<unknown, unknown>;
+ onmouseout: ElementEventCallback<unknown, unknown>;
+ onmousemove: ElementEventCallback<unknown, unknown>;
+ onmousewheel: ElementEventCallback<unknown, unknown>;
+ onmousedown: ElementEventCallback<unknown, unknown>;
+ onmouseup: ElementEventCallback<unknown, unknown>;
+ oncontextmenu: ElementEventCallback<unknown, unknown>;
+ ondrag: ElementEventCallback<unknown, unknown>;
+ ondragstart: ElementEventCallback<unknown, unknown>;
+ ondragend: ElementEventCallback<unknown, unknown>;
+ ondragenter: ElementEventCallback<unknown, unknown>;
+ ondragleave: ElementEventCallback<unknown, unknown>;
+ ondragover: ElementEventCallback<unknown, unknown>;
+ ondrop: ElementEventCallback<unknown, unknown>;
+}
+interface ElementProps extends Partial<ElementEventHandlerProps> {
+ name?: string;
+ ignore?: boolean;
+ isGroup?: boolean;
+ draggable?: boolean | 'horizontal' | 'vertical';
+ silent?: boolean;
+ ignoreClip?: boolean;
+ x?: number;
+ y?: number;
+ scaleX?: number;
+ scaleY?: number;
+ originX?: number;
+ originY?: number;
+ rotation?: number;
+ globalScaleRatio?: number;
+ textConfig?: ElementTextConfig;
+ textContent?: ZRText;
+ clipPath?: Path;
+ drift?: Element['drift'];
+ extra?: Dictionary<unknown>;
+ anid?: string;
+}
+declare const PRIMARY_STATES_KEYS: readonly ["x", "y", "scaleX", "scaleY", "originX", "originY", "rotation", "ignore"];
+declare type ElementStatePropNames = (typeof PRIMARY_STATES_KEYS)[number] | 'textConfig';
+declare type ElementState = Pick<ElementProps, ElementStatePropNames> & ElementCommonState;
+declare type ElementCommonState = {
+ hoverLayer?: boolean;
+};
+interface Element<Props extends ElementProps = ElementProps> extends Transformable, Eventful, ElementEventHandlerProps {
+ on<Ctx>(event: ElementEventName, handler: ElementEventCallback<Ctx, this>, context?: Ctx): this;
+ on<Ctx>(event: string, handler: EventCallback<Ctx, this>, context?: Ctx): this;
+ on<Ctx>(event: ElementEventName, query: EventQuery, handler: ElementEventCallback<Ctx, this>, context?: Ctx): this;
+ on<Ctx>(event: string, query: EventQuery, handler: EventCallback<Ctx, this>, context?: Ctx): this;
+}
+declare class Element<Props extends ElementProps = ElementProps> {
+ id: number;
+ type: string;
+ name: string;
+ ignore: boolean;
+ silent: boolean;
+ isGroup: boolean;
+ draggable: boolean | 'horizontal' | 'vertical';
+ dragging: boolean;
+ parent: Group;
+ animators: Animator<any>[];
+ ignoreClip: boolean;
+ __hostTarget: Element;
+ __zr: ZRenderType;
+ __dirty: number;
+ __isRendered: boolean;
+ __inHover: boolean;
+ private _clipPath?;
+ private _textContent?;
+ private _textGuide?;
+ textConfig?: ElementTextConfig;
+ textGuideLineConfig?: ElementTextGuideLineConfig;
+ anid: string;
+ extra: Dictionary<unknown>;
+ currentStates?: string[];
+ prevStates?: string[];
+ states: Dictionary<ElementState>;
+ stateTransition: ElementAnimateConfig;
+ stateProxy?: (stateName: string, targetStates?: string[]) => ElementState;
+ protected _normalState: ElementState;
+ private _innerTextDefaultStyle;
+ constructor(props?: Props);
+ protected _init(props?: Props): void;
+ drift(dx: number, dy: number, e?: ElementEvent): void;
+ beforeUpdate(): void;
+ afterUpdate(): void;
+ update(): void;
+ updateInnerText(forceUpdate?: boolean): void;
+ protected canBeInsideText(): boolean;
+ protected getInsideTextFill(): string;
+ protected getInsideTextStroke(textFill: string): string;
+ protected getOutsideFill(): "#333" | "#ccc";
+ protected getOutsideStroke(textFill: string): string;
+ traverse<Context>(cb: (this: Context, el: Element<Props>) => void, context?: Context): void;
+ protected attrKV(key: string, value: unknown): void;
+ hide(): void;
+ show(): void;
+ attr(keyOrObj: Props): this;
+ attr<T extends keyof Props>(keyOrObj: T, value: Props[T]): this;
+ saveCurrentToNormalState(toState: ElementState): void;
+ protected _innerSaveToNormal(toState: ElementState): void;
+ protected _savePrimaryToNormal(toState: Dictionary<any>, normalState: Dictionary<any>, primaryKeys: readonly string[]): void;
+ hasState(): boolean;
+ getState(name: string): ElementState;
+ ensureState(name: string): ElementState;
+ clearStates(noAnimation?: boolean): void;
+ useState(stateName: string, keepCurrentStates?: boolean, noAnimation?: boolean): ElementState;
+ useStates(states: string[], noAnimation?: boolean): void;
+ private _updateAnimationTargets;
+ removeState(state: string): void;
+ replaceState(oldState: string, newState: string, forceAdd: boolean): void;
+ toggleState(state: string, enable: boolean): void;
+ protected _mergeStates(states: ElementState[]): ElementState;
+ protected _applyStateObj(stateName: string, state: ElementState, normalState: ElementState, keepCurrentStates: boolean, transition: boolean, animationCfg: ElementAnimateConfig): void;
+ private _attachComponent;
+ private _detachComponent;
+ getClipPath(): Path<PathProps>;
+ setClipPath(clipPath: Path): void;
+ removeClipPath(): void;
+ getTextContent(): ZRText;
+ setTextContent(textEl: ZRText): void;
+ setTextConfig(cfg: ElementTextConfig): void;
+ removeTextContent(): void;
+ getTextGuideLine(): Polyline;
+ setTextGuideLine(guideLine: Polyline): void;
+ removeTextGuideLine(): void;
+ markRedraw(): void;
+ dirty(): void;
+ private _toggleHoverLayerFlag;
+ addSelfToZr(zr: ZRenderType): void;
+ removeSelfFromZr(zr: ZRenderType): void;
+ animate(key?: string, loop?: boolean): Animator<any>;
+ addAnimator(animator: Animator<any>, key: string): void;
+ updateDuringAnimation(key: string): void;
+ stopAnimation(scope?: string, forwardToLast?: boolean): this;
+ animateTo(target: Props, cfg?: ElementAnimateConfig, animationProps?: MapToType<Props, boolean>): void;
+ animateFrom(target: Props, cfg: Omit<ElementAnimateConfig, 'setToFinal'>, animationProps?: MapToType<Props, boolean>): void;
+ protected _transitionState(stateName: string, target: Props, cfg?: ElementAnimateConfig, animationProps?: MapToType<Props, boolean>): void;
+ getBoundingRect(): BoundingRect;
+ getPaintRect(): BoundingRect;
+ calculateTextPosition: (out: TextPositionCalculationResult, style: ElementTextConfig, rect: RectLike) => TextPositionCalculationResult;
+ static REDARAW_BIT: number;
+ protected static initDefaultProps: void;
+}
+
+interface CommonStyleProps {
+ shadowBlur?: number;
+ shadowOffsetX?: number;
+ shadowOffsetY?: number;
+ shadowColor?: string;
+ opacity?: number;
+ blend?: string;
+}
+interface DisplayableProps extends ElementProps {
+ style?: Dictionary<any>;
+ zlevel?: number;
+ z?: number;
+ z2?: number;
+ culling?: boolean;
+ cursor?: string;
+ rectHover?: boolean;
+ progressive?: boolean;
+ incremental?: boolean;
+ batch?: boolean;
+ invisible?: boolean;
+}
+declare type DisplayableKey = keyof DisplayableProps;
+declare type DisplayablePropertyType = PropType<DisplayableProps, DisplayableKey>;
+declare type DisplayableStatePropNames = ElementStatePropNames | 'style' | 'z' | 'z2' | 'invisible';
+declare type DisplayableState = Pick<DisplayableProps, DisplayableStatePropNames> & ElementCommonState;
+interface Displayable<Props extends DisplayableProps = DisplayableProps> {
+ animate(key?: '', loop?: boolean): Animator<this>;
+ animate(key: 'style', loop?: boolean): Animator<this['style']>;
+ getState(stateName: string): DisplayableState;
+ ensureState(stateName: string): DisplayableState;
+ states: Dictionary<DisplayableState>;
+ stateProxy: (stateName: string) => DisplayableState;
+}
+declare class Displayable<Props extends DisplayableProps = DisplayableProps> extends Element<Props> {
+ invisible: boolean;
+ z: number;
+ z2: number;
+ zlevel: number;
+ culling: boolean;
+ cursor: string;
+ rectHover: boolean;
+ incremental: boolean;
+ style: Dictionary<any>;
+ protected _normalState: DisplayableState;
+ protected _rect: BoundingRect;
+ protected _paintRect: BoundingRect;
+ protected _prevPaintRect: BoundingRect;
+ dirtyRectTolerance: number;
+ useHoverLayer?: boolean;
+ __hoverStyle?: CommonStyleProps;
+ __clipPaths?: Path[];
+ __canvasFillGradient: CanvasGradient;
+ __canvasStrokeGradient: CanvasGradient;
+ __canvasFillPattern: CanvasPattern;
+ __canvasStrokePattern: CanvasPattern;
+ __svgEl: SVGElement;
+ constructor(props?: Props);
+ protected _init(props?: Props): void;
+ beforeBrush(): void;
+ afterBrush(): void;
+ innerBeforeBrush(): void;
+ innerAfterBrush(): void;
+ shouldBePainted(viewWidth: number, viewHeight: number, considerClipPath: boolean, considerAncestors: boolean): boolean;
+ contain(x: number, y: number): boolean;
+ traverse<Context>(cb: (this: Context, el: this) => void, context?: Context): void;
+ rectContain(x: number, y: number): boolean;
+ getPaintRect(): BoundingRect;
+ setPrevPaintRect(paintRect: BoundingRect): void;
+ getPrevPaintRect(): BoundingRect;
+ animateStyle(loop: boolean): Animator<this["style"]>;
+ updateDuringAnimation(targetKey: string): void;
+ attrKV(key: DisplayableKey, value: DisplayablePropertyType): void;
+ setStyle(obj: Props['style']): this;
+ setStyle<T extends keyof Props['style']>(obj: T, value: Props['style'][T]): this;
+ dirtyStyle(): void;
+ dirty(): void;
+ styleChanged(): boolean;
+ styleUpdated(): void;
+ createStyle(obj?: Props['style']): Props["style"];
+ useStyle(obj: Props['style']): void;
+ isStyleObject(obj: Props['style']): any;
+ protected _innerSaveToNormal(toState: DisplayableState): void;
+ protected _applyStateObj(stateName: string, state: DisplayableState, normalState: DisplayableState, keepCurrentStates: boolean, transition: boolean, animationCfg: ElementAnimateConfig): void;
+ protected _mergeStates(states: DisplayableState[]): DisplayableState;
+ protected _mergeStyle(targetStyle: CommonStyleProps, sourceStyle: CommonStyleProps): CommonStyleProps;
+ getAnimationStyleProps(): MapToType<DisplayableProps, boolean>;
+ static STYLE_CHANGED_BIT: number;
+ protected static initDefaultProps: void;
+}
+
+interface PainterBase {
+ type: string;
+ root: HTMLElement;
+ resize(width?: number | string, height?: number | string): void;
+ refresh(): void;
+ clear(): void;
+ getViewportRoot(): HTMLElement;
+ getType: () => string;
+ getWidth(): number;
+ getHeight(): number;
+ dispose(): void;
+ getViewportRoot: () => HTMLElement;
+ getViewportRootOffset: () => {
+ offsetLeft: number;
+ offsetTop: number;
+ };
+ refreshHover(): void;
+ pathToImage(e: Path, dpr: number): ZRImage;
+ configLayer(zlevel: number, config: Dictionary<any>): void;
+ setBackgroundColor(backgroundColor: string | GradientObject | PatternObject): void;
+}
+
+interface HandlerProxyInterface extends Eventful {
+ handler: Handler;
+ dispose: () => void;
+ setCursor: (cursorStyle?: string) => void;
+}
+
+declare function shapeCompareFunc(a: Displayable, b: Displayable): number;
+declare class Storage {
+ private _roots;
+ private _displayList;
+ private _displayListLen;
+ traverse<T>(cb: (this: T, el: Element) => void, context?: T): void;
+ getDisplayList(update?: boolean, includeIgnore?: boolean): Displayable[];
+ updateDisplayList(includeIgnore?: boolean): void;
+ private _updateAndAddDisplayable;
+ addRoot(el: Element): void;
+ delRoot(el: Element | Element[]): void;
+ delAllRoots(): void;
+ getRoots(): Element<ElementProps>[];
+ dispose(): void;
+ displayableSortFunc: typeof shapeCompareFunc;
+}
+
+declare class HoveredResult {
+ x: number;
+ y: number;
+ target: Displayable;
+ topTarget: Displayable;
+ constructor(x?: number, y?: number);
+}
+declare type HandlerName = 'click' | 'dblclick' | 'mousewheel' | 'mouseout' | 'mouseup' | 'mousedown' | 'mousemove' | 'contextmenu';
+declare class Handler extends Eventful {
+ storage: Storage;
+ painter: PainterBase;
+ painterRoot: HTMLElement;
+ proxy: HandlerProxyInterface;
+ private _hovered;
+ private _gestureMgr;
+ private _draggingMgr;
+ _downEl: Element;
+ _upEl: Element;
+ _downPoint: [number, number];
+ constructor(storage: Storage, painter: PainterBase, proxy: HandlerProxyInterface, painterRoot: HTMLElement);
+ setHandlerProxy(proxy: HandlerProxyInterface): void;
+ mousemove(event: ZRRawEvent): void;
+ mouseout(event: ZRRawEvent): void;
+ resize(): void;
+ dispatch(eventName: HandlerName, eventArgs?: any): void;
+ dispose(): void;
+ setCursorStyle(cursorStyle: string): void;
+ dispatchToElement(targetInfo: {
+ target?: Element;
+ topTarget?: Element;
+ }, eventName: ElementEventName, event: ZRRawEvent): void;
+ findHover(x: number, y: number, exclude?: Displayable): HoveredResult;
+ processGesture(event: ZRRawEvent, stage?: 'start' | 'end' | 'change'): void;
+ click: (event: ZRRawEvent) => void;
+ mousedown: (event: ZRRawEvent) => void;
+ mouseup: (event: ZRRawEvent) => void;
+ mousewheel: (event: ZRRawEvent) => void;
+ dblclick: (event: ZRRawEvent) => void;
+ contextmenu: (event: ZRRawEvent) => void;
+}
+
+declare function parseXML(svg: Document | string | SVGElement): SVGElement;
+
+declare type MorphDividingMethod = 'split' | 'duplicate';
+
+interface LayerConfig {
+ clearColor?: string | GradientObject | PatternObject;
+ motionBlur?: boolean;
+ lastFrameAlpha?: number;
+}
+
+declare class ZRender {
+ dom: HTMLElement;
+ id: number;
+ storage: Storage;
+ painter: PainterBase;
+ handler: Handler;
+ animation: Animation;
+ private _sleepAfterStill;
+ private _stillFrameAccum;
+ private _needsRefresh;
+ private _needsRefreshHover;
+ private _darkMode;
+ private _backgroundColor;
+ constructor(id: number, dom: HTMLElement, opts?: ZRenderInitOpt);
+ add(el: Element): void;
+ remove(el: Element): void;
+ configLayer(zLevel: number, config: LayerConfig): void;
+ setBackgroundColor(backgroundColor: string | GradientObject | PatternObject): void;
+ getBackgroundColor(): string | GradientObject | PatternObject;
+ setDarkMode(darkMode: boolean): void;
+ isDarkMode(): boolean;
+ refreshImmediately(fromInside?: boolean): void;
+ refresh(): void;
+ flush(): void;
+ private _flush;
+ setSleepAfterStill(stillFramesCount: number): void;
+ wakeUp(): void;
+ addHover(el: Displayable): void;
+ removeHover(el: Path | TSpan | ZRImage): void;
+ clearHover(): void;
+ refreshHover(): void;
+ refreshHoverImmediately(): void;
+ resize(opts?: {
+ width?: number | string;
+ height?: number | string;
+ }): void;
+ clearAnimation(): void;
+ getWidth(): number;
+ getHeight(): number;
+ pathToImage(e: Path, dpr: number): ZRImage;
+ setCursorStyle(cursorStyle: string): void;
+ findHover(x: number, y: number): {
+ target: Displayable;
+ topTarget: Displayable;
+ };
+ on<Ctx>(eventName: ElementEventName, eventHandler: ElementEventCallback<Ctx, unknown>, context?: Ctx): this;
+ on<Ctx>(eventName: string, eventHandler: EventCallback<Ctx, unknown>, context?: Ctx): this;
+ off(eventName?: string, eventHandler?: EventCallback<unknown, unknown> | EventCallback<unknown, unknown, ElementEvent>): void;
+ trigger(eventName: string, event?: unknown): void;
+ clear(): void;
+ dispose(): void;
+}
+interface ZRenderInitOpt {
+ renderer?: string;
+ devicePixelRatio?: number;
+ width?: number | string;
+ height?: number | string;
+ useDirtyRect?: boolean;
+}
+interface ZRenderType extends ZRender {
+}
+
interface AriaLabelOption {
enabled?: boolean;
description?: string;
@@ -304,6 +1514,7 @@ interface AxisLabelOption extends Omit<TextCommonOption, 'color'> {
formatter?: AxisLabelFormatterOption | TimeAxisLabelFormatterOption;
interval?: 'auto' | number | ((index: number, value: string) => boolean);
color?: ColorString | ((value?: string | number, index?: number) => ColorString);
+ rich?: Dictionary<TextCommonOption>;
}
interface MinorTickOption {
show?: boolean;
@@ -326,7 +1537,7 @@ interface SplitAreaOption {
areaStyle?: AreaStyleOption<ZRColor[]>;
}
-interface BaseBarSeriesOption<StateOption, ExtraStateOption = unknown> extends SeriesOption<StateOption, ExtraStateOption>, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin {
+interface BaseBarSeriesOption<StateOption, ExtraStateOption = DefaultExtraStateOpts> extends SeriesOption<StateOption, ExtraStateOption>, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin {
barMinHeight?: number;
barMinAngle?: number;
barMaxWidth?: number;
@@ -354,7 +1565,7 @@ interface AngleAxisOption extends AxisBaseOption {
clockwise?: boolean;
splitNumber?: number;
axisLabel?: Omit<AxisBaseOption['axisLabel'], 'rotate'> & {
- rotate?: AxisBaseOption['axisLabel']['rotate'] | false;
+ rotate?: AxisBaseOption['axisLabel']['rotate'];
};
}
interface RadiusAxisOption extends AxisBaseOption {
@@ -371,7 +1582,7 @@ declare type BrushMode = 'single' | 'multiple';
interface MapStateOption {
itemStyle?: GeoItemStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
}
interface MapDataItemOption extends MapStateOption, StatesOptionMixin<MapStateOption>, OptionDataItemObject<OptionDataValueNumeric> {
cursor?: string;
@@ -434,20 +1645,20 @@ interface BrushOption extends ComponentOption, ModelFinderObject {
throttleDelay?: number;
inBrush?: VisualOptionFixed;
outOfBrush?: VisualOptionFixed;
- brushType: BrushTypeUncertain;
- brushStyle: {
- borderWidth: number;
- color: ZRColor;
- borderColor: ZRColor;
+ brushType?: BrushTypeUncertain;
+ brushStyle?: {
+ borderWidth?: number;
+ color?: ZRColor;
+ borderColor?: ZRColor;
};
- transformable: boolean;
- brushMode: BrushMode;
- removeOnClick: boolean;
+ transformable?: boolean;
+ brushMode?: BrushMode;
+ removeOnClick?: boolean;
}
interface BarStateOption {
itemStyle?: BarItemStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
}
interface BarItemStyleOption extends ItemStyleOption {
borderRadius?: number | number[];
@@ -455,7 +1666,7 @@ interface BarItemStyleOption extends ItemStyleOption {
interface BarDataItemOption extends BarStateOption, StatesOptionMixin<BarStateOption>, OptionDataItemObject<OptionDataValue> {
cursor?: string;
}
-interface BarSeriesOption extends BaseBarSeriesOption<BarStateOption>, BarStateOption, SeriesStackOptionMixin, SeriesSamplingOptionMixin {
+interface BarSeriesOption extends BaseBarSeriesOption<BarStateOption>, BarStateOption, SeriesStackOptionMixin, SeriesSamplingOptionMixin, SeriesEncodeOptionMixin {
type?: 'bar';
coordinateSystem?: 'cartesian2d' | 'polar';
clip?: boolean;
@@ -732,7 +1943,6 @@ interface PayloadItem {
interface Payload extends PayloadItem {
type: string;
escapeConnect?: boolean;
- statusChanged?: boolean;
batch?: PayloadItem[];
}
interface PayloadAnimationPart {
@@ -788,7 +1998,7 @@ declare type ECUnitOption = {
textStyle?: Pick<LabelOption, 'color' | 'fontStyle' | 'fontWeight' | 'fontSize' | 'fontFamily'>;
useUTC?: boolean;
[key: string]: ComponentOption | ComponentOption[] | Dictionary<unknown> | unknown;
- stateAnimation?: AnimationOption;
+ stateAnimation?: AnimationOption$1;
} & AnimationOptionMixin & ColorPaletteOptionMixin & AriaOptionMixin;
interface ECOption extends ECUnitOption {
baseOption?: ECUnitOption;
@@ -853,7 +2063,7 @@ declare type DimensionUserOuputEncode = {
declare type DecalDashArrayX = number | (number | number[])[];
declare type DecalDashArrayY = number | number[];
interface DecalObject {
- symbol?: string;
+ symbol?: string | (string | string[]);
symbolSize?: number;
symbolKeepAspect?: boolean;
color?: string;
@@ -916,7 +2126,7 @@ declare type AnimationDelayCallbackParam = {
};
declare type AnimationDurationCallback = (idx: number) => number;
declare type AnimationDelayCallback = (idx: number, params?: AnimationDelayCallbackParam) => number;
-interface AnimationOption {
+interface AnimationOption$1 {
duration?: number;
easing?: AnimationEasing;
delay?: number;
@@ -948,7 +2158,7 @@ interface SymbolOptionMixin<T = unknown> {
symbolSize?: number | number[] | (unknown extends T ? never : SymbolSizeCallback<T>);
symbolRotate?: number | (unknown extends T ? never : SymbolRotateCallback<T>);
symbolKeepAspect?: boolean;
- symbolOffset?: number[];
+ symbolOffset?: (string | number)[];
}
interface ItemStyleOption extends ShadowOptionMixin, BorderOptionMixin {
color?: ZRColor;
@@ -996,7 +2206,7 @@ interface TextCommonOption extends ShadowOptionMixin {
opacity?: number;
lineHeight?: number;
backgroundColor?: ColorString | {
- image: ImageLike;
+ image: ImageLike | string;
};
borderColor?: string;
borderWidth?: number;
@@ -1032,6 +2242,9 @@ interface LabelOption extends TextCommonOption {
valueAnimation?: boolean;
rich?: Dictionary<TextCommonOption>;
}
+interface SeriesLabelOption extends LabelOption {
+ formatter?: string | LabelFormatterCallback<CallbackDataParams>;
+}
interface LineLabelOption extends Omit<LabelOption, 'distance' | 'position'> {
position?: 'start' | 'middle' | 'end' | 'insideStart' | 'insideStartTop' | 'insideStartBottom' | 'insideMiddle' | 'insideMiddleTop' | 'insideMiddleBottom' | 'insideEnd' | 'insideEndTop' | 'insideEndBottom' | 'insideMiddleBottom';
distance?: number | number[];
@@ -1045,6 +2258,9 @@ interface LabelLineOption {
minTurnAngle?: number;
lineStyle?: LineStyleOption;
}
+interface SeriesLineLabelOption extends LineLabelOption {
+ formatter?: string | LabelFormatterCallback<CallbackDataParams>;
+}
interface LabelLayoutOptionCallbackParams {
dataIndex?: number;
dataType?: SeriesDataType;
@@ -1080,7 +2296,7 @@ interface TooltipFormatterCallback<T> {
declare type TooltipBuiltinPosition = 'inside' | 'top' | 'left' | 'right' | 'bottom';
declare type TooltipBoxLayoutOption = Pick<BoxLayoutOptionMixin, 'top' | 'left' | 'right' | 'bottom'>;
interface PositionCallback {
- (point: [number, number], params: CallbackDataParams | CallbackDataParams[], el: HTMLDivElement | Text | null, rect: RectLike | null, size: {
+ (point: [number, number], params: CallbackDataParams | CallbackDataParams[], el: HTMLDivElement | ZRText | null, rect: RectLike | null, size: {
contentSize: [number, number];
viewSize: [number, number];
}): number[] | string[] | TooltipBuiltinPosition | TooltipBoxLayoutOption;
@@ -1163,23 +2379,29 @@ interface ComponentOption {
zlevel?: number;
}
declare type BlurScope = 'coordinateSystem' | 'series' | 'global';
-interface StatesOptionMixin<StateOption = unknown, ExtraStateOpts extends {
- emphasis?: any;
+interface DefaultExtraStateOpts {
+ emphasis: any;
+ select: any;
+ blur: any;
+}
+interface DefaultExtraEmpasisState {
+ focus?: 'none' | 'self' | 'series';
+}
+interface ExtraStateOptsBase {
+ emphasis?: {
+ focus?: string;
+ };
select?: any;
blur?: any;
-} = unknown> {
- emphasis?: StateOption & {
- focus?: 'none' | 'self' | 'series' | (unknown extends ExtraStateOpts['emphasis']['focus'] ? never : ExtraStateOpts['emphasis']['focus']);
+}
+interface StatesOptionMixin<StateOption, ExtraStateOpts extends ExtraStateOptsBase = DefaultExtraStateOpts> {
+ emphasis?: StateOption & ExtraStateOpts['emphasis'] & {
blurScope?: BlurScope;
- } & Omit<ExtraStateOpts['emphasis'], 'focus'>;
+ };
select?: StateOption & ExtraStateOpts['select'];
blur?: StateOption & ExtraStateOpts['blur'];
}
-interface SeriesOption<StateOption = any, ExtraStateOpts extends {
- emphasis?: any;
- select?: any;
- blur?: any;
-} = unknown> extends ComponentOption, AnimationOptionMixin, ColorPaletteOptionMixin, StatesOptionMixin<StateOption, ExtraStateOpts> {
+interface SeriesOption<StateOption = any, ExtraStateOpts extends ExtraStateOptsBase = DefaultExtraStateOpts> extends ComponentOption, AnimationOptionMixin, ColorPaletteOptionMixin, StatesOptionMixin<StateOption, ExtraStateOpts> {
silent?: boolean;
blendMode?: string;
cursor?: string;
@@ -1193,7 +2415,7 @@ interface SeriesOption<StateOption = any, ExtraStateOpts extends {
seriesLayoutBy?: 'column' | 'row';
labelLine?: LabelLineOption;
labelLayout?: LabelLayoutOption | LabelLayoutOptionCallback;
- stateAnimation?: AnimationOption;
+ stateAnimation?: AnimationOption$1;
selectedMap?: Dictionary<boolean>;
selectedMode?: 'single' | 'multiple' | boolean;
}
@@ -1406,7 +2628,7 @@ interface ParallelCoordinateSystemOption extends ComponentOption, BoxLayoutOptio
}
interface ParallelAxisOption extends AxisBaseOption {
- dim?: number[];
+ dim?: number | number[];
parallelIndex?: number;
areaSelectStyle?: {
width?: number;
@@ -1552,6 +2774,7 @@ interface TimelineLabelOption extends Omit<LabelOption, 'position'> {
show?: boolean;
position?: 'auto' | 'left' | 'right' | 'top' | 'bottom' | number;
interval?: 'auto' | number;
+ formatter?: string | ((value: string | number, index: number) => string);
}
interface TimelineDataItemOption extends SymbolOptionMixin {
value?: OptionDataValue;
@@ -1799,18 +3022,19 @@ interface PiecewiseVisualMapOption extends VisualMapOption {
declare type LineDataValue = OptionDataValue | OptionDataValue[];
interface ExtraStateOption {
emphasis?: {
+ focus?: DefaultExtraEmpasisState['focus'];
scale?: boolean;
};
}
interface LineStateOption {
itemStyle?: ItemStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
}
interface LineDataItemOption extends SymbolOptionMixin, LineStateOption, StatesOptionMixin<LineStateOption, ExtraStateOption> {
name?: string;
value?: LineDataValue;
}
-interface LineEndLabelOption extends LabelOption {
+interface LineEndLabelOption extends SeriesLabelOption {
valueAnimation: boolean;
}
interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraStateOption & {
@@ -1824,11 +3048,11 @@ interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraStateOptio
lineStyle?: LineStyleOption;
areaStyle?: AreaStyleOption;
};
-}>, LineStateOption, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, SeriesStackOptionMixin, SeriesSamplingOptionMixin, SymbolOptionMixin {
+}>, LineStateOption, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, SeriesStackOptionMixin, SeriesSamplingOptionMixin, SymbolOptionMixin<CallbackDataParams>, SeriesEncodeOptionMixin {
type?: 'line';
coordinateSystem?: 'cartesian2d' | 'polar';
clip?: boolean;
- label?: LabelOption;
+ label?: SeriesLabelOption;
endLabel?: LineEndLabelOption;
lineStyle?: LineStyleOption;
areaStyle?: AreaStyleOption & {
@@ -1845,16 +3069,17 @@ interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraStateOptio
interface ScatterStateOption {
itemStyle?: ItemStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
}
interface ExtraStateOption$1 {
emphasis?: {
+ focus?: DefaultExtraEmpasisState['focus'];
scale?: boolean;
};
}
interface ScatterDataItemOption extends SymbolOptionMixin, ScatterStateOption, StatesOptionMixin<ScatterStateOption, ExtraStateOption$1>, OptionDataItemObject<OptionDataValue> {
}
-interface ScatterSeriesOption extends SeriesOption<ScatterStateOption, ExtraStateOption$1>, ScatterStateOption, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, SeriesOnCalendarOptionMixin, SeriesOnGeoOptionMixin, SeriesOnSingleOptionMixin, SeriesLargeOptionMixin, SeriesStackOptionMixin, SymbolOptionMixin {
+interface ScatterSeriesOption extends SeriesOption<ScatterStateOption, ExtraStateOption$1>, ScatterStateOption, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, SeriesOnCalendarOptionMixin, SeriesOnGeoOptionMixin, SeriesOnSingleOptionMixin, SeriesLargeOptionMixin, SeriesStackOptionMixin, SymbolOptionMixin<CallbackDataParams>, SeriesEncodeOptionMixin {
type?: 'scatter';
coordinateSystem?: string;
cursor?: string;
@@ -1870,19 +3095,20 @@ interface PieStateOption {
label?: PieLabelOption;
labelLine?: PieLabelLineOption;
}
-interface PieLabelOption extends Omit<LabelOption, 'rotate' | 'position'> {
+interface PieLabelOption extends Omit<SeriesLabelOption, 'rotate' | 'position'> {
rotate?: number;
alignTo?: 'none' | 'labelLine' | 'edge';
edgeDistance?: string | number;
bleedMargin?: number;
distanceToLabelLine?: number;
- position?: LabelOption['position'] | 'outer' | 'inner' | 'center';
+ position?: SeriesLabelOption['position'] | 'outer' | 'inner' | 'center';
}
interface PieLabelLineOption extends LabelLineOption {
maxSurfaceAngle?: number;
}
interface ExtraStateOption$2 {
emphasis?: {
+ focus?: DefaultExtraEmpasisState['focus'];
scale?: boolean;
scaleSize?: number;
};
@@ -1906,18 +3132,21 @@ interface PieSeriesOption extends Omit<SeriesOption<PieStateOption, ExtraStateOp
data?: OptionDataValueNumeric[] | OptionDataValueNumeric[][] | PieDataItemOption[];
}
+declare type RadarSeriesDataValue = OptionDataValue[];
interface RadarSeriesStateOption {
lineStyle?: LineStyleOption;
areaStyle?: AreaStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
itemStyle?: ItemStyleOption;
}
-interface RadarSeriesOption extends SeriesOption<RadarSeriesStateOption>, RadarSeriesStateOption, SymbolOptionMixin {
+interface RadarSeriesDataItemOption extends SymbolOptionMixin, RadarSeriesStateOption, StatesOptionMixin<RadarSeriesStateOption>, OptionDataItemObject<RadarSeriesDataValue> {
+}
+interface RadarSeriesOption extends SeriesOption<RadarSeriesStateOption>, RadarSeriesStateOption, SymbolOptionMixin<CallbackDataParams>, SeriesEncodeOptionMixin {
type?: 'radar';
coordinateSystem?: 'radar';
radarIndex?: number;
radarId?: string;
- data?: RadarSeriesStateOption[];
+ data?: (RadarSeriesDataItemOption | RadarSeriesDataValue)[];
}
interface CurveLineStyleOption extends LineStyleOption {
@@ -1926,15 +3155,15 @@ interface CurveLineStyleOption extends LineStyleOption {
interface TreeSeriesStateOption {
itemStyle?: ItemStyleOption;
lineStyle?: CurveLineStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
}
interface ExtraStateOption$3 {
emphasis?: {
- focus?: 'ancestor' | 'descendant';
+ focus?: DefaultExtraEmpasisState['focus'] | 'ancestor' | 'descendant';
scale?: boolean;
};
}
-interface TreeSeriesNodeItemOption extends SymbolOptionMixin, TreeSeriesStateOption, StatesOptionMixin<TreeSeriesStateOption, ExtraStateOption$3>, OptionDataItemObject<OptionDataValue> {
+interface TreeSeriesNodeItemOption extends SymbolOptionMixin<CallbackDataParams>, TreeSeriesStateOption, StatesOptionMixin<TreeSeriesStateOption, ExtraStateOption$3>, OptionDataItemObject<OptionDataValue> {
children?: TreeSeriesNodeItemOption[];
collapsed?: boolean;
link?: string;
@@ -1959,7 +3188,7 @@ declare type TreemapSeriesDataValue = number | number[];
interface BreadcrumbItemStyleOption extends ItemStyleOption {
textStyle?: LabelOption;
}
-interface TreemapSeriesLabelOption extends LabelOption {
+interface TreemapSeriesLabelOption extends SeriesLabelOption {
ellipsis?: boolean;
formatter?: string | ((params: CallbackDataParams) => string);
}
@@ -1972,7 +3201,7 @@ interface TreemapSeriesItemStyleOption extends ItemStyleOption {
}
interface ExtraStateOption$4 {
emphasis?: {
- focus?: 'descendant' | 'ancestor';
+ focus?: DefaultExtraEmpasisState['focus'] | 'descendant' | 'ancestor';
};
}
interface TreemapStateOption {
@@ -2007,8 +3236,8 @@ interface TreemapSeriesOption extends SeriesOption<TreemapStateOption, ExtraStat
size?: (number | string)[];
sort?: boolean | 'asc' | 'desc';
clipWindow?: 'origin' | 'fullscreen';
- squareRatio: number;
- leafDepth: number;
+ squareRatio?: number;
+ leafDepth?: number;
drillDownIcon?: string;
zoomToNodeRatio?: number;
nodeClick?: 'zoomToNode' | 'link';
@@ -2031,18 +3260,16 @@ interface GraphEdgeLineStyleOption extends LineStyleOption {
}
interface GraphNodeStateOption {
itemStyle?: ItemStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
+}
+interface ExtraEmphasisState {
+ focus?: DefaultExtraEmpasisState['focus'] | 'adjacency';
}
interface ExtraNodeStateOption {
- emphasis?: {
- focus?: 'adjacency';
- scale?: boolean;
- };
+ emphasis?: ExtraEmphasisState;
}
interface ExtraEdgeStateOption {
- emphasis?: {
- focus?: 'adjacency';
- };
+ emphasis?: ExtraEmphasisState;
}
interface GraphNodeItemOption extends SymbolOptionMixin, GraphNodeStateOption, GraphNodeStateOption, StatesOptionMixin<GraphNodeStateOption, ExtraNodeStateOption> {
id?: string;
@@ -2056,7 +3283,7 @@ interface GraphNodeItemOption extends SymbolOptionMixin, GraphNodeStateOption, G
}
interface GraphEdgeStateOption {
lineStyle?: GraphEdgeLineStyleOption;
- label?: LineLabelOption;
+ label?: SeriesLineLabelOption;
}
interface GraphEdgeItemOption extends GraphEdgeStateOption, StatesOptionMixin<GraphEdgeStateOption, ExtraEdgeStateOption>, GraphEdgeItemObject<OptionDataValueNumeric> {
value?: number;
@@ -2068,7 +3295,7 @@ interface GraphCategoryItemOption extends SymbolOptionMixin, GraphNodeStateOptio
name?: string;
value?: OptionDataValue;
}
-interface GraphSeriesOption extends SeriesOption, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, SeriesOnCalendarOptionMixin, SeriesOnGeoOptionMixin, SeriesOnSingleOptionMixin, SymbolOptionMixin, RoamOptionMixin, BoxLayoutOptionMixin {
+interface GraphSeriesOption extends SeriesOption, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, SeriesOnCalendarOptionMixin, SeriesOnGeoOptionMixin, SeriesOnSingleOptionMixin, SymbolOptionMixin<CallbackDataParams>, RoamOptionMixin, BoxLayoutOptionMixin {
type?: 'graph';
coordinateSystem?: string;
legendHoverLink?: boolean;
@@ -2083,31 +3310,27 @@ interface GraphSeriesOption extends SeriesOption, SeriesOnCartesianOptionMixin,
draggable?: boolean;
edgeSymbol?: string | string[];
edgeSymbolSize?: number | number[];
- edgeLabel?: LineLabelOption & {
- formatter?: LabelFormatterCallback | string;
- };
- label?: LabelOption & {
- formatter?: LabelFormatterCallback | string;
- };
+ edgeLabel?: SeriesLineLabelOption;
+ label?: SeriesLabelOption;
itemStyle?: ItemStyleOption;
lineStyle?: GraphEdgeLineStyleOption;
emphasis?: {
focus?: GraphNodeItemOption['emphasis']['focus'];
scale?: boolean;
- label?: LabelOption;
- edgeLabel?: LabelOption;
+ label?: SeriesLabelOption;
+ edgeLabel?: SeriesLabelOption;
itemStyle?: ItemStyleOption;
lineStyle?: LineStyleOption;
};
blur?: {
- label?: LabelOption;
- edgeLabel?: LabelOption;
+ label?: SeriesLabelOption;
+ edgeLabel?: SeriesLabelOption;
itemStyle?: ItemStyleOption;
lineStyle?: LineStyleOption;
};
select?: {
- label?: LabelOption;
- edgeLabel?: LabelOption;
+ label?: SeriesLabelOption;
+ edgeLabel?: SeriesLabelOption;
itemStyle?: ItemStyleOption;
lineStyle?: LineStyleOption;
};
@@ -2175,7 +3398,7 @@ interface GaugeDataItemOption extends GaugeStateOption, StatesOptionMixin<GaugeS
title?: TitleOption$1;
detail?: DetailOption;
}
-interface GaugeSeriesOption extends SeriesOption<GaugeStateOption>, GaugeStateOption, CircleLayoutOptionMixin {
+interface GaugeSeriesOption extends SeriesOption<GaugeStateOption>, GaugeStateOption, CircleLayoutOptionMixin, SeriesEncodeOptionMixin {
type?: 'gauge';
radius?: number | string;
startAngle?: number;
@@ -2188,7 +3411,7 @@ interface GaugeSeriesOption extends SeriesOption<GaugeStateOption>, GaugeStateOp
axisLine?: {
show?: boolean;
roundCap?: boolean;
- lineStyle: Omit<LineStyleOption, 'color'> & {
+ lineStyle?: Omit<LineStyleOption, 'color'> & {
color: GaugeColorStop[];
};
};
@@ -2216,7 +3439,7 @@ interface GaugeSeriesOption extends SeriesOption<GaugeStateOption>, GaugeStateOp
data?: (OptionDataValueNumeric | GaugeDataItemOption)[];
}
-declare type FunnelLabelOption = Omit<LabelOption, 'position'> & {
+declare type FunnelLabelOption = Omit<SeriesLabelOption, 'position'> & {
position?: LabelOption['position'] | 'outer' | 'inner' | 'center' | 'rightTop' | 'rightBottom' | 'leftTop' | 'leftBottom';
};
interface FunnelStateOption {
@@ -2230,7 +3453,7 @@ interface FunnelDataItemOption extends FunnelStateOption, StatesOptionMixin<Funn
height?: number | string;
};
}
-interface FunnelSeriesOption extends SeriesOption<FunnelStateOption>, FunnelStateOption, BoxLayoutOptionMixin {
+interface FunnelSeriesOption extends SeriesOption<FunnelStateOption>, FunnelStateOption, BoxLayoutOptionMixin, SeriesEncodeOptionMixin {
type?: 'funnel';
min?: number;
max?: number;
@@ -2246,7 +3469,7 @@ interface FunnelSeriesOption extends SeriesOption<FunnelStateOption>, FunnelStat
declare type ParallelSeriesDataValue = OptionDataValue[];
interface ParallelStateOption {
lineStyle?: LineStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
}
interface ParallelSeriesDataItemOption extends ParallelStateOption, StatesOptionMixin<ParallelStateOption> {
value?: ParallelSeriesDataValue[];
@@ -2263,7 +3486,7 @@ interface ParallelSeriesOption extends SeriesOption<ParallelStateOption>, Parall
tooltip?: SeriesTooltipOption;
parallelAxisDefault?: ParallelAxisOption;
emphasis?: {
- label?: LabelOption;
+ label?: SeriesLabelOption;
lineStyle?: LineStyleOption;
};
data?: (ParallelSeriesDataValue | ParallelSeriesDataItemOption)[];
@@ -2271,7 +3494,7 @@ interface ParallelSeriesOption extends SeriesOption<ParallelStateOption>, Parall
declare type FocusNodeAdjacency = boolean | 'inEdges' | 'outEdges' | 'allEdges';
interface SankeyNodeStateOption {
- label?: LabelOption;
+ label?: SeriesLabelOption;
itemStyle?: ItemStyleOption;
}
interface SankeyEdgeStateOption {
@@ -2284,7 +3507,7 @@ interface SankeyEdgeStyleOption extends LineStyleOption {
}
interface ExtraStateOption$5 {
emphasis?: {
- focus?: 'adjacency';
+ focus?: DefaultExtraEmpasisState['focus'] | 'adjacency';
};
}
interface SankeyNodeItemOption extends SankeyNodeStateOption, StatesOptionMixin<SankeyNodeStateOption, ExtraStateOption$5>, OptionDataItemObject<OptionDataValue> {
@@ -2322,17 +3545,18 @@ interface SankeySeriesOption extends SeriesOption<SankeyBothStateOption, ExtraSt
declare type BoxplotDataValue = OptionDataValueNumeric[];
interface BoxplotStateOption {
itemStyle?: ItemStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
}
interface BoxplotDataItemOption extends BoxplotStateOption, StatesOptionMixin<BoxplotStateOption, ExtraStateOption$6> {
value: BoxplotDataValue;
}
interface ExtraStateOption$6 {
emphasis?: {
+ focus?: DefaultExtraEmpasisState['focus'];
scale?: boolean;
};
}
-interface BoxplotSeriesOption extends SeriesOption<BoxplotStateOption, ExtraStateOption$6>, BoxplotStateOption, SeriesOnCartesianOptionMixin {
+interface BoxplotSeriesOption extends SeriesOption<BoxplotStateOption, ExtraStateOption$6>, BoxplotStateOption, SeriesOnCartesianOptionMixin, SeriesEncodeOptionMixin {
type?: 'boxplot';
coordinateSystem?: 'cartesian2d';
layout?: LayoutOrient;
@@ -2347,17 +3571,18 @@ interface CandlestickItemStyleOption extends ItemStyleOption {
}
interface CandlestickStateOption {
itemStyle?: CandlestickItemStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
}
interface CandlestickDataItemOption extends CandlestickStateOption, StatesOptionMixin<CandlestickStateOption, ExtraStateOption$7> {
value: CandlestickDataValue;
}
interface ExtraStateOption$7 {
emphasis?: {
+ focus?: DefaultExtraEmpasisState['focus'];
scale?: boolean;
};
}
-interface CandlestickSeriesOption extends SeriesOption<CandlestickStateOption, ExtraStateOption$7>, CandlestickStateOption, SeriesOnCartesianOptionMixin, SeriesLargeOptionMixin {
+interface CandlestickSeriesOption extends SeriesOption<CandlestickStateOption, ExtraStateOption$7>, CandlestickStateOption, SeriesOnCartesianOptionMixin, SeriesLargeOptionMixin, SeriesEncodeOptionMixin {
type?: 'candlestick';
coordinateSystem?: 'cartesian2d';
layout?: LayoutOrient;
@@ -2391,14 +3616,14 @@ interface SymbolDrawItemModelOption extends SymbolOptionMixin<object>, StatesOpt
declare type ScatterDataValue = OptionDataValue | OptionDataValue[];
interface EffectScatterStateOption {
itemStyle?: ItemStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
}
interface EffectScatterDataItemOption extends SymbolOptionMixin, EffectScatterStateOption, StatesOptionMixin<EffectScatterStateOption> {
name?: string;
value?: ScatterDataValue;
rippleEffect?: SymbolDrawItemModelOption['rippleEffect'];
}
-interface EffectScatterSeriesOption extends SeriesOption<EffectScatterStateOption>, EffectScatterStateOption, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, SeriesOnCalendarOptionMixin, SeriesOnGeoOptionMixin, SeriesOnSingleOptionMixin, SymbolOptionMixin {
+interface EffectScatterSeriesOption extends SeriesOption<EffectScatterStateOption>, EffectScatterStateOption, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, SeriesOnCalendarOptionMixin, SeriesOnGeoOptionMixin, SeriesOnSingleOptionMixin, SymbolOptionMixin<CallbackDataParams>, SeriesEncodeOptionMixin {
type?: 'effectScatter';
coordinateSystem?: string;
effectType?: 'ripple';
@@ -2432,7 +3657,7 @@ interface LinesLineStyleOption extends LineStyleOption {
}
interface LinesStateOption {
lineStyle?: LinesLineStyleOption;
- label?: LineLabelOption;
+ label?: SeriesLineLabelOption;
}
interface LinesDataItemOption extends LinesStateOption, StatesOptionMixin<LinesStateOption> {
name?: string;
@@ -2457,12 +3682,12 @@ interface LinesSeriesOption extends SeriesOption<LinesStateOption>, LinesStateOp
declare type HeatmapDataValue = OptionDataValue[];
interface HeatmapStateOption {
itemStyle?: ItemStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
}
interface HeatmapDataItemOption extends HeatmapStateOption, StatesOptionMixin<HeatmapStateOption> {
value: HeatmapDataValue;
}
-interface HeatmapSeriesOption extends SeriesOption<HeatmapStateOption>, HeatmapStateOption, SeriesOnCartesianOptionMixin, SeriesOnGeoOptionMixin {
+interface HeatmapSeriesOption extends SeriesOption<HeatmapStateOption>, HeatmapStateOption, SeriesOnCartesianOptionMixin, SeriesOnGeoOptionMixin, SeriesOnCalendarOptionMixin, SeriesEncodeOptionMixin {
type?: 'heatmap';
coordinateSystem?: 'cartesian2d' | 'geo' | 'calendar';
blurSize?: number;
@@ -2474,7 +3699,7 @@ interface HeatmapSeriesOption extends SeriesOption<HeatmapStateOption>, HeatmapS
interface PictorialBarStateOption {
itemStyle?: ItemStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
}
interface PictorialBarSeriesSymbolOption {
symbol?: string;
@@ -2491,6 +3716,7 @@ interface PictorialBarSeriesSymbolOption {
}
interface ExtraStateOption$8 {
emphasis?: {
+ focus?: DefaultExtraEmpasisState['focus'];
scale?: boolean;
};
}
@@ -2504,7 +3730,7 @@ interface PictorialBarSeriesOption extends BaseBarSeriesOption<PictorialBarState
data?: (PictorialBarDataItemOption | OptionDataValue | OptionDataValue[])[];
}
-interface ThemeRiverSeriesLabelOption extends LabelOption {
+interface ThemeRiverSeriesLabelOption extends SeriesLabelOption {
margin?: number;
}
declare type ThemerRiverDataItem = [OptionDataValueDate, OptionDataValueNumeric, string];
@@ -2523,15 +3749,15 @@ interface ThemeRiverSeriesOption extends SeriesOption<ThemeRiverStateOption>, Th
interface SunburstItemStyleOption extends ItemStyleOption {
borderRadius?: (number | string)[] | number | string;
}
-interface SunburstLabelOption extends Omit<LabelOption, 'rotate' | 'position'> {
+interface SunburstLabelOption extends Omit<SeriesLabelOption, 'rotate' | 'position'> {
rotate?: 'radial' | 'tangential' | number;
minAngle?: number;
silent?: boolean;
- position?: LabelOption['position'] | 'outside';
+ position?: SeriesLabelOption['position'] | 'outside';
}
interface ExtraStateOption$9 {
emphasis?: {
- focus?: 'descendant' | 'ancestor';
+ focus?: DefaultExtraEmpasisState['focus'] | 'descendant' | 'ancestor';
};
}
interface SunburstStateOption {
@@ -2670,7 +3896,7 @@ interface MarkerOption extends ComponentOption, AnimationOptionMixin {
interface MarkAreaStateOption {
itemStyle?: ItemStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
}
interface MarkAreaDataItemOptionBase extends MarkAreaStateOption, StatesOptionMixin<MarkAreaStateOption> {
name?: string;
@@ -2744,7 +3970,7 @@ interface GraphicComponentOption extends ComponentOption {
interface MarkLineStateOption {
lineStyle?: LineStyleOption;
itemStyle?: ItemStyleOption;
- label?: LineLabelOption;
+ label?: SeriesLineLabelOption;
}
interface MarkLineDataItemOptionBase extends MarkLineStateOption, StatesOptionMixin<MarkLineStateOption> {
name?: string;
@@ -2770,7 +3996,7 @@ interface MarkLineOption extends MarkerOption, MarkLineStateOption, StatesOption
interface MarkPointStateOption {
itemStyle?: ItemStyleOption;
- label?: LabelOption;
+ label?: SeriesLabelOption;
}
interface MarkPointDataItemOption extends MarkPointStateOption, StatesOptionMixin<MarkPointStateOption>, SymbolOptionMixin<CallbackDataParams>, MarkerPositionOption {
name: string;
@@ -2865,7 +4091,7 @@ declare class ECharts extends Eventful {
private _scheduler;
private _messageCenter;
private _pendingActions;
- protected _$eventProcessor: unknown;
+ protected _$eventProcessor: never;
private _disposed;
private _loadingFX;
private _labelManager;
diff --git a/src/common/config.js b/src/common/config.js
index ce0c0d7..db54037 100644
--- a/src/common/config.js
+++ b/src/common/config.js
@@ -120,8 +120,8 @@ export const SUPPORT_WEBP = (function () {
export const SCRIPT_URLS = {
localEChartsMinJS: 'http://localhost/echarts-next/dist/echarts.js',
- echartsMinJS: 'https://cdn.jsdelivr.net/npm/echarts@5.0.0-beta.2/dist/echarts.min.js',
- echartsDir: 'https://cdn.jsdelivr.net/npm/echarts@5.0.0-beta.2',
+ echartsMinJS: 'https://cdn.jsdelivr.net/npm/echarts@5.0.0-rc.1/dist/echarts.min.js',
+ echartsDir: 'https://cdn.jsdelivr.net/npm/echarts@5.0.0-rc.1',
echartsStatMinJS: 'https://cdn.jsdelivr.net/npm/echarts-stat@latest/dist/ecStat.min.js',
echartsGLMinJS: 'https://cdn.jsdelivr.net/npm/echarts-gl/dist/echarts-gl.min.js',
datGUIMinJS: 'https://cdn.jsdelivr.net/npm/dat.gui@0.6.5/build/dat.gui.min.js',
diff --git a/src/editor/CodeMonaco.vue b/src/editor/CodeMonaco.vue
index 3df51e4..a0f3d06 100644
--- a/src/editor/CodeMonaco.vue
+++ b/src/editor/CodeMonaco.vue
@@ -11,61 +11,58 @@ import {SCRIPT_URLS} from '../common/config';
import { ensureECharts } from './Preview.vue';
function loadTypes() {
- return new Promise(resolve => {
- fetch(store.cdnRoot + '/types/echarts.d.ts', {
- mode: 'cors'
- }).then(response => response.text()).then(code => {
-
- // validation settings
- monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({
- noSemanticValidation: false,
- noSyntaxValidation: false
- });
+ return fetch(store.cdnRoot + '/types/echarts.d.ts', {
+ mode: 'cors'
+ }).then(response => response.text()).then(code => {
+
+ // validation settings
+ monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({
+ noSemanticValidation: false,
+ noSyntaxValidation: false
+ });
- // compiler options
- monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
- target: monaco.languages.typescript.ScriptTarget.ES6,
- allowNonTsExtensions: true,
- noResolve: false
- });
+ // compiler options
+ monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
+ target: monaco.languages.typescript.ScriptTarget.ES6,
+ allowNonTsExtensions: true,
+ noResolve: false
+ });
- // console.log('file:///node_modules/@types/' + res[i].path);
- monaco.languages.typescript.typescriptDefaults.addExtraLib(
- code,
- // https://github.com/microsoft/monaco-editor/issues/667#issuecomment-468164794
- 'file:///node_modules/@types/echarts/index.d.ts'
- );
+ // console.log('file:///node_modules/@types/' + res[i].path);
+ monaco.languages.typescript.typescriptDefaults.addExtraLib(
+ code,
+ // https://github.com/microsoft/monaco-editor/issues/667#issuecomment-468164794
+ 'file:///node_modules/@types/echarts/index.d.ts'
+ );
- monaco.languages.typescript.typescriptDefaults.addExtraLib(
- `
-import {init, EChartsOption} from 'echarts';
+ monaco.languages.typescript.typescriptDefaults.addExtraLib(
+`import {init, EChartsOption} from 'echarts';
// Declare to global namespace.
declare global {
- declare const $: any;
- declare const ROOT_PATH: string;
- declare const app: {
- configParameters: {
- [key: string]: ({
- options: { [key: string]: string
- }) | ({
- min?: number
- max?: number
- })
- }
- config: {
- onChange: () => void
- [key: string]: string | number | function
- }
- [key: string]: any
- };
- declare const myChart: ReturnType<typeof init>;
- declare var option: EChartsOption;
+declare const $: any;
+declare const ROOT_PATH: string;
+declare const app: {
+ configParameters: {
+ [key: string]: ({
+ options: { [key: string]: string
+ }) | ({
+ min?: number
+ max?: number
+ })
+ }
+ config: {
+ onChange: () => void
+ [key: string]: string | number | function
+ }
+ [key: string]: any
+};
+declare const myChart: ReturnType<typeof init>;
+declare var option: EChartsOption;
}
`,
- 'file:///example.d.ts'
- );
- resolve();
- });
+ 'file:///example.d.ts'
+ );
+ return;
});
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org