├── test ├── runTest │ ├── actions │ │ ├── axes.json │ │ ├── line-crash.json │ │ ├── line-animation.json │ │ ├── boxplot.json │ │ ├── gauge.json │ │ ├── toolbox-textStyle.json │ │ ├── radar2.json │ │ ├── tooltip-rich.json │ │ ├── toolbox-tooltip.json │ │ ├── pie-animation.json │ │ ├── treemap-option.json │ │ ├── gauge-progress.json │ │ ├── sankey-depth.json │ │ ├── line-boldWhenHover.json │ │ ├── media-pie.json │ │ ├── line.json │ │ ├── gauge-distance.json │ │ ├── gauge-pointer.json │ │ ├── symbol2.json │ │ ├── gauge-group-title-detail.json │ │ ├── media-dataZoom.json │ │ ├── min-max-function.json │ │ ├── allZero.json │ │ ├── getOption.json │ │ ├── bar-start.json │ │ ├── polarScatter.json │ │ ├── mapWorld.json │ │ ├── largeLine-tooltip.json │ │ ├── dataZoom-rainfall-inside.json │ │ ├── radar4.json │ │ ├── tooltip-setOption.json │ │ ├── candlestick-large2.json │ │ ├── gauge-simple.json │ │ ├── pie-calculable.json │ │ ├── axis-boundaryGap.json │ │ ├── bmap.json │ │ ├── timeScale2.json │ │ ├── pie-action.json │ │ ├── heatmap.json │ │ ├── aria-line-bar.json │ │ ├── candlestick-empty.json │ │ ├── graph.json │ │ ├── bar3.json │ │ ├── connect-manually.json │ │ ├── bar-polar-stack.json │ │ ├── graph-grid.json │ │ ├── dataZoom-extreme.json │ │ ├── update.js │ │ ├── dynamic-splitNumber.json │ │ ├── bar-polar-multi-series.json │ │ ├── dataZoomHighPrecision.json │ │ └── bar-polar-null-data-radial.json │ ├── config.js │ └── runtime │ │ └── shim.js ├── data │ ├── handle.png │ ├── handle2.png │ ├── iphone.png │ ├── hill-Kilimanjaro.png │ ├── hill-Qomolangma.png │ ├── weather │ │ ├── sunny_128.png │ │ ├── cloudy_128.png │ │ └── showers_128.png │ ├── tree-simple2.json │ ├── Michelson-Morley.json.js │ └── aqi │ │ ├── processAQI.js │ │ ├── BJdata.js │ │ ├── GZdata.js │ │ └── SHdata.js ├── asset │ └── echarts-logo.png ├── types │ ├── basic.ts │ └── importPartial.ts ├── ut │ ├── tsconfig.json │ └── core │ │ └── setup.ts ├── build │ ├── removeDEV │ │ ├── expect │ │ │ └── code.expect.js │ │ └── src │ │ │ └── code.src.js │ └── esm2cjs │ │ ├── src │ │ ├── export-default0.src.js │ │ ├── export-default1.src.js │ │ ├── export-default3.src.js │ │ ├── export-default2.src.js │ │ └── forbiden-export.src.js │ │ └── expect │ │ ├── export-default0.expect.js │ │ ├── export-default1.expect.js │ │ ├── export-default3.expect.js │ │ ├── forbiden-export.expect.js │ │ └── export-default2.expect.js ├── stream-basic.css └── -cases.html ├── asset ├── logo.png └── contributing-inspect.png ├── .vscode └── settings.json ├── .huskyrc ├── .gitattributes ├── .npmignore ├── NOTICE ├── .eslintignore ├── .github ├── ISSUE_TEMPLATE.md ├── workflows │ └── nodejs.yml └── pull_request_template.md ├── .editorconfig ├── tsconfig.json ├── index.d.ts ├── src ├── echarts.blank.ts ├── global.d.ts ├── chart │ ├── line.ts │ ├── map.ts │ ├── pie.ts │ ├── tree.ts │ ├── funnel.ts │ ├── gauge.ts │ ├── radar.ts │ ├── sankey.ts │ ├── scatter.ts │ ├── treemap.ts │ ├── bar.ts │ ├── custom.ts │ ├── graph.ts │ ├── lines.ts │ ├── parallel.ts │ ├── sunburst.ts │ ├── candlestick.ts │ ├── heatmap.ts │ ├── themeRiver.ts │ ├── boxplot.ts │ ├── effectScatter.ts │ ├── pictorialBar.ts │ ├── gauge │ │ └── install.ts │ ├── heatmap │ │ └── install.ts │ ├── boxplot │ │ └── boxplotVisual.ts │ ├── graph │ │ └── circularLayout.ts │ ├── effectScatter │ │ └── install.ts │ ├── lines │ │ └── install.ts │ ├── candlestick │ │ └── preprocessor.ts │ ├── funnel │ │ └── install.ts │ ├── bar │ │ └── installPictorialBar.ts │ ├── themeRiver │ │ └── install.ts │ └── tree │ │ └── install.ts ├── component │ ├── aria.ts │ ├── brush.ts │ ├── polar.ts │ ├── title.ts │ ├── dataset.ts │ ├── graphic.ts │ ├── grid.ts │ ├── toolbox.ts │ ├── tooltip.ts │ ├── calendar.ts │ ├── geo.ts │ ├── gridSimple.ts │ ├── radar.ts │ ├── singleAxis.ts │ ├── transform.ts │ ├── visualMap.ts │ ├── axisPointer.ts │ ├── dataZoom.ts │ ├── markArea.ts │ ├── markLine.ts │ ├── parallel.ts │ ├── dataZoomInside.ts │ ├── dataZoomSlider.ts │ ├── visualMapPiecewise.ts │ ├── visualMapContinuous.ts │ ├── timeline.ts │ ├── markPoint.ts │ ├── legend.ts │ ├── legendScroll.ts │ ├── legendPlain.ts │ ├── timeline │ │ └── TimelineView.ts │ ├── dataZoomSelect.ts │ ├── dataZoom │ │ ├── SelectZoomView.ts │ │ ├── SelectZoomModel.ts │ │ ├── installDataZoomSelect.ts │ │ ├── installDataZoomSlider.ts │ │ ├── install.ts │ │ └── installDataZoomInside.ts │ ├── grid │ │ └── install.ts │ ├── legend │ │ └── install.ts │ ├── transform │ │ └── install.ts │ ├── aria │ │ └── install.ts │ ├── tooltip │ │ └── helper.ts │ ├── radar │ │ └── install.ts │ ├── visualMap │ │ ├── installVisualMapPiecewise.ts │ │ ├── installVisualMapContinuous.ts │ │ ├── install.ts │ │ └── visualMapAction.ts │ ├── calendar │ │ └── install.ts │ └── marker │ │ ├── installMarkLine.ts │ │ ├── installMarkArea.ts │ │ └── installMarkPoint.ts ├── export │ ├── api │ │ ├── time.ts │ │ ├── util.ts │ │ ├── format.ts │ │ ├── number.ts │ │ └── graphic.ts │ ├── all.ts │ └── renderers.ts ├── renderer │ ├── installSVGRenderer.ts │ └── installCanvasRenderer.ts ├── visual │ └── commonVisualTypes.ts ├── util │ ├── event.ts │ ├── innerStore.ts │ └── vendor.ts ├── theme │ └── light.ts └── coord │ ├── AxisBaseModel.ts │ ├── geo │ └── fix │ │ └── geoCoord.ts │ └── radar │ └── IndicatorAxis.ts ├── .headerignore ├── .lgtm.yml ├── .asf.yaml └── benchmark └── gulpfile.js /test/runTest/actions/axes.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /asset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliuq/echarts/master/asset/logo.png -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "./node_modules/typescript/lib" 3 | } -------------------------------------------------------------------------------- /test/data/handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliuq/echarts/master/test/data/handle.png -------------------------------------------------------------------------------- /test/data/handle2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliuq/echarts/master/test/data/handle2.png -------------------------------------------------------------------------------- /test/data/iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliuq/echarts/master/test/data/iphone.png -------------------------------------------------------------------------------- /.huskyrc: -------------------------------------------------------------------------------- 1 | { 2 | "hooks": { 3 | "pre-commit": "npm run lint && npm run checktype", 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/asset/echarts-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliuq/echarts/master/test/asset/echarts-logo.png -------------------------------------------------------------------------------- /asset/contributing-inspect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliuq/echarts/master/asset/contributing-inspect.png -------------------------------------------------------------------------------- /test/data/hill-Kilimanjaro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliuq/echarts/master/test/data/hill-Kilimanjaro.png -------------------------------------------------------------------------------- /test/data/hill-Qomolangma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliuq/echarts/master/test/data/hill-Qomolangma.png -------------------------------------------------------------------------------- /test/data/weather/sunny_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliuq/echarts/master/test/data/weather/sunny_128.png -------------------------------------------------------------------------------- /test/data/weather/cloudy_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliuq/echarts/master/test/data/weather/cloudy_128.png -------------------------------------------------------------------------------- /test/data/weather/showers_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliuq/echarts/master/test/data/weather/showers_128.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # for pull request size bot 2 | # excludes all files from test directory 3 | test/** linguist-generated=true 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /test 2 | /map/tool 3 | /map/raw 4 | /theme/tool 5 | /theme/thumb 6 | /todo 7 | /npm-debug.log 8 | /benchmark 9 | /src 10 | .DS_Store 11 | Thumbs.db 12 | Desktop.ini 13 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Apache ECharts 2 | Copyright 2017-2021 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /test/runTest/actions/line-crash.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":319,"x":43,"y":77},{"type":"mouseup","time":419,"x":43,"y":77},{"time":420,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1586489537278}] -------------------------------------------------------------------------------- /test/runTest/actions/line-animation.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":596,"x":28,"y":16},{"type":"mouseup","time":698,"x":28,"y":16},{"time":699,"delay":2000,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568042380534}] -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /node_modules 3 | /build 4 | /i18n 5 | /extension-esm 6 | /extension 7 | /lib 8 | /esm 9 | /index.js 10 | /index.blank.js 11 | /index.common.js 12 | /index.simple.js 13 | /echarts.all.js 14 | /echarts.blank.js 15 | /echarts.common.js 16 | /echarts.simple.js 17 | -------------------------------------------------------------------------------- /test/runTest/actions/boxplot.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"valuechange","selector":"div.dg.ac>div.dg.main.a>ul>li.cr.string>div>div.c>select","value":"vertical","time":1358,"target":"select"},{"time":1359,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568029071032}] -------------------------------------------------------------------------------- /test/types/basic.ts: -------------------------------------------------------------------------------- 1 | import * as echarts from '../../'; 2 | 3 | const dom = document.createElement('div'); 4 | dom.className = 'chart'; 5 | 6 | const chart = echarts.init(dom); 7 | 8 | const option: echarts.EChartsOption = { 9 | series: [{ 10 | type: 'bar' 11 | }] 12 | }; 13 | chart.setOption(option); -------------------------------------------------------------------------------- /test/runTest/actions/gauge.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"screenshot","time":3972}],"scrollY":0,"scrollX":0,"timestamp":1602245762818},{"name":"Action 2","ops":[{"type":"screenshot","time":2806}],"scrollY":605,"scrollX":0,"timestamp":1602246030112},{"name":"Action 3","ops":[{"type":"screenshot","time":2428}],"scrollY":1008,"scrollX":0,"timestamp":1602246050732}] -------------------------------------------------------------------------------- /test/runTest/actions/toolbox-textStyle.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":79,"x":216,"y":74},{"type":"mousemove","time":280,"x":216,"y":62},{"type":"mousemove","time":487,"x":216,"y":57},{"type":"screenshot","time":988},{"type":"mousemove","time":1398,"x":217,"y":57},{"type":"mousemove","time":1603,"x":238,"y":54},{"type":"screenshot","time":2405}],"scrollY":0,"scrollX":0,"timestamp":1568043931412}] -------------------------------------------------------------------------------- /test/runTest/actions/radar2.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"screenshot","time":988},{"type":"mousemove","time":1182,"x":193,"y":18},{"type":"mousemove","time":1387,"x":234,"y":40},{"type":"mousemove","time":1606,"x":241,"y":43},{"type":"screenshot","time":2473},{"type":"mousedown","time":3089,"x":241,"y":43},{"type":"mouseup","time":3166,"x":241,"y":43},{"time":3167,"delay":500,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568043179047}] -------------------------------------------------------------------------------- /test/runTest/actions/tooltip-rich.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":572,"x":378,"y":458},{"type":"mousemove","time":773,"x":267,"y":452},{"type":"screenshot","time":1652},{"type":"mousemove","time":1831,"x":268,"y":452},{"type":"mousemove","time":2031,"x":426,"y":399},{"type":"mousemove","time":2231,"x":594,"y":314},{"type":"mousemove","time":2436,"x":603,"y":309},{"type":"screenshot","time":3072}],"scrollY":0,"scrollX":0,"timestamp":1568044631848}] -------------------------------------------------------------------------------- /test/runTest/actions/toolbox-tooltip.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":148,"x":346,"y":78},{"type":"mousemove","time":354,"x":365,"y":43},{"type":"mousemove","time":565,"x":368,"y":13},{"type":"mousemove","time":766,"x":368,"y":12},{"type":"screenshot","time":1455},{"type":"mousemove","time":1591,"x":369,"y":12},{"type":"mousemove","time":1791,"x":394,"y":15},{"type":"mousemove","time":1998,"x":395,"y":15}],"scrollY":0,"scrollX":0,"timestamp":1568043940036}] -------------------------------------------------------------------------------- /test/runTest/actions/pie-animation.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":2246,"x":225,"y":453},{"type":"mousemove","time":2453,"x":225,"y":453},{"type":"mousemove","time":2845,"x":225,"y":453},{"type":"mousemove","time":3045,"x":268,"y":465},{"type":"mousemove","time":3245,"x":312,"y":468},{"type":"mousemove","time":3449,"x":328,"y":469},{"type":"mousemove","time":3669,"x":328,"y":469},{"type":"screenshot","time":4152}],"scrollY":390,"scrollX":0,"timestamp":1583724042816}] -------------------------------------------------------------------------------- /test/runTest/actions/treemap-option.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":362,"x":261,"y":394},{"type":"mouseup","time":414,"x":261,"y":394},{"time":415,"delay":600,"type":"screenshot-auto"},{"type":"mousemove","time":1255,"x":262,"y":394},{"type":"mousemove","time":1461,"x":280,"y":397},{"type":"mousedown","time":1547,"x":280,"y":397},{"type":"mouseup","time":1644,"x":280,"y":397},{"time":1645,"delay":600,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568045450618}] -------------------------------------------------------------------------------- /test/data/tree-simple2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flare", 3 | "children": [ 4 | { 5 | "name": "data", 6 | "children": [ 7 | { 8 | "name": "converters", 9 | "children": [ 10 | {"name": "DelimitedTextConverter", "value": 4294} 11 | ] 12 | } 13 | ] 14 | }, 15 | { 16 | "name": "display", 17 | "children": [ 18 | {"name": "DirtySprite", "value": 8833} 19 | ] 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 9 | 10 | This issue is not created by [echarts-issue-helper](https://ecomfe.github.io/echarts-issue-helper) and will be soon closed. 11 | -------------------------------------------------------------------------------- /test/runTest/actions/gauge-progress.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"screenshot","time":1573}],"scrollY":0,"scrollX":0,"timestamp":1602246699614},{"name":"Action 2","ops":[{"type":"screenshot","time":1145}],"scrollY":460,"scrollX":0,"timestamp":1602246707775},{"name":"Action 3","ops":[{"type":"screenshot","time":1198}],"scrollY":910,"scrollX":0,"timestamp":1602246714393},{"name":"Action 4","ops":[{"type":"screenshot","time":1279}],"scrollY":1378,"scrollX":0,"timestamp":1602246720625},{"name":"Action 5","ops":[{"type":"screenshot","time":1430}],"scrollY":1708,"scrollX":0,"timestamp":1602246726107}] -------------------------------------------------------------------------------- /test/ut/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES3", 4 | 5 | "noImplicitAny": true, 6 | "noImplicitThis": true, 7 | "strictBindCallApply": true, 8 | "removeComments": true, 9 | "sourceMap": true, 10 | 11 | // https://github.com/ezolenko/rollup-plugin-typescript2/issues/12#issuecomment-536173372 12 | "moduleResolution": "node", 13 | 14 | "importHelpers": true, 15 | 16 | "pretty": true 17 | }, 18 | "include": [ 19 | "../../src/global.d.ts", 20 | "**/*.ts" 21 | ], 22 | "exclude": [ 23 | ] 24 | } -------------------------------------------------------------------------------- /test/runTest/actions/sankey-depth.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":255,"x":33,"y":417},{"type":"mousemove","time":455,"x":56,"y":414},{"type":"mousemove","time":660,"x":57,"y":414},{"type":"mousemove","time":1223,"x":56,"y":414},{"type":"screenshot","time":1278},{"type":"mousemove","time":1423,"x":94,"y":413},{"type":"mousemove","time":1623,"x":195,"y":410},{"type":"mousemove","time":2457,"x":195,"y":409},{"type":"screenshot","time":2474},{"type":"mousemove","time":2657,"x":203,"y":341},{"type":"mousemove","time":2866,"x":204,"y":322},{"type":"screenshot","time":3604}],"scrollY":0,"scrollX":0,"timestamp":1568043274163}] -------------------------------------------------------------------------------- /test/runTest/actions/line-boldWhenHover.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":71,"x":357,"y":475},{"type":"mousemove","time":272,"x":352,"y":445},{"type":"screenshot","time":884},{"type":"mousemove","time":906,"x":352,"y":448},{"type":"mousemove","time":1106,"x":350,"y":488},{"type":"mousemove","time":1311,"x":349,"y":490},{"type":"mousemove","time":1748,"x":355,"y":488},{"type":"mousemove","time":1955,"x":408,"y":457},{"type":"mousemove","time":2164,"x":422,"y":449},{"type":"mousemove","time":2948,"x":421,"y":456},{"type":"mousemove","time":3148,"x":395,"y":524},{"type":"screenshot","time":3644}],"scrollY":0,"scrollX":0,"timestamp":1603949790291}] -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | charset = utf-8 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true 8 | 9 | [**.js] 10 | indent_style = space 11 | indent_size = 4 12 | 13 | [**.css] 14 | indent_style = space 15 | indent_size = 4 16 | 17 | [**.less] 18 | indent_style = space 19 | indent_size = 4 20 | 21 | [**.styl] 22 | indent_style = space 23 | indent_size = 4 24 | 25 | [**.html] 26 | indent_style = space 27 | indent_size = 4 28 | 29 | [**.tpl] 30 | indent_style = space 31 | indent_size = 4 32 | 33 | [**.json] 34 | indent_style = space 35 | indent_size = 4 36 | 37 | [*.md] 38 | trim_trailing_whitespace = false 39 | -------------------------------------------------------------------------------- /test/runTest/actions/media-pie.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":407,"x":705,"y":561},{"type":"mousemove","time":558,"x":701,"y":554},{"type":"mousemove","time":758,"x":614,"y":399},{"type":"mousemove","time":959,"x":613,"y":388},{"type":"mouseup","time":1104,"x":613,"y":388},{"time":1105,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":1665,"x":613,"y":388},{"type":"mousemove","time":1744,"x":612,"y":388},{"type":"mousemove","time":1952,"x":454,"y":360},{"type":"mousemove","time":2174,"x":406,"y":358},{"type":"mouseup","time":2374,"x":406,"y":358},{"time":2375,"delay":400,"type":"screenshot-auto"}],"scrollY":112,"scrollX":0,"timestamp":1568042656419}] -------------------------------------------------------------------------------- /test/data/Michelson-Morley.json.js: -------------------------------------------------------------------------------- 1 | // five experiments. 2 | // each experiments has 20 runs. 3 | // speed(km/s minus 299,000) 4 | define([ 5 | [850, 740, 900, 1070, 930, 850, 950, 980, 980, 880, 1000, 980, 930, 650, 760, 810, 1000, 1000, 960, 960], 6 | [960, 940, 960, 940, 880, 800, 850, 880, 900, 840, 830, 790, 810, 880, 880, 830, 800, 790, 760, 800], 7 | [880, 880, 880, 860, 720, 720, 620, 860, 970, 950, 880, 910, 850, 870, 840, 840, 850, 840, 840, 840], 8 | [890, 810, 810, 820, 800, 770, 760, 740, 750, 760, 910, 920, 890, 860, 880, 720, 840, 850, 850, 780], 9 | [890, 840, 780, 810, 760, 810, 790, 810, 820, 850, 870, 870, 810, 740, 810, 940, 950, 800, 810, 870] 10 | ]); -------------------------------------------------------------------------------- /test/runTest/actions/line.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":395,"x":563,"y":47},{"type":"mousemove","time":606,"x":509,"y":36},{"type":"mousemove","time":826,"x":506,"y":35},{"type":"mousedown","time":1019,"x":506,"y":35},{"type":"mouseup","time":1169,"x":506,"y":35},{"time":1170,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":2195,"x":506,"y":35},{"type":"mouseup","time":2376,"x":506,"y":35},{"time":2377,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2877,"x":512,"y":36},{"type":"mousemove","time":3077,"x":566,"y":41},{"type":"mousemove","time":3287,"x":574,"y":45},{"type":"screenshot","time":4707}],"scrollY":46,"scrollX":0,"timestamp":1572413537032}] -------------------------------------------------------------------------------- /test/runTest/actions/gauge-distance.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"screenshot","time":3170}],"scrollY":0,"scrollX":0,"timestamp":1602246267936},{"name":"Action 2","ops":[{"type":"screenshot","time":2585}],"scrollY":714,"scrollX":0,"timestamp":1602246285822},{"name":"Action 3","ops":[{"type":"screenshot","time":2051}],"scrollY":1693,"scrollX":0,"timestamp":1602246296183},{"name":"Action 4","ops":[{"type":"screenshot","time":1388}],"scrollY":2476,"scrollX":0,"timestamp":1602246309308},{"name":"Action 5","ops":[{"type":"screenshot","time":1445}],"scrollY":3584,"scrollX":0,"timestamp":1602246320327},{"name":"Action 6","ops":[{"type":"screenshot","time":1831}],"scrollY":4544,"scrollX":0,"timestamp":1602246332115}] -------------------------------------------------------------------------------- /test/runTest/actions/gauge-pointer.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"screenshot","time":1824}],"scrollY":0,"scrollX":0,"timestamp":1602246538416},{"name":"Action 2","ops":[{"type":"screenshot","time":1348}],"scrollY":481,"scrollX":0,"timestamp":1602246547107},{"name":"Action 3","ops":[{"type":"screenshot","time":1242}],"scrollY":952,"scrollX":0,"timestamp":1602246555653},{"name":"Action 4","ops":[{"type":"screenshot","time":1149}],"scrollY":1432,"scrollX":0,"timestamp":1602246561913},{"name":"Action 5","ops":[{"type":"screenshot","time":1278}],"scrollY":1925,"scrollX":0,"timestamp":1602246567775},{"name":"Action 6","ops":[{"type":"screenshot","time":1155}],"scrollY":2292,"scrollX":0,"timestamp":1602246574297}] -------------------------------------------------------------------------------- /test/runTest/actions/symbol2.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":339,"x":40,"y":109},{"type":"mousemove","time":540,"x":57,"y":84},{"type":"mousemove","time":745,"x":59,"y":77},{"type":"mousedown","time":778,"x":59,"y":77},{"type":"mouseup","time":863,"x":59,"y":77},{"time":864,"delay":600,"type":"screenshot-auto"},{"type":"mousemove","time":1306,"x":72,"y":77},{"type":"mousemove","time":1506,"x":232,"y":76},{"type":"mousemove","time":1714,"x":236,"y":75},{"type":"mousedown","time":1832,"x":236,"y":75},{"type":"mousemove","time":1839,"x":236,"y":75},{"type":"mouseup","time":1913,"x":236,"y":75},{"time":1914,"delay":600,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568043731596}] -------------------------------------------------------------------------------- /test/runTest/actions/gauge-group-title-detail.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"screenshot","time":3413}],"scrollY":0,"scrollX":0,"timestamp":1602246421396},{"name":"Action 2","ops":[{"type":"screenshot","time":1686}],"scrollY":458,"scrollX":0,"timestamp":1602246432833},{"name":"Action 3","ops":[{"type":"screenshot","time":1853}],"scrollY":911,"scrollX":0,"timestamp":1602246445097},{"name":"Action 4","ops":[{"type":"screenshot","time":1876}],"scrollY":1374,"scrollX":0,"timestamp":1602246452846},{"name":"Action 5","ops":[{"type":"screenshot","time":1764}],"scrollY":1832,"scrollX":0,"timestamp":1602246460967},{"name":"Action 6","ops":[{"type":"screenshot","time":2066}],"scrollY":2148,"scrollX":0,"timestamp":1602246468649}] -------------------------------------------------------------------------------- /test/data/aqi/processAQI.js: -------------------------------------------------------------------------------- 1 | function processAQI(arr) { 2 | for (var i = 0; i < arr.length; i++) { 3 | var line = arr[i]; 4 | var aqi = line[1]; 5 | 6 | if (aqi <= 50) { 7 | line[7] = '"优"'; 8 | } 9 | else if (aqi <= 100) { 10 | line[7] = '"良"'; 11 | } 12 | else if (aqi <= 150) { 13 | line[7] = '"轻度污染"'; 14 | } 15 | else if (aqi <= 200) { 16 | line[7] = '"中度污染"'; 17 | } 18 | else if (aqi <= 300) { 19 | line[7] = '"重度污染"'; 20 | } 21 | else { 22 | line[7] = '"严重污染"'; 23 | } 24 | } 25 | 26 | console.log(arr.join('],\n [')); 27 | } -------------------------------------------------------------------------------- /test/runTest/actions/media-dataZoom.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":1255,"x":704,"y":553},{"type":"mousemove","time":1325,"x":704,"y":551},{"type":"mousemove","time":1531,"x":709,"y":450},{"type":"mousemove","time":1741,"x":727,"y":370},{"type":"mousemove","time":1949,"x":727,"y":365},{"type":"mouseup","time":2099,"x":727,"y":365},{"time":2100,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":2583,"x":727,"y":365},{"type":"mousemove","time":2660,"x":724,"y":365},{"type":"mousemove","time":2860,"x":522,"y":384},{"type":"mousemove","time":3067,"x":391,"y":394},{"type":"mouseup","time":3340,"x":391,"y":394},{"time":3341,"delay":400,"type":"screenshot-auto"}],"scrollY":112,"scrollX":0,"timestamp":1568042669858}] -------------------------------------------------------------------------------- /test/runTest/actions/min-max-function.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":355,"x":129,"y":377},{"type":"mousemove","time":489,"x":132,"y":377},{"type":"mousemove","time":689,"x":251,"y":381},{"type":"mousemove","time":889,"x":363,"y":383},{"type":"mouseup","time":1099,"x":363,"y":383},{"time":1100,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1790,"x":363,"y":382},{"type":"mousemove","time":1990,"x":361,"y":380},{"type":"mousedown","time":2013,"x":361,"y":380},{"type":"mousemove","time":2190,"x":484,"y":380},{"type":"mousemove","time":2390,"x":517,"y":380},{"type":"mouseup","time":2500,"x":517,"y":380},{"time":2501,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568042683404}] -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES3", 4 | 5 | "noImplicitAny": true, 6 | "noImplicitThis": true, 7 | "strictBindCallApply": true, 8 | "removeComments": false, 9 | "sourceMap": true, 10 | 11 | // https://github.com/ezolenko/rollup-plugin-typescript2/issues/12#issuecomment-536173372 12 | "moduleResolution": "node", 13 | 14 | "declaration": true, 15 | "declarationMap": false, 16 | 17 | "importHelpers": true, 18 | 19 | "pretty": true, 20 | 21 | "outDir": "lib" 22 | }, 23 | "include": [ 24 | "src/**/*.ts", 25 | "extension-src/**/*.ts", 26 | "test/lib/myTransform/src/**/*.ts" 27 | ] 28 | } -------------------------------------------------------------------------------- /test/runTest/actions/allZero.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 2","ops":[{"type":"mousemove","time":698,"x":192,"y":274},{"type":"mousemove","time":899,"x":213,"y":276},{"type":"mousemove","time":1104,"x":238,"y":281},{"type":"mousemove","time":1306,"x":239,"y":281},{"type":"screenshot","time":2832},{"type":"mousemove","time":3509,"x":240,"y":281},{"type":"mousemove","time":3710,"x":271,"y":283},{"type":"mousemove","time":3923,"x":346,"y":294},{"type":"mousemove","time":4123,"x":367,"y":298},{"type":"screenshot","time":5039},{"type":"mousemove","time":5408,"x":368,"y":298},{"type":"mousemove","time":5609,"x":451,"y":309},{"type":"mousemove","time":5809,"x":498,"y":316},{"type":"mousemove","time":6017,"x":540,"y":318},{"type":"screenshot","time":6958}],"scrollY":0,"scrollX":0,"timestamp":1567956980119}] -------------------------------------------------------------------------------- /test/runTest/actions/getOption.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":542,"x":42,"y":7},{"type":"mouseup","time":646,"x":42,"y":7},{"time":647,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1333,"x":59,"y":6},{"type":"mousemove","time":1534,"x":203,"y":10},{"type":"mousedown","time":1746,"x":203,"y":10},{"type":"mousemove","time":1796,"x":203,"y":10},{"type":"mouseup","time":1814,"x":203,"y":10},{"time":1815,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2275,"x":204,"y":10},{"type":"mousemove","time":2480,"x":353,"y":17},{"type":"mousemove","time":2697,"x":354,"y":16},{"type":"mousedown","time":2881,"x":354,"y":16},{"type":"mousemove","time":2931,"x":354,"y":16},{"type":"mouseup","time":3001,"x":354,"y":16},{"time":3002,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1603890312542}] -------------------------------------------------------------------------------- /test/runTest/actions/bar-start.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":871,"x":197,"y":71},{"type":"mouseup","time":1005,"x":197,"y":71},{"time":1006,"delay":1000,"type":"screenshot-auto"},{"type":"mousemove","time":1425,"x":199,"y":71},{"type":"mousemove","time":1626,"x":257,"y":68},{"type":"mousedown","time":2055,"x":257,"y":68},{"type":"mouseup","time":2137,"x":257,"y":68},{"time":2138,"delay":1000,"type":"screenshot-auto"},{"type":"mousedown","time":2818,"x":257,"y":68},{"type":"mouseup","time":2896,"x":257,"y":68},{"time":2897,"delay":1000,"type":"screenshot-auto"},{"type":"mousemove","time":3890,"x":251,"y":68},{"type":"mousemove","time":4090,"x":214,"y":65},{"type":"mousedown","time":4106,"x":214,"y":65},{"type":"mouseup","time":4209,"x":214,"y":65},{"time":4210,"delay":1000,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568018455276}] -------------------------------------------------------------------------------- /test/runTest/actions/polarScatter.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":695,"x":471,"y":20},{"type":"mouseup","time":782,"x":471,"y":20},{"time":783,"delay":1000,"type":"screenshot-auto"},{"type":"mousedown","time":1697,"x":471,"y":20},{"type":"mouseup","time":1811,"x":471,"y":20},{"time":1812,"delay":1000,"type":"screenshot-auto"},{"type":"mousemove","time":2239,"x":469,"y":20},{"type":"mousemove","time":2440,"x":424,"y":21},{"type":"mousemove","time":2652,"x":422,"y":21},{"type":"mousedown","time":2668,"x":422,"y":21},{"type":"mouseup","time":2735,"x":422,"y":21},{"time":2736,"delay":1000,"type":"screenshot-auto"},{"type":"mousemove","time":2868,"x":422,"y":21},{"type":"mousedown","time":3257,"x":422,"y":21},{"type":"mouseup","time":3355,"x":422,"y":21},{"time":3356,"delay":1000,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568043113766}] -------------------------------------------------------------------------------- /test/runTest/actions/mapWorld.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":399,"x":12,"y":435},{"type":"mousedown","time":515,"x":15,"y":433},{"type":"mousemove","time":611,"x":16,"y":439},{"type":"mousemove","time":926,"x":21,"y":490},{"type":"mouseup","time":999,"x":21,"y":490},{"time":1000,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1070,"x":20,"y":498},{"type":"mousemove","time":1327,"x":12,"y":597},{"type":"mousemove","time":1543,"x":14,"y":571},{"type":"mousemove","time":1754,"x":14,"y":571},{"type":"mousedown","time":1793,"x":14,"y":571},{"type":"mousemove","time":1892,"x":14,"y":567},{"type":"mousemove","time":2108,"x":15,"y":526},{"type":"mousemove","time":2327,"x":15,"y":525},{"type":"mouseup","time":2612,"x":15,"y":525},{"time":2613,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":3326,"x":15,"y":525}],"scrollY":0,"scrollX":0,"timestamp":1603892535761}] -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | export * from './types/dist/echarts'; -------------------------------------------------------------------------------- /src/echarts.blank.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | export * from './echarts'; -------------------------------------------------------------------------------- /src/global.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | declare const __DEV__: boolean; 21 | -------------------------------------------------------------------------------- /test/runTest/actions/largeLine-tooltip.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":797,"x":168,"y":360},{"type":"mouseup","time":886,"x":168,"y":360},{"time":887,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1112,"x":169,"y":360},{"type":"mousemove","time":1319,"x":284,"y":364},{"type":"mousemove","time":1543,"x":400,"y":374},{"type":"mousedown","time":1757,"x":400,"y":374},{"type":"mouseup","time":1872,"x":400,"y":374},{"time":1873,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1891,"x":399,"y":374},{"type":"mousemove","time":2220,"x":400,"y":373},{"type":"mousemove","time":2439,"x":490,"y":319},{"type":"mousemove","time":2658,"x":650,"y":268},{"type":"mousedown","time":2844,"x":651,"y":266},{"type":"mousemove","time":2859,"x":651,"y":266},{"type":"mouseup","time":2988,"x":651,"y":266},{"time":2989,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568042152607}] -------------------------------------------------------------------------------- /test/runTest/actions/dataZoom-rainfall-inside.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":337,"x":291,"y":217},{"type":"mousemove","time":431,"x":293,"y":218},{"type":"mousemove","time":642,"x":411,"y":221},{"type":"mousemove","time":847,"x":577,"y":231},{"type":"mousemove","time":1057,"x":587,"y":231},{"type":"mouseup","time":1195,"x":587,"y":231},{"time":1196,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1249,"x":587,"y":231},{"type":"mousemove","time":1458,"x":658,"y":236},{"type":"mousedown","time":1644,"x":661,"y":236},{"type":"mousemove","time":1665,"x":661,"y":237},{"type":"mousemove","time":1867,"x":531,"y":245},{"type":"mousemove","time":2077,"x":312,"y":246},{"type":"mousemove","time":2282,"x":196,"y":251},{"type":"mousemove","time":2494,"x":190,"y":251},{"type":"mouseup","time":2644,"x":190,"y":251},{"time":2645,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568037702450}] -------------------------------------------------------------------------------- /test/runTest/actions/radar4.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":2255,"x":48,"y":20},{"type":"mousemove","time":2456,"x":48,"y":22},{"type":"screenshot","time":3105},{"type":"mousedown","time":3680,"x":48,"y":22},{"type":"mouseup","time":3777,"x":48,"y":22},{"time":3778,"delay":500,"type":"screenshot-auto"},{"type":"mousemove","time":4324,"x":50,"y":22},{"type":"mousemove","time":4524,"x":88,"y":20},{"type":"mousedown","time":4689,"x":91,"y":19},{"type":"mousemove","time":4748,"x":91,"y":19},{"type":"mouseup","time":4788,"x":91,"y":19},{"time":4789,"delay":500,"type":"screenshot-auto"},{"type":"mousemove","time":4892,"x":92,"y":19},{"type":"mousemove","time":5092,"x":146,"y":21},{"type":"mousemove","time":5292,"x":157,"y":22},{"type":"mousedown","time":5601,"x":157,"y":22},{"type":"mouseup","time":5671,"x":157,"y":22},{"time":5672,"delay":500,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568043164602}] -------------------------------------------------------------------------------- /src/chart/line.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './line/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/chart/map.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './map/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/chart/pie.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './pie/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/chart/tree.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './tree/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/chart/funnel.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './funnel/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/chart/gauge.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './gauge/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/chart/radar.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './radar/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/chart/sankey.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './sankey/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/chart/scatter.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './scatter/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/chart/treemap.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './treemap/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/aria.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './aria/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/brush.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './brush/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/polar.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './polar/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/title.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './title/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/export/api/time.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | export {parseDate as parse} from '../../util/number'; 21 | 22 | export {format} from '../../util/time'; -------------------------------------------------------------------------------- /src/chart/bar.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './bar/install'; 22 | 23 | use(install); 24 | 25 | -------------------------------------------------------------------------------- /src/chart/custom.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | import { use } from '../extension'; 22 | import { install } from './custom/install'; 23 | 24 | use(install); -------------------------------------------------------------------------------- /src/chart/graph.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | import { use } from '../extension'; 22 | import { install } from './graph/install'; 23 | 24 | use(install); -------------------------------------------------------------------------------- /src/chart/lines.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | import { use } from '../extension'; 22 | import { install } from './lines/install'; 23 | 24 | use(install); -------------------------------------------------------------------------------- /src/chart/parallel.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './parallel/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/chart/sunburst.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './sunburst/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/dataset.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './dataset/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/graphic.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './graphic/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/grid.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | import { use } from '../extension'; 22 | import { install } from './grid/install'; 23 | 24 | use(install); -------------------------------------------------------------------------------- /src/component/toolbox.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './toolbox/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/tooltip.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './tooltip/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /.headerignore: -------------------------------------------------------------------------------- 1 | # Only support regexp, testing against each relative file path 2 | # based on the echart base directory. And the pattern should 3 | # match the relative path completely. 4 | 5 | node_modules 6 | .*\.git 7 | .*\.github 8 | .*\.editorconfig 9 | .*\.gitignore 10 | .*\.jshintrc 11 | .*\.jshintrc-dist 12 | .*\.npmignore 13 | .*\.ratignore 14 | .*\.headerignore 15 | .*\.DS_Store 16 | .*\.idea 17 | .*rat\.iml 18 | __MAC_OS 19 | .*README.md 20 | .*MANIFEST\.txt 21 | DISCLAIMER 22 | NOTICE 23 | KEYS 24 | LICENSE 25 | LICENSE-.+ 26 | licenses 27 | map/js 28 | map/json 29 | benchmark/dep/* 30 | test/ut/lib 31 | test/data$ 32 | test/lib/esl\.js 33 | test/lib/perlin\.js 34 | test/lib/countup\.js 35 | .*jquery\.min\.js 36 | .*rollup\.browser\.js 37 | .*configure 38 | .+\.json 39 | .+\.map 40 | .+\.gexf 41 | .+\.jar 42 | .+\.bin 43 | .+\.csv 44 | .+\.png 45 | .+\.PNG 46 | .+\.jpg 47 | .+\.JPG 48 | .+\.jpeg 49 | .+\.JPEG 50 | .+\.gif 51 | .+\.GIF 52 | .+\.class 53 | types 54 | lib 55 | esm 56 | dist 57 | -------------------------------------------------------------------------------- /src/chart/candlestick.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './candlestick/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/chart/heatmap.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | import { use } from '../extension'; 22 | import { install } from './heatmap/install'; 23 | 24 | use(install); -------------------------------------------------------------------------------- /src/chart/themeRiver.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './themeRiver/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/calendar.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './calendar/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/geo.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | 22 | import { use } from '../extension'; 23 | import { install } from './geo/install'; 24 | 25 | use(install); -------------------------------------------------------------------------------- /src/component/gridSimple.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './grid/installSimple'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/radar.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | import { use } from '../extension'; 22 | import { install } from './radar/install'; 23 | 24 | use(install); -------------------------------------------------------------------------------- /src/component/singleAxis.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './singleAxis/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/transform.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './transform/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/visualMap.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './visualMap/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/chart/boxplot.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './boxplot/install'; 22 | 23 | 24 | use(install); 25 | -------------------------------------------------------------------------------- /src/chart/effectScatter.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './effectScatter/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/chart/pictorialBar.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './bar/installPictorialBar'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/axisPointer.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './axisPointer/install'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/dataZoom.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './dataZoom/install'; 22 | 23 | use(install); 24 | -------------------------------------------------------------------------------- /src/component/markArea.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './marker/installMarkArea'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/markLine.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './marker/installMarkLine'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/parallel.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | import { use } from '../extension'; 22 | import { install } from './parallel/install'; 23 | 24 | use(install); -------------------------------------------------------------------------------- /src/export/all.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | // This file is for providing types when import whole module. 21 | 22 | export * from './core'; 23 | export * from './option'; -------------------------------------------------------------------------------- /test/runTest/actions/tooltip-setOption.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":592,"x":414,"y":346},{"type":"mousemove","time":797,"x":382,"y":351},{"type":"mousemove","time":1009,"x":372,"y":353},{"type":"mousemove","time":1215,"x":369,"y":353},{"type":"mousedown","time":1249,"x":369,"y":353},{"type":"mouseup","time":1383,"x":369,"y":353},{"time":1384,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2043,"x":373,"y":356},{"type":"mousemove","time":2243,"x":399,"y":373},{"type":"mousemove","time":2451,"x":419,"y":389},{"type":"mousemove","time":2702,"x":419,"y":389},{"type":"mousedown","time":3354,"x":419,"y":389},{"type":"mouseup","time":3422,"x":419,"y":389},{"time":3423,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568044692192},{"name":"Action 2","ops":[{"type":"mousedown","time":717,"x":420,"y":347},{"type":"mouseup","time":799,"x":420,"y":347},{"time":800,"delay":1000,"type":"screenshot-auto"}],"scrollY":929,"scrollX":0,"timestamp":1568122841823}] -------------------------------------------------------------------------------- /test/runTest/config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | module.exports = { 21 | testVersion: 'test-v0.1', 22 | port: 8866, 23 | origin: 'http://localhost:8866' 24 | }; -------------------------------------------------------------------------------- /src/component/dataZoomInside.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './dataZoom/installDataZoomInside'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /test/build/removeDEV/expect/code.expect.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | var a = 112; 21 | a++; 22 | a++; 23 | a++; 24 | a--; 25 | 26 | function b() { 27 | a++; 28 | } 29 | 30 | a += 12; -------------------------------------------------------------------------------- /src/component/dataZoomSlider.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | import { use } from '../extension'; 22 | import { install } from './dataZoom/installDataZoomSlider'; 23 | 24 | use(install); -------------------------------------------------------------------------------- /src/component/visualMapPiecewise.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './visualMap/installVisualMapPiecewise'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /src/component/visualMapContinuous.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { use } from '../extension'; 21 | import { install } from './visualMap/installVisualMapContinuous'; 22 | 23 | use(install); -------------------------------------------------------------------------------- /test/build/esm2cjs/src/export-default0.src.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | import * as zrUtil from 'zrender/core/util'; 22 | 23 | export default function () { 24 | zrUtil(); 25 | } 26 | -------------------------------------------------------------------------------- /test/runTest/actions/candlestick-large2.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":527,"x":209,"y":104},{"type":"mouseup","time":648,"x":209,"y":104},{"time":649,"delay":2000,"type":"screenshot-auto"},{"type":"mousedown","time":1908,"x":209,"y":104},{"type":"mouseup","time":2011,"x":209,"y":104},{"time":2012,"delay":2000,"type":"screenshot-auto"},{"type":"mousemove","time":3037,"x":204,"y":104},{"type":"mousemove","time":3263,"x":120,"y":102},{"type":"mousemove","time":3475,"x":106,"y":101},{"type":"mousedown","time":3621,"x":106,"y":101},{"type":"mouseup","time":3717,"x":106,"y":101},{"time":3718,"delay":2000,"type":"screenshot-auto"},{"type":"mousemove","time":4366,"x":107,"y":101},{"type":"mousemove","time":4578,"x":166,"y":104},{"type":"mousemove","time":4778,"x":169,"y":104},{"type":"mousemove","time":4991,"x":170,"y":104},{"type":"mousedown","time":5064,"x":170,"y":104},{"type":"mouseup","time":5208,"x":170,"y":104},{"time":5209,"delay":2000,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568030653772}] -------------------------------------------------------------------------------- /test/runTest/actions/gauge-simple.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":613,"x":136,"y":595},{"type":"mousemove","time":813,"x":130,"y":264},{"type":"mousemove","time":1022,"x":89,"y":140},{"type":"mousemove","time":1223,"x":89,"y":126},{"type":"mousemove","time":1372,"x":89,"y":125},{"type":"mousemove","time":1572,"x":78,"y":101},{"type":"mousedown","time":1774,"x":75,"y":98},{"type":"mousemove","time":1807,"x":75,"y":98},{"type":"mouseup","time":1890,"x":75,"y":98},{"time":1891,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1570518999079},{"name":"Action 2","ops":[{"type":"mousemove","time":131,"x":512,"y":199},{"type":"mousemove","time":339,"x":334,"y":246},{"type":"mousemove","time":542,"x":155,"y":201},{"type":"mousemove","time":746,"x":81,"y":178},{"type":"mousedown","time":866,"x":78,"y":177},{"type":"mousemove","time":966,"x":78,"y":177},{"type":"mouseup","time":990,"x":78,"y":177},{"time":991,"delay":400,"type":"screenshot-auto"}],"scrollY":436,"scrollX":0,"timestamp":1570519158772}] -------------------------------------------------------------------------------- /src/export/renderers.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | export {install as SVGRenderer} from '../renderer/installSVGRenderer'; 21 | export {install as CanvasRenderer} from '../renderer/installCanvasRenderer'; -------------------------------------------------------------------------------- /test/build/esm2cjs/src/export-default1.src.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | import * as zrUtil from 'zrender/core/util'; 22 | 23 | function bb() { 24 | zrUtil(); 25 | } 26 | 27 | export default bb; -------------------------------------------------------------------------------- /test/build/esm2cjs/expect/export-default0.expect.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | var zrUtil = require("zrender/core/util"); 21 | 22 | function _default() { 23 | zrUtil(); 24 | } 25 | 26 | module.exports = _default; -------------------------------------------------------------------------------- /src/component/timeline.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /** 21 | * DataZoom component entry 22 | */ 23 | 24 | import { use } from '../extension'; 25 | import { install } from './timeline/install'; 26 | 27 | use(install); -------------------------------------------------------------------------------- /src/component/markPoint.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | // HINT Markpoint can't be used too much 21 | 22 | import { use } from '../extension'; 23 | import { install } from './marker/installMarkPoint'; 24 | 25 | use(install); -------------------------------------------------------------------------------- /test/build/esm2cjs/src/export-default3.src.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | import * as zrUtil from 'zrender/core/util'; 22 | 23 | var Chart = zrUtil.extend({ 24 | zrUtil: zrUtil 25 | }); 26 | 27 | export default Chart; -------------------------------------------------------------------------------- /src/component/legend.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | // Do not contain scrollable legend, for sake of file size. 21 | 22 | import { use } from '../extension'; 23 | import { install } from './legend/install'; 24 | 25 | use(install); -------------------------------------------------------------------------------- /test/runTest/actions/pie-calculable.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":238,"x":290,"y":315},{"type":"mousemove","time":290,"x":300,"y":311},{"type":"mousemove","time":490,"x":421,"y":214},{"type":"mouseup","time":648,"x":425,"y":209},{"time":649,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":700,"x":425,"y":209},{"type":"mousemove","time":790,"x":425,"y":212},{"type":"mousemove","time":991,"x":460,"y":277},{"type":"mousemove","time":1191,"x":471,"y":304},{"type":"mousemove","time":1397,"x":470,"y":309},{"type":"mousedown","time":1521,"x":470,"y":311},{"type":"mousemove","time":1608,"x":414,"y":279},{"type":"mousemove","time":1815,"x":353,"y":250},{"type":"mousemove","time":2015,"x":349,"y":238},{"type":"mouseup","time":2171,"x":349,"y":238},{"time":2172,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2292,"x":351,"y":240},{"type":"mousemove","time":2492,"x":398,"y":277},{"type":"mousemove","time":2743,"x":398,"y":278},{"type":"mousemove","time":2951,"x":400,"y":280}],"scrollY":0,"scrollX":0,"timestamp":1603892733739}] -------------------------------------------------------------------------------- /test/build/esm2cjs/expect/export-default1.expect.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | var zrUtil = require("zrender/core/util"); 21 | 22 | function bb() { 23 | zrUtil(); 24 | } 25 | 26 | var _default = bb; 27 | module.exports = _default; -------------------------------------------------------------------------------- /test/runTest/actions/axis-boundaryGap.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":431,"x":518,"y":233},{"type":"mousemove","time":755,"x":517,"y":233},{"type":"mousemove","time":956,"x":425,"y":228},{"type":"mousemove","time":1167,"x":402,"y":229},{"type":"mouseup","time":1423,"x":402,"y":229},{"time":1424,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1936,"x":402,"y":230},{"type":"mousedown","time":2085,"x":402,"y":231},{"type":"mousemove","time":2135,"x":401,"y":232},{"type":"mousemove","time":2336,"x":290,"y":232},{"type":"mousemove","time":2543,"x":252,"y":233},{"type":"mouseup","time":2593,"x":252,"y":233},{"time":2594,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":3291,"x":252,"y":233},{"type":"mousemove","time":3403,"x":256,"y":233},{"type":"mousemove","time":3604,"x":500,"y":232},{"type":"mousemove","time":3805,"x":580,"y":233},{"type":"mousemove","time":4021,"x":586,"y":234},{"type":"mouseup","time":4093,"x":586,"y":234},{"time":4094,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568012103151}] -------------------------------------------------------------------------------- /src/component/legendScroll.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /** 21 | * Legend component entry file8 22 | */ 23 | 24 | import { use } from '../extension'; 25 | import { install } from './legend/installLegendScroll'; 26 | 27 | use(install); -------------------------------------------------------------------------------- /.lgtm.yml: -------------------------------------------------------------------------------- 1 | 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | path_classifiers: 20 | test: 21 | - test 22 | library: 23 | - benchmark/dep 24 | generated: 25 | - dist 26 | extraction: 27 | javascript: 28 | index: 29 | exclude: 30 | - dist 31 | -------------------------------------------------------------------------------- /src/component/legendPlain.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | // Do not contain scrollable legend, for sake of file size. 21 | 22 | import { use } from '../extension'; 23 | import { install } from './legend/installLegendPlain'; 24 | 25 | use(install); -------------------------------------------------------------------------------- /src/export/api/util.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | export { 21 | map, each, indexOf, inherits, reduce, filter, 22 | bind, curry, isArray, isString, isObject, isFunction, 23 | extend, defaults, clone, merge 24 | } from 'zrender/src/core/util'; -------------------------------------------------------------------------------- /test/build/esm2cjs/expect/export-default3.expect.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | var zrUtil = require("zrender/core/util"); 21 | 22 | var Chart = zrUtil.extend({ 23 | zrUtil: zrUtil 24 | }); 25 | var _default = Chart; 26 | module.exports = _default; -------------------------------------------------------------------------------- /test/runTest/actions/bmap.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousewheel","time":378,"x":480,"y":375,"deltaY":4.000244140625},{"type":"mousemove","time":1076,"x":478,"y":375},{"type":"mousemove","time":1276,"x":467,"y":378},{"type":"mousemove","time":1485,"x":466,"y":378},{"type":"mousemove","time":1504,"x":466,"y":378},{"type":"mousemove","time":1704,"x":379,"y":396},{"type":"mousemove","time":1911,"x":354,"y":399},{"type":"mousedown","time":1930,"x":354,"y":399},{"type":"mousemove","time":2125,"x":465,"y":386},{"type":"mousemove","time":2325,"x":503,"y":375},{"type":"mouseup","time":2506,"x":503,"y":375},{"time":2507,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":3823,"x":502,"y":376},{"type":"mousewheel","time":3992,"x":502,"y":376,"deltaY":-4.000244140625},{"type":"mousemove","time":4034,"x":502,"y":376},{"type":"mousewheel","time":4041,"x":502,"y":376,"deltaY":-28.84765625},{"type":"mousedown","time":5674,"x":502,"y":376},{"type":"mouseup","time":5757,"x":502,"y":376},{"time":5758,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568969484233}] -------------------------------------------------------------------------------- /test/build/esm2cjs/expect/forbiden-export.expect.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import * as util from './a/b/util'; 21 | export var exportSingleVar = 'aa'; 22 | var b = util; 23 | export { b }; 24 | 25 | function SomeDefault() {} 26 | 27 | export default SomeDefault; -------------------------------------------------------------------------------- /test/types/importPartial.ts: -------------------------------------------------------------------------------- 1 | import {init, use, ComposeOption} from '../../core'; 2 | import { 3 | BarChart, 4 | BarSeriesOption, 5 | LineChart, 6 | LineSeriesOption 7 | } from '../../charts'; 8 | import { 9 | GridComponent, 10 | GridComponentOption, 11 | 12 | DataZoomComponent, 13 | DataZoomComponentOption, 14 | } from '../../components'; 15 | import { 16 | CanvasRenderer 17 | } from '../../renderers'; 18 | 19 | use([BarChart, LineChart, GridComponent, DataZoomComponent, CanvasRenderer]); 20 | 21 | type Option = ComposeOption< 22 | GridComponentOption | DataZoomComponentOption 23 | | BarSeriesOption | LineSeriesOption 24 | >; 25 | 26 | const option: Option= { 27 | // xAxis and yAxis should been add as dependencies 28 | xAxis: { 29 | min: 0, 30 | max: 10 31 | }, 32 | yAxis: { 33 | min: 0, 34 | max: 10 35 | }, 36 | series: [{ 37 | type: 'bar' 38 | }] 39 | } 40 | 41 | const dom = document.createElement('div'); 42 | dom.className = 'chart'; 43 | 44 | const chart = init(dom); 45 | chart.setOption(option); -------------------------------------------------------------------------------- /src/component/timeline/TimelineView.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import ComponentView from '../../view/Component'; 21 | 22 | class TimelineView extends ComponentView { 23 | static type = 'timeline'; 24 | type = TimelineView.type; 25 | } 26 | 27 | export default TimelineView; 28 | -------------------------------------------------------------------------------- /test/build/esm2cjs/src/export-default2.src.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | import xx from 'zrender/core/util'; 22 | 23 | // export * from './echarts'; 24 | // export {default as defaultAsBB} from './xx/yy'; 25 | // export {exportSingle} from './xx/yy'; 26 | 27 | export default xx; 28 | -------------------------------------------------------------------------------- /src/component/dataZoomSelect.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /** 21 | * Only work for toolbox dataZoom. User 22 | * MUST NOT import this module directly. 23 | */ 24 | 25 | import { use } from '../extension'; 26 | import { install } from './dataZoom/installDataZoomSelect'; 27 | 28 | use(install); -------------------------------------------------------------------------------- /src/component/dataZoom/SelectZoomView.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import DataZoomView from './DataZoomView'; 21 | 22 | class SelectDataZoomView extends DataZoomView { 23 | static type = 'dataZoom.select'; 24 | type = SelectDataZoomView.type; 25 | } 26 | 27 | export default SelectDataZoomView; -------------------------------------------------------------------------------- /src/component/dataZoom/SelectZoomModel.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import DataZoomModel from './DataZoomModel'; 21 | 22 | class SelectDataZoomModel extends DataZoomModel { 23 | static type = 'dataZoom.select'; 24 | type = SelectDataZoomModel.type; 25 | } 26 | 27 | export default SelectDataZoomModel; -------------------------------------------------------------------------------- /test/build/esm2cjs/expect/export-default2.expect.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | var xx = require("zrender/core/util"); 21 | 22 | // export * from './echarts'; 23 | // export {default as defaultAsBB} from './xx/yy'; 24 | // export {exportSingle} from './xx/yy'; 25 | var _default = xx; 26 | module.exports = _default; -------------------------------------------------------------------------------- /test/build/esm2cjs/src/forbiden-export.src.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | 22 | import * as util from './a/b/util'; 23 | 24 | export var exportSingleVar = 'aa'; 25 | 26 | var b = util; 27 | 28 | export {b}; 29 | 30 | function SomeDefault() { 31 | 32 | } 33 | 34 | export default SomeDefault; 35 | 36 | -------------------------------------------------------------------------------- /src/export/api/format.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | export { 21 | addCommas, 22 | toCamelCase, 23 | normalizeCssArray, 24 | encodeHTML, 25 | formatTpl, 26 | getTooltipMarker, 27 | formatTime, 28 | capitalFirst, 29 | truncateText, 30 | getTextRect 31 | } from '../../util/format'; -------------------------------------------------------------------------------- /src/renderer/installSVGRenderer.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../extension'; 21 | import SVGPainter from 'zrender/src/svg/Painter'; 22 | 23 | export function install(registers: EChartsExtensionInstallRegisters) { 24 | registers.registerPainter('svg', SVGPainter); 25 | } -------------------------------------------------------------------------------- /test/runTest/actions/timeScale2.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":266,"x":121,"y":380},{"type":"mousemove","time":424,"x":163,"y":379},{"type":"mousemove","time":624,"x":358,"y":379},{"type":"mousemove","time":834,"x":393,"y":378},{"type":"mouseup","time":965,"x":393,"y":378},{"time":966,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":1530,"x":393,"y":378},{"type":"mousemove","time":1642,"x":399,"y":378},{"type":"mousemove","time":1843,"x":470,"y":378},{"type":"mousemove","time":2047,"x":471,"y":378},{"type":"mouseup","time":2185,"x":471,"y":378},{"time":2186,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2258,"x":473,"y":379},{"type":"mousemove","time":2459,"x":526,"y":382},{"type":"mousedown","time":2665,"x":539,"y":380},{"type":"mousemove","time":2671,"x":539,"y":380},{"type":"mousemove","time":2875,"x":400,"y":387},{"type":"mousemove","time":3076,"x":331,"y":391},{"type":"mousemove","time":3284,"x":330,"y":391},{"type":"mouseup","time":3316,"x":330,"y":391},{"time":3317,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":3362,"x":330,"y":392}],"scrollY":0,"scrollX":0,"timestamp":1568043879931}] -------------------------------------------------------------------------------- /test/runTest/runtime/shim.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | (function () { 21 | if (typeof autorun !== 'undefined') { 22 | return; 23 | } 24 | var autorun = {}; 25 | autorun.createScreenshotTest = function () {}; 26 | autorun.compareScreenshot = function () {}; 27 | autorun.finish = function () {}; 28 | })(); -------------------------------------------------------------------------------- /src/renderer/installCanvasRenderer.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../extension'; 21 | import CanvasPainter from 'zrender/src/canvas/Painter'; 22 | 23 | export function install(registers: EChartsExtensionInstallRegisters) { 24 | registers.registerPainter('canvas', CanvasPainter); 25 | } -------------------------------------------------------------------------------- /test/ut/core/setup.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | // import { JSDOM } from 'jsdom'; 21 | import { Image } from 'canvas'; 22 | 23 | // const { window } = new JSDOM(); 24 | 25 | // (global as any).window = window; 26 | // (global as any).navigator = window.navigator; 27 | // (global as any).document = window.document; 28 | (global as any).Image = Image; 29 | -------------------------------------------------------------------------------- /src/visual/commonVisualTypes.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { DefaultDataVisual } from '../data/List'; 21 | 22 | export interface LineDataVisual extends DefaultDataVisual { 23 | fromSymbol: string 24 | toSymbol: string 25 | fromSymbolSize: number 26 | toSymbolSize: number 27 | fromSymbolRotate: number 28 | toSymbolRotate: number 29 | } 30 | 31 | -------------------------------------------------------------------------------- /.asf.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | github: 19 | description: Apache ECharts is a powerful, interactive charting and data visualization library for browser 20 | homepage: https://echarts.apache.org 21 | labels: 22 | - echarts 23 | - data-visualization 24 | - charts 25 | - charting-library 26 | - visualization 27 | - apache 28 | - data-viz 29 | - canvas 30 | - svg 31 | -------------------------------------------------------------------------------- /.github/workflows/nodejs.yml: -------------------------------------------------------------------------------- 1 | name: Node CI 2 | 3 | on: 4 | pull_request: 5 | types: [opened, synchronize] 6 | 7 | jobs: 8 | build: 9 | 10 | runs-on: ubuntu-latest 11 | 12 | strategy: 13 | matrix: 14 | node-version: [12.x] 15 | 16 | steps: 17 | - uses: actions/checkout@v1 18 | - name: Use Node.js ${{ matrix.node-version }} 19 | uses: actions/setup-node@v1 20 | with: 21 | node-version: ${{ matrix.node-version }} 22 | - name: npm install 23 | run: | 24 | npm install 25 | npm install git+https://github.com/ecomfe/zrender.git 26 | - name: build zrender 27 | run: | 28 | cd node_modules/zrender 29 | npm install 30 | npm run prepublish 31 | cd ../.. 32 | - name: check type 33 | run: | 34 | npm run checktype 35 | - name: build release 36 | run: | 37 | npm run release 38 | 39 | test: 40 | runs-on: ubuntu-latest 41 | needs: build 42 | 43 | if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release' 44 | 45 | steps: 46 | - name: unit test 47 | run: | 48 | npm run test 49 | -------------------------------------------------------------------------------- /test/runTest/actions/pie-action.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":575,"x":12,"y":44},{"type":"mouseup","time":647,"x":12,"y":44},{"time":648,"delay":600,"type":"screenshot-auto"},{"type":"mousemove","time":1286,"x":14,"y":44},{"type":"mousemove","time":1493,"x":43,"y":42},{"type":"mousemove","time":1710,"x":48,"y":41},{"type":"mousemove","time":1821,"x":45,"y":42},{"type":"mousedown","time":1976,"x":37,"y":42},{"type":"mousemove","time":2026,"x":37,"y":42},{"type":"mouseup","time":2079,"x":37,"y":42},{"time":2080,"delay":600,"type":"screenshot-auto"},{"type":"mousemove","time":2705,"x":36,"y":45},{"type":"mousemove","time":2905,"x":18,"y":98},{"type":"mousemove","time":3111,"x":14,"y":111},{"type":"mousedown","time":3162,"x":14,"y":111},{"type":"mouseup","time":3249,"x":14,"y":111},{"time":3250,"delay":600,"type":"screenshot-auto"},{"type":"mousemove","time":3345,"x":14,"y":111},{"type":"mousemove","time":3856,"x":17,"y":112},{"type":"mousemove","time":4056,"x":38,"y":111},{"type":"mousemove","time":4264,"x":40,"y":111},{"type":"mousedown","time":4280,"x":40,"y":111},{"type":"mouseup","time":4381,"x":40,"y":111},{"time":4382,"delay":600,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568042938843}] -------------------------------------------------------------------------------- /test/runTest/actions/heatmap.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":264,"x":12,"y":447},{"type":"mousemove","time":324,"x":12,"y":447},{"type":"mousemove","time":535,"x":13,"y":491},{"type":"mouseup","time":703,"x":13,"y":491},{"time":704,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":740,"x":13,"y":491},{"type":"mousemove","time":941,"x":12,"y":583},{"type":"mousemove","time":1142,"x":12,"y":584},{"type":"mousemove","time":1358,"x":13,"y":589},{"type":"mousedown","time":1366,"x":13,"y":589},{"type":"mousemove","time":1573,"x":14,"y":552},{"type":"mousemove","time":1773,"x":15,"y":546},{"type":"mouseup","time":1923,"x":15,"y":546},{"time":1924,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2087,"x":15,"y":546},{"type":"mousemove","time":2288,"x":14,"y":522},{"type":"mousemove","time":2488,"x":14,"y":519},{"type":"mousemove","time":2700,"x":14,"y":517},{"type":"mousemove","time":2874,"x":14,"y":518},{"type":"mousemove","time":3074,"x":14,"y":521},{"type":"mousemove","time":3336,"x":14,"y":522},{"type":"mousedown","time":3444,"x":14,"y":522},{"type":"mouseup","time":3551,"x":14,"y":522},{"time":3552,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1603891145024}] -------------------------------------------------------------------------------- /src/chart/gauge/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import GaugeView from './GaugeView'; 22 | import GaugeSeriesModel from './GaugeSeries'; 23 | 24 | export function install(registers: EChartsExtensionInstallRegisters) { 25 | registers.registerChartView(GaugeView); 26 | registers.registerSeriesModel(GaugeSeriesModel); 27 | } -------------------------------------------------------------------------------- /test/runTest/actions/aria-line-bar.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":870,"x":462,"y":22},{"type":"mouseup","time":973,"x":462,"y":22},{"time":974,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":2004,"x":462,"y":22},{"type":"mouseup","time":2103,"x":462,"y":22},{"time":2104,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2415,"x":462,"y":22},{"type":"mousemove","time":2622,"x":407,"y":18},{"type":"mousemove","time":2822,"x":400,"y":18},{"type":"mousedown","time":3028,"x":400,"y":18},{"type":"mouseup","time":3139,"x":400,"y":18},{"time":3140,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":3929,"x":400,"y":18},{"type":"mouseup","time":4037,"x":400,"y":18},{"time":4038,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":4678,"x":399,"y":18},{"type":"mousemove","time":4879,"x":367,"y":16},{"type":"mousemove","time":5141,"x":345,"y":15},{"type":"mousedown","time":5241,"x":345,"y":15},{"type":"mouseup","time":5345,"x":345,"y":15},{"time":5346,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":5999,"x":345,"y":15},{"type":"mouseup","time":6080,"x":345,"y":15},{"time":6081,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568012001795}] -------------------------------------------------------------------------------- /test/data/aqi/BJdata.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | [1,55,9,56,0.46,18,6,"良"], 3 | [2,25,11,21,0.65,34,9,"优"], 4 | [3,56,7,63,0.3,14,5,"良"], 5 | [4,33,7,29,0.33,16,6,"优"], 6 | [5,42,24,44,0.76,40,16,"优"], 7 | [6,82,58,90,1.77,68,33,"良"], 8 | [7,74,49,77,1.46,48,27,"良"], 9 | [8,78,55,80,1.29,59,29,"良"], 10 | [9,267,216,280,'-',108,64,"重度污染"], 11 | [10,185,127,216,2.52,61,27,"中度污染"], 12 | [11,39,19,38,0.57,31,15,"优"], 13 | [12,41,11,40,0.43,21,7,"优"], 14 | [13,64,38,74,1.04,46,22,"良"], 15 | [14,108,79,120,1.7,75,41,"轻度污染"], 16 | [15,108,63,116,1.48,44,26,"轻度污染"], 17 | [16,33,6,29,0.34,13,5,"优"], 18 | [17,94,66,110,1.54,62,31,"良"], 19 | [18,186,142,192,3.88,93,79,"中度污染"], 20 | [19,57,31,54,0.96,32,14,"良"], 21 | [20,22,8,17,0.48,23,10,"优"], 22 | [21,39,15,36,0.61,29,13,"优"], 23 | [22,94,69,114,2.08,73,39,"良"], 24 | [23,99,73,110,2.43,76,48,"良"], 25 | [24,31,12,30,0.5,32,16,"优"], 26 | [25,42,27,43,1,53,22,"优"], 27 | [26,154,117,157,3.05,92,58,"中度污染"], 28 | [27,234,185,230,4.09,123,69,"重度污染"], 29 | [28,160,120,186,2.77,91,50,"中度污染"], 30 | [29,134,96,165,2.76,83,41,"轻度污染"], 31 | [30,52,24,60,1.03,50,21,"良"], 32 | [31,46,5,49,0.28,10,6,"优"] 33 | ]); -------------------------------------------------------------------------------- /test/runTest/actions/candlestick-empty.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"screenshot","time":604},{"type":"mousedown","time":1377,"x":402,"y":25},{"type":"mouseup","time":1473,"x":402,"y":25},{"time":1474,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":2122,"x":402,"y":25},{"type":"mouseup","time":2207,"x":402,"y":25},{"time":2208,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2701,"x":402,"y":25},{"type":"mousemove","time":2909,"x":678,"y":441},{"type":"mousemove","time":3119,"x":742,"y":522},{"type":"mousemove","time":3325,"x":748,"y":540},{"type":"mousemove","time":3540,"x":732,"y":561},{"type":"mousedown","time":4108,"x":732,"y":561},{"type":"mousemove","time":4370,"x":717,"y":561},{"type":"mousemove","time":4570,"x":475,"y":554},{"type":"mousemove","time":4776,"x":440,"y":555},{"type":"mouseup","time":4902,"x":440,"y":555},{"time":4903,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":5310,"x":440,"y":555},{"type":"mousemove","time":5403,"x":439,"y":555},{"type":"mousemove","time":5604,"x":263,"y":561},{"type":"mousemove","time":5811,"x":250,"y":561},{"type":"mouseup","time":5929,"x":250,"y":561},{"time":5930,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568030557739}] -------------------------------------------------------------------------------- /src/component/grid/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import {install as installSimple} from './installSimple'; 21 | import {install as installAxisPointer} from '../axisPointer/install'; 22 | import { EChartsExtensionInstallRegisters, use } from '../../extension'; 23 | 24 | export function install(registers: EChartsExtensionInstallRegisters) { 25 | use(installSimple); 26 | use(installAxisPointer); 27 | } -------------------------------------------------------------------------------- /src/chart/heatmap/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import HeatmapView from './HeatmapView'; 22 | import HeatmapSeriesModel from './HeatmapSeries'; 23 | 24 | export function install(registers: EChartsExtensionInstallRegisters) { 25 | registers.registerChartView(HeatmapView); 26 | registers.registerSeriesModel(HeatmapSeriesModel); 27 | } -------------------------------------------------------------------------------- /src/component/legend/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters, use } from '../../extension'; 21 | import {install as installLegendPlain} from './installLegendPlain'; 22 | import {install as installLegendScroll} from './installLegendScroll'; 23 | 24 | export function install(registers: EChartsExtensionInstallRegisters) { 25 | use(installLegendPlain); 26 | use(installLegendScroll); 27 | } -------------------------------------------------------------------------------- /src/component/transform/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import {filterTransform} from './filterTransform'; 22 | import {sortTransform} from './sortTransform'; 23 | 24 | export function install(registers: EChartsExtensionInstallRegisters) { 25 | registers.registerTransform(filterTransform); 26 | registers.registerTransform(sortTransform); 27 | } -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Brief Information 4 | 5 | This pull request is in the type of: 6 | 7 | - [ ] bug fixing 8 | - [ ] new feature 9 | - [ ] others 10 | 11 | 12 | 13 | ### What does this PR do? 14 | 15 | 16 | 17 | 18 | 19 | ### Fixed issues 20 | 21 | 24 | 25 | 26 | ## Details 27 | 28 | ### Before: What was the problem? 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ### After: How is it fixed in this PR? 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | ## Usage 45 | 46 | ### Are there any API changes? 47 | 48 | - [ ] The API has been changed. 49 | 50 | 51 | 52 | 53 | 54 | ### Related test cases or examples to use the new APIs 55 | 56 | NA. 57 | 58 | 59 | 60 | ## Others 61 | 62 | ### Merging options 63 | 64 | - [ ] Please squash the commits into a single one when merge. 65 | 66 | ### Other information 67 | -------------------------------------------------------------------------------- /test/data/aqi/GZdata.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | [1,26,37,27,1.163,27,13,"优"], 3 | [2,85,62,71,1.195,60,8,"良"], 4 | [3,78,38,74,1.363,37,7,"良"], 5 | [4,21,21,36,0.634,40,9,"优"], 6 | [5,41,42,46,0.915,81,13,"优"], 7 | [6,56,52,69,1.067,92,16,"良"], 8 | [7,64,30,28,0.924,51,2,"良"], 9 | [8,55,48,74,1.236,75,26,"良"], 10 | [9,76,85,113,1.237,114,27,"良"], 11 | [10,91,81,104,1.041,56,40,"良"], 12 | [11,84,39,60,0.964,25,11,"良"], 13 | [12,64,51,101,0.862,58,23,"良"], 14 | [13,70,69,120,1.198,65,36,"良"], 15 | [14,77,105,178,2.549,64,16,"良"], 16 | [15,109,68,87,0.996,74,29,"轻度污染"], 17 | [16,73,68,97,0.905,51,34,"良"], 18 | [17,54,27,47,0.592,53,12,"良"], 19 | [18,51,61,97,0.811,65,19,"良"], 20 | [19,91,71,121,1.374,43,18,"良"], 21 | [20,73,102,182,2.787,44,19,"良"], 22 | [21,73,50,76,0.717,31,20,"良"], 23 | [22,84,94,140,2.238,68,18,"良"], 24 | [23,93,77,104,1.165,53,7,"良"], 25 | [24,99,130,227,3.97,55,15,"良"], 26 | [25,146,84,139,1.094,40,17,"轻度污染"], 27 | [26,113,108,137,1.481,48,15,"轻度污染"], 28 | [27,81,48,62,1.619,26,3,"良"], 29 | [28,56,48,68,1.336,37,9,"良"], 30 | [29,82,92,174,3.29,0,13,"良"], 31 | [30,106,116,188,3.628,101,16,"轻度污染"], 32 | [31,118,50,0,1.383,76,11,"轻度污染"] 33 | ] 34 | ); -------------------------------------------------------------------------------- /src/component/aria/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import ariaVisual from '../../visual/aria'; 22 | import ariaPreprocessor from './preprocessor'; 23 | 24 | export function install(registers: EChartsExtensionInstallRegisters) { 25 | registers.registerPreprocessor(ariaPreprocessor); 26 | registers.registerVisual(registers.PRIORITY.VISUAL.ARIA, ariaVisual); 27 | } -------------------------------------------------------------------------------- /test/data/aqi/SHdata.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | [1,91,45,125,0.82,34,23,"良"], 3 | [2,65,27,78,0.86,45,29,"良"], 4 | [3,83,60,84,1.09,73,27,"良"], 5 | [4,109,81,121,1.28,68,51,"轻度污染"], 6 | [5,106,77,114,1.07,55,51,"轻度污染"], 7 | [6,109,81,121,1.28,68,51,"轻度污染"], 8 | [7,106,77,114,1.07,55,51,"轻度污染"], 9 | [8,89,65,78,0.86,51,26,"良"], 10 | [9,53,33,47,0.64,50,17,"良"], 11 | [10,80,55,80,1.01,75,24,"良"], 12 | [11,117,81,124,1.03,45,24,"轻度污染"], 13 | [12,99,71,142,1.1,62,42,"良"], 14 | [13,95,69,130,1.28,74,50,"良"], 15 | [14,116,87,131,1.47,84,40,"轻度污染"], 16 | [15,108,80,121,1.3,85,37,"轻度污染"], 17 | [16,134,83,167,1.16,57,43,"轻度污染"], 18 | [17,79,43,107,1.05,59,37,"良"], 19 | [18,71,46,89,0.86,64,25,"良"], 20 | [19,97,71,113,1.17,88,31,"良"], 21 | [20,84,57,91,0.85,55,31,"良"], 22 | [21,87,63,101,0.9,56,41,"良"], 23 | [22,104,77,119,1.09,73,48,"轻度污染"], 24 | [23,87,62,100,1,72,28,"良"], 25 | [24,168,128,172,1.49,97,56,"中度污染"], 26 | [25,65,45,51,0.74,39,17,"良"], 27 | [26,39,24,38,0.61,47,17,"优"], 28 | [27,39,24,39,0.59,50,19,"优"], 29 | [28,93,68,96,1.05,79,29,"良"], 30 | [29,188,143,197,1.66,99,51,"中度污染"], 31 | [30,174,131,174,1.55,108,50,"中度污染"], 32 | [31,187,143,201,1.39,89,53,"中度污染"] 33 | ] 34 | ); -------------------------------------------------------------------------------- /benchmark/gulpfile.js: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | */ 20 | 21 | var gulp = require('gulp'); 22 | var watch = require('gulp-watch'); 23 | var browserSync = require('browser-sync').create(); 24 | 25 | gulp.task('serve', function() { 26 | browserSync.init({ 27 | server: '../', 28 | startPath: 'benchmark' 29 | }); 30 | 31 | gulp.watch(['*.html', 'src/*.js']).on('change', browserSync.reload); 32 | }); 33 | 34 | gulp.task('default', ['serve']); 35 | -------------------------------------------------------------------------------- /test/runTest/actions/graph.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"valuechange","selector":"div.dg.ac>div.dg.main.a>ul>li.cr.string>div>div.c>select","value":"circular","time":1630,"target":"select"},{"time":1631,"delay":1500,"type":"screenshot-auto"},{"type":"mousemove","time":2290,"x":681,"y":21},{"type":"mousemove","time":2529,"x":683,"y":14},{"type":"mousemove","time":2797,"x":684,"y":13},{"type":"valuechange","selector":"div.dg.ac>div.dg.main.a>ul>li.cr.string>div>div.c>select","value":"none","time":4351,"target":"select"},{"time":4352,"delay":1500,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568041093157},{"name":"Action 2","ops":[{"type":"valuechange","selector":"div.dg.ac>div.dg.main.a>ul>li.cr.string>div>div.c>select","value":"circular","time":1619,"target":"select"},{"time":1620,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2973,"x":672,"y":29},{"type":"mousemove","time":3177,"x":670,"y":102},{"type":"mousemove","time":3378,"x":663,"y":125},{"type":"mousemove","time":3578,"x":656,"y":130},{"type":"mousemove","time":3812,"x":654,"y":128},{"type":"mousedown","time":3933,"x":654,"y":127},{"type":"mousemove","time":4012,"x":654,"y":127},{"type":"mouseup","time":4027,"x":654,"y":127},{"time":4028,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568041109823}] -------------------------------------------------------------------------------- /src/export/api/number.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | export { 21 | linearMap, 22 | round, 23 | asc, 24 | getPrecision, 25 | getPrecisionSafe, 26 | getPixelPrecision, 27 | getPercentWithPrecision, 28 | MAX_SAFE_INTEGER, 29 | remRadian, 30 | isRadianAroundZero, 31 | parseDate, 32 | quantity, 33 | quantityExponent, 34 | nice, 35 | quantile, 36 | reformIntervals, 37 | isNumeric, 38 | numericToNumber 39 | } from '../../util/number'; -------------------------------------------------------------------------------- /test/runTest/actions/bar3.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":742,"x":360,"y":14},{"type":"mouseup","time":836,"x":360,"y":14},{"time":837,"delay":300,"type":"screenshot-auto"},{"type":"mousemove","time":1253,"x":360,"y":14},{"type":"mousemove","time":1453,"x":440,"y":13},{"type":"mousemove","time":1664,"x":455,"y":12},{"type":"mousedown","time":1806,"x":455,"y":12},{"type":"mouseup","time":1889,"x":455,"y":12},{"time":1890,"delay":300,"type":"screenshot-auto"},{"type":"mousemove","time":2556,"x":454,"y":12},{"type":"mousemove","time":2758,"x":402,"y":25},{"type":"mousemove","time":2980,"x":398,"y":32},{"type":"mousedown","time":3127,"x":398,"y":32},{"type":"mouseup","time":3224,"x":398,"y":32},{"time":3225,"delay":300,"type":"screenshot-auto"},{"type":"mousemove","time":3809,"x":398,"y":32},{"type":"mousemove","time":4010,"x":398,"y":17},{"type":"mousedown","time":4127,"x":398,"y":17},{"type":"mouseup","time":4215,"x":398,"y":17},{"time":4216,"delay":300,"type":"screenshot-auto"},{"type":"mousemove","time":4492,"x":392,"y":18},{"type":"mousemove","time":4692,"x":349,"y":34},{"type":"mousemove","time":4892,"x":341,"y":35},{"type":"mousedown","time":4993,"x":341,"y":35},{"type":"mouseup","time":5084,"x":341,"y":35},{"time":5085,"delay":300,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568018774677}] -------------------------------------------------------------------------------- /src/chart/boxplot/boxplotVisual.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import GlobalModel from '../../model/Global'; 21 | import ExtensionAPI from '../../core/ExtensionAPI'; 22 | import BoxplotSeriesModel from './BoxplotSeries'; 23 | 24 | export default function boxplotVisual(ecModel: GlobalModel, api: ExtensionAPI) { 25 | ecModel.eachRawSeriesByType('boxplot', function (seriesModel: BoxplotSeriesModel) { 26 | seriesModel.getData().setVisual('legendSymbol', 'roundRect'); 27 | }); 28 | 29 | } -------------------------------------------------------------------------------- /test/build/removeDEV/src/code.src.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | var a = 112; 22 | 23 | if (__DEV__ ) { 24 | alert('vzxczxcvzx'); 25 | console.log('zxcvzxvvx'); 26 | } 27 | 28 | a++; 29 | a++; 30 | 31 | 32 | a++; 33 | 34 | 35 | if (__DEV__ ) { 36 | alert('v2332x'); 37 | console.log('v23232x'); 38 | } 39 | 40 | a--; 41 | 42 | function b() { 43 | 44 | a++; 45 | 46 | if (__DEV__ ) { 47 | console.log('211'); 48 | alert('12'); 49 | } 50 | } 51 | 52 | a+=12; -------------------------------------------------------------------------------- /src/component/tooltip/helper.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { TooltipOption } from './TooltipModel'; 21 | import Model from '../../model/Model'; 22 | 23 | export function shouldTooltipConfine(tooltipModel: Model): boolean { 24 | const confineOption = tooltipModel.get('confine'); 25 | return confineOption != null 26 | ? !!confineOption 27 | // In richText mode, the outside part can not be visible. 28 | : tooltipModel.get('renderMode') === 'richText'; 29 | } 30 | -------------------------------------------------------------------------------- /test/runTest/actions/connect-manually.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":684,"x":176,"y":189},{"type":"mousemove","time":897,"x":193,"y":190},{"type":"screenshot","time":1559},{"type":"mousemove","time":2386,"x":194,"y":190},{"type":"mousemove","time":2587,"x":260,"y":195},{"type":"mousemove","time":2793,"x":318,"y":198},{"type":"mousemove","time":3008,"x":459,"y":198},{"type":"mousemove","time":3217,"x":460,"y":198},{"type":"mousemove","time":4472,"x":465,"y":198},{"type":"mousemove","time":4672,"x":590,"y":194},{"type":"mousemove","time":4883,"x":632,"y":196},{"type":"mousemove","time":6013,"x":622,"y":198},{"type":"mousemove","time":6214,"x":375,"y":327},{"type":"mousemove","time":6415,"x":238,"y":446},{"type":"mousemove","time":6630,"x":208,"y":465},{"type":"screenshot","time":7409},{"type":"mousemove","time":7633,"x":212,"y":465},{"type":"mousemove","time":7834,"x":356,"y":469},{"type":"mousemove","time":8050,"x":404,"y":470},{"type":"mousemove","time":8262,"x":411,"y":470},{"type":"mousemove","time":8433,"x":412,"y":470},{"type":"screenshot","time":8939},{"type":"mousemove","time":9034,"x":415,"y":470},{"type":"mousemove","time":9235,"x":538,"y":467},{"type":"mousemove","time":9434,"x":619,"y":462},{"type":"mousemove","time":9641,"x":621,"y":461},{"type":"screenshot","time":10291}],"scrollY":0,"scrollX":0,"timestamp":1568048970794}] -------------------------------------------------------------------------------- /src/component/radar/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import RadarModel from '../../coord/radar/RadarModel'; 22 | import RadarView from './RadarView'; 23 | import Radar from '../../coord/radar/Radar'; 24 | 25 | export function install(registers: EChartsExtensionInstallRegisters) { 26 | registers.registerCoordinateSystem('radar', Radar); 27 | registers.registerComponentModel(RadarModel); 28 | registers.registerComponentView(RadarView); 29 | } -------------------------------------------------------------------------------- /src/chart/graph/circularLayout.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import {circularLayout} from './circularLayoutHelper'; 21 | import GlobalModel from '../../model/Global'; 22 | import GraphSeriesModel from './GraphSeries'; 23 | 24 | export default function graphCircularLayout(ecModel: GlobalModel) { 25 | ecModel.eachSeriesByType('graph', function (seriesModel: GraphSeriesModel) { 26 | if (seriesModel.get('layout') === 'circular') { 27 | circularLayout(seriesModel, 'symbolSize'); 28 | } 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /src/component/visualMap/installVisualMapPiecewise.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import PiecewiseModel from './PiecewiseModel'; 22 | import PiecewiseView from './PiecewiseView'; 23 | import installCommon from './installCommon'; 24 | 25 | export function install(registers: EChartsExtensionInstallRegisters) { 26 | registers.registerComponentModel(PiecewiseModel); 27 | registers.registerComponentView(PiecewiseView); 28 | 29 | installCommon(registers); 30 | } -------------------------------------------------------------------------------- /src/component/dataZoom/installDataZoomSelect.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import SelectZoomModel from './SelectZoomModel'; 22 | import SelectZoomView from './SelectZoomView'; 23 | import installCommon from './installCommon'; 24 | 25 | export function install(registers: EChartsExtensionInstallRegisters) { 26 | 27 | registers.registerComponentModel(SelectZoomModel); 28 | registers.registerComponentView(SelectZoomView); 29 | 30 | installCommon(registers); 31 | } -------------------------------------------------------------------------------- /src/component/dataZoom/installDataZoomSlider.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import SliderZoomModel from './SliderZoomModel'; 22 | import SliderZoomView from './SliderZoomView'; 23 | import installCommon from './installCommon'; 24 | 25 | export function install(registers: EChartsExtensionInstallRegisters) { 26 | 27 | registers.registerComponentModel(SliderZoomModel); 28 | registers.registerComponentView(SliderZoomView); 29 | 30 | installCommon(registers); 31 | } -------------------------------------------------------------------------------- /src/component/visualMap/installVisualMapContinuous.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import ContinuousModel from './ContinuousModel'; 22 | import ContinuousView from './ContinuousView'; 23 | import installCommon from './installCommon'; 24 | 25 | export function install(registers: EChartsExtensionInstallRegisters) { 26 | registers.registerComponentModel(ContinuousModel); 27 | registers.registerComponentView(ContinuousView); 28 | 29 | installCommon(registers); 30 | } -------------------------------------------------------------------------------- /test/runTest/actions/bar-polar-stack.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":435,"x":357,"y":13},{"type":"mouseup","time":552,"x":357,"y":13},{"time":553,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":737,"x":363,"y":13},{"type":"mousemove","time":937,"x":396,"y":12},{"type":"mousedown","time":1302,"x":396,"y":12},{"type":"mouseup","time":1402,"x":396,"y":12},{"time":1403,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1545,"x":397,"y":12},{"type":"mousemove","time":1751,"x":436,"y":13},{"type":"mousedown","time":2236,"x":436,"y":13},{"type":"mouseup","time":2337,"x":436,"y":13},{"time":2338,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":3185,"x":436,"y":13},{"type":"mouseup","time":3252,"x":436,"y":13},{"time":3253,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":3427,"x":432,"y":13},{"type":"mousemove","time":3628,"x":411,"y":13},{"type":"mousedown","time":4288,"x":411,"y":13},{"type":"mouseup","time":4373,"x":411,"y":13},{"time":4374,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":4456,"x":409,"y":13},{"type":"mousemove","time":4656,"x":357,"y":11},{"type":"mousemove","time":4863,"x":355,"y":11},{"type":"mousedown","time":5191,"x":355,"y":11},{"type":"mouseup","time":5265,"x":355,"y":11},{"time":5266,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568018203513}] -------------------------------------------------------------------------------- /test/stream-basic.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | */ 20 | 21 | .print-incremental-record-title { 22 | margin: 10px; 23 | font-size: 18px; 24 | font-weight: 700; 25 | } 26 | .print-incremental-record-title .print-incremental-cmd-count { 27 | color: red; 28 | } 29 | .print-incremental-record { 30 | margin: 5px 20px; 31 | } 32 | .print-incremental-record-line { 33 | margin: 10px 10px; 34 | font-size: 10px; 35 | } 36 | .print-incremental-record-line .print-incremental-cmd-count { 37 | color: red; 38 | font-size: 12px; 39 | } 40 | -------------------------------------------------------------------------------- /src/component/dataZoom/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters, use } from '../../extension'; 21 | import {install as installDataZoomInside} from './installDataZoomInside'; 22 | import {install as installDataZoomSlider} from './installDataZoomSlider'; 23 | 24 | export function install(registers: EChartsExtensionInstallRegisters) { 25 | use(installDataZoomInside); 26 | use(installDataZoomSlider); 27 | 28 | // Do not install './dataZoomSelect', 29 | // since it only work for toolbox dataZoom. 30 | 31 | } -------------------------------------------------------------------------------- /src/util/event.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import Element from 'zrender/src/Element'; 21 | 22 | export function findEventDispatcher( 23 | target: Element, 24 | det: (target: Element) => boolean, 25 | returnFirstMatch?: boolean 26 | ) { 27 | let found; 28 | while (target) { 29 | if (det(target)) { 30 | found = target; 31 | if (returnFirstMatch) { 32 | break; 33 | } 34 | } 35 | 36 | target = target.__hostTarget || target.parent; 37 | } 38 | return found; 39 | } -------------------------------------------------------------------------------- /test/runTest/actions/graph-grid.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":466,"x":755,"y":16},{"type":"mouseup","time":556,"x":755,"y":16},{"time":557,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":659,"x":753,"y":16},{"type":"mousemove","time":859,"x":409,"y":147},{"type":"mousemove","time":1059,"x":274,"y":165},{"type":"mousedown","time":1080,"x":274,"y":166},{"type":"mousemove","time":1262,"x":418,"y":275},{"type":"mousemove","time":1465,"x":552,"y":383},{"type":"mouseup","time":1825,"x":552,"y":383},{"time":1826,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1867,"x":552,"y":383},{"type":"mousemove","time":2068,"x":551,"y":383},{"type":"mousemove","time":2145,"x":551,"y":383},{"type":"mousemove","time":2345,"x":549,"y":385},{"type":"mousemove","time":2550,"x":458,"y":342},{"type":"mousemove","time":2751,"x":309,"y":287},{"type":"mousedown","time":2851,"x":310,"y":289},{"type":"mousemove","time":2962,"x":367,"y":295},{"type":"mousemove","time":3162,"x":407,"y":299},{"type":"mousemove","time":3434,"x":416,"y":299},{"type":"mouseup","time":3495,"x":416,"y":299},{"time":3496,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":3563,"x":415,"y":299},{"type":"mousemove","time":3763,"x":408,"y":299},{"type":"mousemove","time":3963,"x":407,"y":300},{"type":"mousemove","time":4163,"x":406,"y":300}],"scrollY":0,"scrollX":0,"timestamp":1568040920597}] -------------------------------------------------------------------------------- /src/component/calendar/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import CalendarModel from '../../coord/calendar/CalendarModel'; 22 | import CalendarView from './CalendarView'; 23 | import Calendar from '../../coord/calendar/Calendar'; 24 | 25 | export function install(registers: EChartsExtensionInstallRegisters) { 26 | registers.registerComponentModel(CalendarModel); 27 | registers.registerComponentView(CalendarView); 28 | registers.registerCoordinateSystem('calendar', Calendar); 29 | } -------------------------------------------------------------------------------- /src/component/visualMap/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters, use } from '../../extension'; 21 | import {install as installVisualMapContinuous} from './installVisualMapContinuous'; 22 | import {install as installVisualMapPiecewise} from './installVisualMapPiecewise'; 23 | 24 | export function install(registers: EChartsExtensionInstallRegisters) { 25 | use(installVisualMapContinuous); 26 | use(installVisualMapPiecewise); 27 | 28 | // Do not install './dataZoomSelect', 29 | // since it only work for toolbox dataZoom. 30 | } -------------------------------------------------------------------------------- /test/runTest/actions/dataZoom-extreme.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousemove","time":967,"x":544,"y":323},{"type":"mousemove","time":1167,"x":189,"y":212},{"type":"mousemove","time":1375,"x":151,"y":198},{"type":"mousedown","time":1492,"x":151,"y":198},{"type":"mousemove","time":1502,"x":151,"y":198},{"type":"mouseup","time":1559,"x":151,"y":198},{"time":1560,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1710,"x":151,"y":198},{"type":"mousemove","time":1920,"x":157,"y":199},{"type":"mousemove","time":2126,"x":590,"y":240},{"type":"mousemove","time":2336,"x":699,"y":246},{"type":"mousemove","time":2540,"x":746,"y":241},{"type":"mousemove","time":2753,"x":752,"y":238},{"type":"mousedown","time":2892,"x":755,"y":237},{"type":"mousemove","time":2959,"x":755,"y":237},{"type":"mouseup","time":3010,"x":755,"y":237},{"time":3011,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":3188,"x":752,"y":237},{"type":"mousemove","time":3396,"x":329,"y":302},{"type":"mousemove","time":3610,"x":291,"y":306},{"type":"mousedown","time":3698,"x":291,"y":306},{"type":"mousemove","time":3821,"x":303,"y":322},{"type":"mousemove","time":4021,"x":490,"y":441},{"type":"mousemove","time":4229,"x":543,"y":463},{"type":"mouseup","time":4456,"x":543,"y":463},{"time":4457,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":4647,"x":543,"y":463}],"scrollY":335,"scrollX":0,"timestamp":1568036687401}] -------------------------------------------------------------------------------- /src/chart/effectScatter/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import EffectScatterView from './EffectScatterView'; 22 | import EffectScatterSeriesModel from './EffectScatterSeries'; 23 | 24 | import layoutPoints from '../../layout/points'; 25 | 26 | export function install(registers: EChartsExtensionInstallRegisters) { 27 | registers.registerChartView(EffectScatterView); 28 | registers.registerSeriesModel(EffectScatterSeriesModel); 29 | registers.registerLayout(layoutPoints('effectScatter')); 30 | } -------------------------------------------------------------------------------- /src/chart/lines/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import LinesView from './LinesView'; 22 | import LinesSeriesModel from './LinesSeries'; 23 | import linesLayout from './linesLayout'; 24 | import linesVisual from './linesVisual'; 25 | 26 | export function install(registers: EChartsExtensionInstallRegisters) { 27 | registers.registerChartView(LinesView); 28 | registers.registerSeriesModel(LinesSeriesModel); 29 | registers.registerLayout(linesLayout); 30 | registers.registerVisual(linesVisual); 31 | } -------------------------------------------------------------------------------- /src/theme/light.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | const colorAll = [ 21 | '#37A2DA', '#32C5E9', '#67E0E3', '#9FE6B8', '#FFDB5C', '#ff9f7f', 22 | '#fb7293', '#E062AE', '#E690D1', '#e7bcf3', '#9d96f5', '#8378EA', '#96BFFF' 23 | ]; 24 | 25 | export default { 26 | 27 | color: colorAll, 28 | 29 | colorLayer: [ 30 | ['#37A2DA', '#ffd85c', '#fd7b5f'], 31 | ['#37A2DA', '#67E0E3', '#FFDB5C', '#ff9f7f', '#E062AE', '#9d96f5'], 32 | ['#37A2DA', '#32C5E9', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#e7bcf3', '#8378EA', '#96BFFF'], 33 | colorAll 34 | ] 35 | }; -------------------------------------------------------------------------------- /test/runTest/actions/update.js: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | */ 20 | 21 | const glob = require('glob'); 22 | const fs = require('fs'); 23 | 24 | const result = {}; 25 | glob('*.json', (err, files) => { 26 | files.forEach(file => { 27 | if (file.match('__meta__')) { 28 | return; 29 | } 30 | const actions = JSON.parse(fs.readFileSync(file, 'utf-8')); 31 | result[file.replace(/.json$/, '')] = actions.length; 32 | }); 33 | fs.writeFileSync('__meta__.json', JSON.stringify(result, Object.keys(result).sort((a, b) => a.localeCompare(b)), 2), 'utf-8'); 34 | }); -------------------------------------------------------------------------------- /src/component/marker/installMarkLine.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | import { EChartsExtensionInstallRegisters } from '../../extension'; 20 | import MarkLineModel from './MarkLineModel'; 21 | import MarkLineView from './MarkLineView'; 22 | 23 | export function install(registers: EChartsExtensionInstallRegisters) { 24 | registers.registerComponentModel(MarkLineModel); 25 | registers.registerComponentView(MarkLineView); 26 | 27 | registers.registerPreprocessor(function (opt) { 28 | // Make sure markLine component is enabled 29 | opt.markLine = opt.markLine || {}; 30 | }); 31 | } -------------------------------------------------------------------------------- /src/chart/candlestick/preprocessor.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import * as zrUtil from 'zrender/src/core/util'; 21 | import { ECUnitOption } from '../../util/types'; 22 | 23 | export default function candlestickPreprocessor(option: ECUnitOption) { 24 | if (!option || !zrUtil.isArray(option.series)) { 25 | return; 26 | } 27 | 28 | // Translate 'k' to 'candlestick'. 29 | zrUtil.each(option.series, function (seriesItem) { 30 | if (zrUtil.isObject(seriesItem) && seriesItem.type === 'k') { 31 | seriesItem.type = 'candlestick'; 32 | } 33 | }); 34 | } 35 | -------------------------------------------------------------------------------- /src/component/marker/installMarkArea.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import MarkAreaModel from './MarkAreaModel'; 22 | import MarkAreaView from './MarkAreaView'; 23 | 24 | export function install(registers: EChartsExtensionInstallRegisters) { 25 | registers.registerComponentModel(MarkAreaModel); 26 | registers.registerComponentView(MarkAreaView); 27 | 28 | registers.registerPreprocessor(function (opt) { 29 | // Make sure markArea component is enabled 30 | opt.markArea = opt.markArea || {}; 31 | }); 32 | } -------------------------------------------------------------------------------- /src/util/innerStore.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import Element from 'zrender/src/Element'; 21 | import { DataModel, ECEventData, BlurScope, InnerFocus, SeriesDataType } from './types'; 22 | import { makeInner } from './model'; 23 | /** 24 | * ECData stored on graphic element 25 | */ 26 | export interface ECData { 27 | dataIndex?: number; 28 | dataModel?: DataModel; 29 | eventData?: ECEventData; 30 | seriesIndex?: number; 31 | dataType?: SeriesDataType; 32 | focus?: InnerFocus; 33 | blurScope?: BlurScope; 34 | } 35 | export const getECData = makeInner(); 36 | -------------------------------------------------------------------------------- /src/component/marker/installMarkPoint.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | import { EChartsExtensionInstallRegisters } from '../../extension'; 20 | import MarkPointModel from './MarkPointModel'; 21 | import MarkPointView from './MarkPointView'; 22 | 23 | export function install(registers: EChartsExtensionInstallRegisters) { 24 | registers.registerComponentModel(MarkPointModel); 25 | registers.registerComponentView(MarkPointView); 26 | 27 | registers.registerPreprocessor(function (opt) { 28 | // Make sure markPoint component is enabled 29 | opt.markPoint = opt.markPoint || {}; 30 | }); 31 | } -------------------------------------------------------------------------------- /src/chart/funnel/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import FunnelView from './FunnelView'; 22 | import FunnelSeriesModel from './FunnelSeries'; 23 | import funnelLayout from './funnelLayout'; 24 | import dataFilter from '../../processor/dataFilter'; 25 | 26 | export function install(registers: EChartsExtensionInstallRegisters) { 27 | registers.registerChartView(FunnelView); 28 | registers.registerSeriesModel(FunnelSeriesModel); 29 | registers.registerLayout(funnelLayout); 30 | registers.registerProcessor(dataFilter('funnel')); 31 | } -------------------------------------------------------------------------------- /src/util/vendor.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { isArray } from 'zrender/src/core/util'; 21 | 22 | /* global Float32Array */ 23 | const supportFloat32Array = typeof Float32Array !== 'undefined'; 24 | 25 | const Float32ArrayCtor = !supportFloat32Array ? Array : Float32Array; 26 | 27 | export function createFloat32Array(arg: number | number[]): number[] | Float32Array { 28 | if (isArray(arg)) { 29 | // Return self directly if don't support TypedArray. 30 | return supportFloat32Array ? new Float32Array(arg) : arg; 31 | } 32 | // Else is number 33 | return new Float32ArrayCtor(arg); 34 | } -------------------------------------------------------------------------------- /src/coord/AxisBaseModel.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /** 21 | * Base Axis Model for xAxis, yAxis, angleAxis, radiusAxis. singleAxis 22 | */ 23 | import { AxisBaseOption } from './axisCommonTypes'; 24 | import ComponentModel from '../model/Component'; 25 | import { AxisModelCommonMixin } from './axisModelCommonMixin'; 26 | import { AxisModelExtendedInCreator } from './axisModelCreator'; 27 | import Axis from './Axis'; 28 | 29 | export interface AxisBaseModel 30 | extends ComponentModel, 31 | AxisModelCommonMixin, 32 | AxisModelExtendedInCreator { 33 | 34 | axis: Axis 35 | } -------------------------------------------------------------------------------- /test/-cases.html: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | echarts cases 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /src/chart/bar/installPictorialBar.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import PictorialBarView from './PictorialBarView'; 22 | import PictorialBarSeriesModel from './PictorialBarSeries'; 23 | import { layout } from '../../layout/barGrid'; 24 | import { curry } from 'zrender/src/core/util'; 25 | 26 | export function install(registers: EChartsExtensionInstallRegisters) { 27 | registers.registerChartView(PictorialBarView); 28 | registers.registerSeriesModel(PictorialBarSeriesModel); 29 | 30 | registers.registerLayout(curry( 31 | layout, 'pictorialBar' 32 | )); 33 | } -------------------------------------------------------------------------------- /src/component/dataZoom/installDataZoomInside.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import InsideZoomModel from './InsideZoomModel'; 22 | import InsideZoomView from './InsideZoomView'; 23 | import {installDataZoomRoamProcessor} from './roams'; 24 | import installCommon from './installCommon'; 25 | 26 | export function install(registers: EChartsExtensionInstallRegisters) { 27 | 28 | installCommon(registers); 29 | 30 | registers.registerComponentModel(InsideZoomModel); 31 | registers.registerComponentView(InsideZoomView); 32 | 33 | installDataZoomRoamProcessor(registers); 34 | } -------------------------------------------------------------------------------- /src/export/api/graphic.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | export { 21 | extendShape, extendPath, makePath, makeImage, 22 | mergePath, resizePath, createIcon, 23 | updateProps, initProps, getTransform, 24 | clipPointsByRect, clipRectByRect, 25 | registerShape, getShapeClass, 26 | Group, 27 | Image, 28 | Text, 29 | Circle, 30 | Ellipse, 31 | Sector, 32 | Ring, 33 | Polygon, 34 | Polyline, 35 | Rect, 36 | Line, 37 | BezierCurve, 38 | Arc, 39 | IncrementalDisplayable, 40 | CompoundPath, 41 | LinearGradient, 42 | RadialGradient, 43 | BoundingRect 44 | } from '../../util/graphic'; -------------------------------------------------------------------------------- /src/chart/themeRiver/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | import { EChartsExtensionInstallRegisters } from '../../extension'; 20 | import ThemeRiverView from './ThemeRiverView'; 21 | import ThemeRiverSeriesModel from './ThemeRiverSeries'; 22 | import themeRiverLayout from './themeRiverLayout'; 23 | import dataFilter from '../../processor/dataFilter'; 24 | 25 | export function install(registers: EChartsExtensionInstallRegisters) { 26 | registers.registerChartView(ThemeRiverView); 27 | registers.registerSeriesModel(ThemeRiverSeriesModel); 28 | 29 | registers.registerLayout(themeRiverLayout); 30 | registers.registerProcessor(dataFilter('themeRiver')); 31 | 32 | } -------------------------------------------------------------------------------- /src/chart/tree/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import { EChartsExtensionInstallRegisters } from '../../extension'; 21 | import TreeView from './TreeView'; 22 | import TreeSeriesModel from './TreeSeries'; 23 | import treeLayout from './treeLayout'; 24 | import treeVisual from './treeVisual'; 25 | import {installTreeAction} from './treeAction'; 26 | 27 | export function install(registers: EChartsExtensionInstallRegisters) { 28 | registers.registerChartView(TreeView); 29 | registers.registerSeriesModel(TreeSeriesModel); 30 | registers.registerLayout(treeLayout); 31 | registers.registerVisual(treeVisual); 32 | 33 | installTreeAction(registers); 34 | } -------------------------------------------------------------------------------- /src/coord/geo/fix/geoCoord.ts: -------------------------------------------------------------------------------- 1 | import Region from '../Region'; 2 | import { Dictionary } from 'zrender/src/core/types'; 3 | 4 | /* 5 | * Licensed to the Apache Software Foundation (ASF) under one 6 | * or more contributor license agreements. See the NOTICE file 7 | * distributed with this work for additional information 8 | * regarding copyright ownership. The ASF licenses this file 9 | * to you under the Apache License, Version 2.0 (the 10 | * "License"); you may not use this file except in compliance 11 | * with the License. You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, 16 | * software distributed under the License is distributed on an 17 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 18 | * KIND, either express or implied. See the License for the 19 | * specific language governing permissions and limitations 20 | * under the License. 21 | */ 22 | 23 | const geoCoordMap = { 24 | 'Russia': [100, 60], 25 | 'United States': [-99, 38], 26 | 'United States of America': [-99, 38] 27 | } as Dictionary; 28 | 29 | export default function fixGeoCoords(mapType: string, region: Region) { 30 | if (mapType === 'world') { 31 | const geoCoord = geoCoordMap[region.name]; 32 | if (geoCoord) { 33 | const cp = region.center; 34 | cp[0] = geoCoord[0]; 35 | cp[1] = geoCoord[1]; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /test/runTest/actions/dynamic-splitNumber.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":751,"x":786,"y":467},{"type":"mousemove","time":954,"x":786,"y":466},{"type":"mousemove","time":1157,"x":754,"y":390},{"type":"mousemove","time":1364,"x":722,"y":327},{"type":"mousemove","time":1565,"x":718,"y":316},{"type":"mouseup","time":1832,"x":718,"y":316},{"time":1833,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":2447,"x":718,"y":316},{"type":"mousemove","time":2536,"x":718,"y":314},{"type":"mousemove","time":2737,"x":708,"y":236},{"type":"mousemove","time":2942,"x":697,"y":192},{"type":"mousemove","time":3142,"x":696,"y":181},{"type":"mouseup","time":3497,"x":696,"y":181},{"time":3498,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":3973,"x":696,"y":181},{"type":"mousemove","time":4090,"x":696,"y":179},{"type":"mousemove","time":4290,"x":684,"y":123},{"type":"mousemove","time":4490,"x":682,"y":108},{"type":"mousemove","time":4696,"x":682,"y":106},{"type":"mousemove","time":4897,"x":682,"y":102},{"type":"mouseup","time":5432,"x":682,"y":102},{"time":5433,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":6243,"x":682,"y":102},{"type":"mousemove","time":6326,"x":682,"y":103},{"type":"mousemove","time":6532,"x":693,"y":150},{"type":"mousemove","time":6732,"x":703,"y":218},{"type":"mousemove","time":6993,"x":704,"y":237},{"type":"mouseup","time":7444,"x":704,"y":237},{"time":7445,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568038444477}] -------------------------------------------------------------------------------- /src/component/visualMap/visualMapAction.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import VisualMapModel from './VisualMapModel'; 21 | import { Payload } from '../../util/types'; 22 | import GlobalModel from '../../model/Global'; 23 | 24 | export const visualMapActionInfo = { 25 | type: 'selectDataRange', 26 | event: 'dataRangeSelected', 27 | // FIXME use updateView appears wrong 28 | update: 'update' 29 | }; 30 | 31 | export const visualMapActionHander = function (payload: Payload, ecModel: GlobalModel) { 32 | ecModel.eachComponent({mainType: 'visualMap', query: payload}, function (model) { 33 | (model as VisualMapModel).setSelected(payload.selected); 34 | }); 35 | }; 36 | -------------------------------------------------------------------------------- /src/coord/radar/IndicatorAxis.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | import Axis from '../Axis'; 21 | import Scale from '../../scale/Scale'; 22 | import { OptionAxisType } from '../axisCommonTypes'; 23 | import { AxisBaseModel } from '../AxisBaseModel'; 24 | import { InnerIndicatorAxisOption } from './RadarModel'; 25 | 26 | class IndicatorAxis extends Axis { 27 | 28 | type: OptionAxisType = 'value'; 29 | 30 | angle = 0; 31 | 32 | name = ''; 33 | 34 | model: AxisBaseModel; 35 | 36 | constructor(dim: string, scale: Scale, radiusExtent?: [number, number]) { 37 | super(dim, scale, radiusExtent); 38 | } 39 | } 40 | 41 | export default IndicatorAxis; -------------------------------------------------------------------------------- /test/runTest/actions/bar-polar-multi-series.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":393,"x":345,"y":14},{"type":"mouseup","time":486,"x":345,"y":14},{"time":487,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":629,"x":346,"y":14},{"type":"mousemove","time":829,"x":377,"y":12},{"type":"mousemove","time":1037,"x":381,"y":12},{"type":"mousedown","time":1278,"x":381,"y":12},{"type":"mouseup","time":1387,"x":381,"y":12},{"time":1388,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1454,"x":382,"y":12},{"type":"mousemove","time":1654,"x":425,"y":12},{"type":"mousemove","time":1864,"x":431,"y":10},{"type":"mousemove","time":2064,"x":432,"y":10},{"type":"mousedown","time":2115,"x":432,"y":10},{"type":"mouseup","time":2196,"x":432,"y":10},{"time":2197,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":2945,"x":432,"y":10},{"type":"mouseup","time":3080,"x":432,"y":10},{"time":3081,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":3217,"x":431,"y":10},{"type":"mousemove","time":3417,"x":398,"y":13},{"type":"mousedown","time":3764,"x":398,"y":13},{"type":"mouseup","time":3865,"x":398,"y":13},{"time":3866,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":3967,"x":397,"y":13},{"type":"mousemove","time":4168,"x":357,"y":17},{"type":"mousemove","time":4368,"x":343,"y":16},{"type":"mousedown","time":4507,"x":343,"y":16},{"type":"mouseup","time":4616,"x":343,"y":16},{"time":4617,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568018156413}] -------------------------------------------------------------------------------- /test/runTest/actions/dataZoomHighPrecision.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":404,"x":670,"y":84},{"type":"mouseup","time":504,"x":670,"y":84},{"time":505,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":571,"x":669,"y":84},{"type":"mousemove","time":773,"x":448,"y":161},{"type":"mousemove","time":973,"x":420,"y":168},{"type":"mousedown","time":1254,"x":420,"y":168},{"type":"mousemove","time":1438,"x":423,"y":168},{"type":"mousemove","time":1642,"x":475,"y":173},{"type":"mousemove","time":1842,"x":485,"y":175},{"type":"mousemove","time":1959,"x":485,"y":175},{"type":"mousemove","time":2160,"x":486,"y":184},{"type":"mouseup","time":2477,"x":486,"y":184},{"time":2478,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568038314770},{"name":"Action 2","ops":[{"type":"screenshot","time":660}],"scrollY":537,"scrollX":0,"timestamp":1568038371062},{"name":"Action 3","ops":[{"type":"mousedown","time":815,"x":770,"y":185},{"type":"mousemove","time":1039,"x":770,"y":187},{"type":"mousemove","time":1241,"x":772,"y":231},{"type":"mousemove","time":1442,"x":768,"y":327},{"type":"mousemove","time":1644,"x":768,"y":357},{"type":"mouseup","time":1988,"x":768,"y":357},{"time":1989,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2508,"x":768,"y":360},{"type":"mousemove","time":2708,"x":767,"y":373},{"type":"mousemove","time":2908,"x":767,"y":379},{"type":"mousemove","time":3115,"x":767,"y":380},{"type":"screenshot","time":3915}],"scrollY":998,"scrollX":0,"timestamp":1568038405011}] -------------------------------------------------------------------------------- /test/runTest/actions/bar-polar-null-data-radial.json: -------------------------------------------------------------------------------- 1 | [{"name":"Action 1","ops":[{"type":"mousedown","time":413,"x":344,"y":12},{"type":"mouseup","time":509,"x":344,"y":12},{"time":510,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":755,"x":344,"y":12},{"type":"mousemove","time":955,"x":384,"y":10},{"type":"mousemove","time":1162,"x":390,"y":11},{"type":"mousedown","time":1281,"x":390,"y":11},{"type":"mouseup","time":1364,"x":390,"y":11},{"time":1365,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":1404,"x":395,"y":10},{"type":"mousemove","time":1607,"x":449,"y":10},{"type":"mousedown","time":2092,"x":449,"y":10},{"type":"mouseup","time":2174,"x":449,"y":10},{"time":2175,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":2939,"x":449,"y":10},{"type":"mouseup","time":3029,"x":449,"y":10},{"time":3030,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":3207,"x":447,"y":10},{"type":"mousemove","time":3407,"x":417,"y":11},{"type":"mousemove","time":3615,"x":403,"y":12},{"type":"mousedown","time":3723,"x":403,"y":12},{"type":"mouseup","time":3824,"x":403,"y":12},{"time":3825,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":3924,"x":401,"y":12},{"type":"mousemove","time":4124,"x":363,"y":11},{"type":"mousemove","time":4326,"x":350,"y":11},{"type":"mousemove","time":4526,"x":345,"y":12},{"type":"mousedown","time":4641,"x":345,"y":12},{"type":"mouseup","time":4732,"x":345,"y":12},{"time":4733,"delay":400,"type":"screenshot-auto"}],"scrollY":0,"scrollX":0,"timestamp":1568018171833}] --------------------------------------------------------------------------------