Browse Source

引入echarts

htc 6 months ago
parent
commit
b4231e2fb7
100 changed files with 426294 additions and 0 deletions
  1. 55 0
      components/cusEcharts/index.vue
  2. 393 0
      components/l-echart/canvas.js
  3. 252 0
      components/l-echart/l-echart.uvue
  4. 516 0
      components/l-echart/l-echart.vue
  5. 51 0
      components/l-echart/nvue.js
  6. 145 0
      components/l-echart/utils.js
  7. 133 0
      components/l-echart/uvue.uts
  8. 159 0
      components/lime-echart/lime-echart.nvue
  9. 160 0
      components/lime-echart/lime-echart.uvue
  10. 226 0
      components/lime-echart/lime-echart.vue
  11. 2 0
      main.js
  12. 13 0
      node_modules/.package-lock.json
  13. BIN
      node_modules/echarts/.DS_Store
  14. 38 0
      node_modules/echarts/.editorconfig
  15. 2 0
      node_modules/echarts/.eslintignore
  16. 3 0
      node_modules/echarts/.gitattributes
  17. 10 0
      node_modules/echarts/.github/ISSUE_TEMPLATE.md
  18. 66 0
      node_modules/echarts/.github/pull_request_template.md
  19. 60 0
      node_modules/echarts/.github/stale.yml
  20. 43 0
      node_modules/echarts/.github/workflows/nodejs.yml
  21. 52 0
      node_modules/echarts/.headerignore
  22. 5 0
      node_modules/echarts/.huskyrc
  23. 70 0
      node_modules/echarts/.jshintrc
  24. 70 0
      node_modules/echarts/.jshintrc-dist
  25. 72 0
      node_modules/echarts/CONTRIBUTING.md
  26. 12 0
      node_modules/echarts/DISCLAIMER
  27. 134 0
      node_modules/echarts/KEYS
  28. 223 0
      node_modules/echarts/LICENSE
  29. 5 0
      node_modules/echarts/NOTICE
  30. 115 0
      node_modules/echarts/README.md
  31. BIN
      node_modules/echarts/asset/.DS_Store
  32. BIN
      node_modules/echarts/asset/contributing-inspect.png
  33. BIN
      node_modules/echarts/asset/logo.png
  34. BIN
      node_modules/echarts/build/.DS_Store
  35. 77 0
      node_modules/echarts/build/.jshintrc
  36. 183 0
      node_modules/echarts/build/addHeader.js
  37. 182 0
      node_modules/echarts/build/amd2common.js
  38. 255 0
      node_modules/echarts/build/build.js
  39. 178 0
      node_modules/echarts/build/config.js
  40. 184 0
      node_modules/echarts/build/mangleString.js
  41. 59 0
      node_modules/echarts/build/optimize.js
  42. 97 0
      node_modules/echarts/build/pre-publish.js
  43. 215 0
      node_modules/echarts/build/preamble.js
  44. 80 0
      node_modules/echarts/build/rollup-plugin-ec-lang.js
  45. 54 0
      node_modules/echarts/build/rollup-plugin-ec-remove-dev.js
  46. 64732 0
      node_modules/echarts/dist/echarts-en.common.js
  47. 22 0
      node_modules/echarts/dist/echarts-en.common.min.js
  48. 98860 0
      node_modules/echarts/dist/echarts-en.js
  49. 1 0
      node_modules/echarts/dist/echarts-en.js.map
  50. 22 0
      node_modules/echarts/dist/echarts-en.min.js
  51. 44521 0
      node_modules/echarts/dist/echarts-en.simple.js
  52. 22 0
      node_modules/echarts/dist/echarts-en.simple.min.js
  53. 64732 0
      node_modules/echarts/dist/echarts.common.js
  54. 22 0
      node_modules/echarts/dist/echarts.common.min.js
  55. 98860 0
      node_modules/echarts/dist/echarts.js
  56. 1 0
      node_modules/echarts/dist/echarts.js.map
  57. 22 0
      node_modules/echarts/dist/echarts.min.js
  58. 44521 0
      node_modules/echarts/dist/echarts.simple.js
  59. 22 0
      node_modules/echarts/dist/echarts.simple.min.js
  60. 457 0
      node_modules/echarts/dist/extension/bmap.js
  61. 1 0
      node_modules/echarts/dist/extension/bmap.js.map
  62. 22 0
      node_modules/echarts/dist/extension/bmap.min.js
  63. 872 0
      node_modules/echarts/dist/extension/dataTool.js
  64. 1 0
      node_modules/echarts/dist/extension/dataTool.js.map
  65. 22 0
      node_modules/echarts/dist/extension/dataTool.min.js
  66. 273 0
      node_modules/echarts/echarts.all.js
  67. 23 0
      node_modules/echarts/echarts.blank.js
  68. 44 0
      node_modules/echarts/echarts.common.js
  69. 27 0
      node_modules/echarts/echarts.simple.js
  70. 189 0
      node_modules/echarts/extension-src/.eslintrc.yaml
  71. 228 0
      node_modules/echarts/extension-src/bmap/BMapCoordSys.js
  72. 61 0
      node_modules/echarts/extension-src/bmap/BMapModel.js
  73. 127 0
      node_modules/echarts/extension-src/bmap/BMapView.js
  74. 45 0
      node_modules/echarts/extension-src/bmap/bmap.js
  75. 221 0
      node_modules/echarts/extension-src/dataTool/gexf.js
  76. 38 0
      node_modules/echarts/extension-src/dataTool/index.js
  77. 91 0
      node_modules/echarts/extension-src/dataTool/prepareBoxplotData.js
  78. BIN
      node_modules/echarts/extension/.DS_Store
  79. 255 0
      node_modules/echarts/extension/bmap/BMapCoordSys.js
  80. 72 0
      node_modules/echarts/extension/bmap/BMapModel.js
  81. 147 0
      node_modules/echarts/extension/bmap/BMapView.js
  82. 72 0
      node_modules/echarts/extension/bmap/README.md
  83. 65 0
      node_modules/echarts/extension/bmap/bmap.js
  84. 230 0
      node_modules/echarts/extension/dataTool/gexf.js
  85. 61 0
      node_modules/echarts/extension/dataTool/index.js
  86. 107 0
      node_modules/echarts/extension/dataTool/prepareBoxplotData.js
  87. 20 0
      node_modules/echarts/extension/echarts.js
  88. 36 0
      node_modules/echarts/extension/webpack.config.js
  89. 73 0
      node_modules/echarts/index.common.js
  90. 135 0
      node_modules/echarts/index.js
  91. 38 0
      node_modules/echarts/index.simple.js
  92. 76 0
      node_modules/echarts/lib/CoordinateSystem.js
  93. 50 0
      node_modules/echarts/lib/ExtensionAPI.js
  94. 79 0
      node_modules/echarts/lib/action/createDataSelectAction.js
  95. 85 0
      node_modules/echarts/lib/action/geoRoam.js
  96. 86 0
      node_modules/echarts/lib/action/roamHelper.js
  97. 67 0
      node_modules/echarts/lib/chart/bar.js
  98. 91 0
      node_modules/echarts/lib/chart/bar/BarSeries.js
  99. 698 0
      node_modules/echarts/lib/chart/bar/BarView.js
  100. 0 0
      node_modules/echarts/lib/chart/bar/BaseBarSeries.js

+ 55 - 0
components/cusEcharts/index.vue

@@ -0,0 +1,55 @@
+<!-- 图表组件 -->
+<template>
+	<view class="chart_content_item">
+		<LEchart ref="chartRef"></LEchart>
+	</view>
+</template>
+
+<script>
+	import LEchart from "@/components/l-echart/l-echart.vue"
+	import * as echarts from 'echarts'
+	export default {
+		components:{ LEchart },
+		props:{
+			option: {
+				type: Object
+			}
+		},
+		data(){
+			return {
+				chartRef:null
+			}
+		},
+		mounted() {
+			this.$nextTick(()=>{
+				this.chartRef = this.$refs.chartRef;
+				setTimeout(() => {
+					if (!this.chartRef) return
+					this.chartRef.init(echarts, chart => {
+						chart.setOption(this.option)
+					})
+				}, 300)
+			})
+		},
+		watch:{
+			props:{
+				handler:function(newVal, oldVal){
+					if (this.chartRef) {
+						this.chartRef.init(echarts, chart => {
+							chart.setOption(newVal)
+						})
+					}
+				},
+				deep:true,
+				immediate:true
+			}
+		}
+	}
+</script>
+
+<style scoped lang="less">
+	.chart_content_item {
+		width: 100%;
+		height: 100%;
+	}
+</style>

+ 393 - 0
components/l-echart/canvas.js

@@ -0,0 +1,393 @@
+const cacheChart = {}
+const fontSizeReg = /([\d\.]+)px/;
+class EventEmit {
+	constructor() {
+		this.__events = {};
+	}
+	on(type, listener) {
+		if (!type || !listener) {
+			return;
+		}
+		const events = this.__events[type] || [];
+		events.push(listener);
+		this.__events[type] = events;
+	}
+	emit(type, e) {
+		if (type.constructor === Object) {
+			e = type;
+			type = e && e.type;
+		}
+		if (!type) {
+			return;
+		}
+		const events = this.__events[type];
+		if (!events || !events.length) {
+			return;
+		}
+		events.forEach((listener) => {
+			listener.call(this, e);
+		});
+	}
+	off(type, listener) {
+		const __events = this.__events;
+		const events = __events[type];
+		if (!events || !events.length) {
+			return;
+		}
+		if (!listener) {
+			delete __events[type];
+			return;
+		}
+		for (let i = 0, len = events.length; i < len; i++) {
+			if (events[i] === listener) {
+				events.splice(i, 1);
+				i--;
+			}
+		}
+	}
+}
+class Image {
+	constructor() {
+		this.currentSrc = null
+		this.naturalHeight = 0
+		this.naturalWidth = 0
+		this.width = 0
+		this.height = 0
+		this.tagName = 'IMG'
+	}
+	set src(src) {
+		this.currentSrc = src
+		uni.getImageInfo({
+			src,
+			success: (res) => {
+				this.naturalWidth = this.width = res.width
+				this.naturalHeight = this.height = res.height
+				this.onload()
+			},
+			fail: () => {
+				this.onerror()
+			}
+		})
+	}
+	get src() {
+		return this.currentSrc
+	}
+}
+class OffscreenCanvas {
+	constructor(ctx, com, canvasId) {
+		this.tagName = 'canvas'
+		this.com = com
+		this.canvasId = canvasId
+		this.ctx = ctx
+	}
+	set width(w) {
+		this.com.offscreenWidth = w
+	}
+	set height(h) {
+		this.com.offscreenHeight = h
+	}
+	get width() {
+		return this.com.offscreenWidth || 0
+	}
+	get height() {
+		return this.com.offscreenHeight || 0
+	}
+	getContext(type) {
+		return this.ctx
+	}
+	getImageData() {
+		return new Promise((resolve, reject) => {
+			this.com.$nextTick(() => {
+				uni.canvasGetImageData({
+					x:0,
+					y:0,
+					width: this.com.offscreenWidth,
+					height: this.com.offscreenHeight,
+					canvasId: this.canvasId,
+					success: (res) => {
+						resolve(res)
+					},
+					fail: (err) => {
+						reject(err)
+					},
+				}, this.com)
+			})
+		})
+	}
+}
+export class Canvas {
+	constructor(ctx, com, isNew, canvasNode={}) {
+		cacheChart[com.canvasId] = {ctx}
+		this.canvasId = com.canvasId;
+		this.chart = null;
+		this.isNew = isNew
+		this.tagName = 'canvas'
+		this.canvasNode = canvasNode;
+		this.com = com;
+		if (!isNew) {
+			this._initStyle(ctx)
+		}
+		this._initEvent();
+		this._ee = new EventEmit()
+	}
+	getContext(type) {
+		if (type === '2d') {
+			return this.ctx;
+		}
+	}
+	setAttribute(key, value) {
+		if(key === 'aria-label') {
+			this.com['ariaLabel'] = value
+		}
+	}
+	setChart(chart) {
+		this.chart = chart;
+	}
+	createOffscreenCanvas(param){
+		if(!this.children) {
+			this.com.isOffscreenCanvas = true
+			this.com.offscreenWidth = param.width||300
+			this.com.offscreenHeight = param.height||300
+			const com = this.com
+			const canvasId = this.com.offscreenCanvasId
+			const context = uni.createCanvasContext(canvasId, this.com)
+			this._initStyle(context)
+			this.children = new OffscreenCanvas(context, com, canvasId)
+		} 
+		return this.children
+	}
+	appendChild(child) {
+		console.log('child', child)
+	}
+	dispatchEvent(type, e) {
+		if(typeof type == 'object') {
+			this._ee.emit(type.type, type);
+		} else {
+			this._ee.emit(type, e);
+		}
+		return true
+	}
+	attachEvent() {
+	}
+	detachEvent() {
+	}
+	addEventListener(type, listener) {
+		this._ee.on(type, listener)
+	}
+	removeEventListener(type, listener) {
+		this._ee.off(type, listener)
+	}
+	_initCanvas(zrender, ctx) {
+		// zrender.util.getContext = function() {
+		// 	return ctx;
+		// };
+		// zrender.util.$override('measureText', function(text, font) {
+		// 	ctx.font = font || '12px sans-serif';
+		// 	return ctx.measureText(text, font);
+		// });
+	}
+	_initStyle(ctx, child) {
+		const styles = [
+			'fillStyle',
+			'strokeStyle',
+			'fontSize',
+			'globalAlpha',
+			'opacity',
+			'textAlign',
+			'textBaseline',
+			'shadow',
+			'lineWidth',
+			'lineCap',
+			'lineJoin',
+			'lineDash',
+			'miterLimit',
+			// #ifdef H5
+			'font',
+			// #endif
+		];
+		const colorReg = /#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])\b/g;
+		styles.forEach(style => {
+			Object.defineProperty(ctx, style, {
+				set: value => {
+					// #ifdef H5
+					if (style === 'font' && fontSizeReg.test(value)) {
+						const match = fontSizeReg.exec(value);
+						ctx.setFontSize(match[1]);
+						return;
+					}
+					// #endif
+					
+					if (style === 'opacity') {
+						ctx.setGlobalAlpha(value)
+						return;
+					}
+					if (style !== 'fillStyle' && style !== 'strokeStyle' || value !== 'none' && value !== null) {
+						// #ifdef H5 || APP-PLUS || MP-BAIDU
+						if(typeof value == 'object') {
+							if (value.hasOwnProperty('colorStop') || value.hasOwnProperty('colors')) {
+								ctx['set' + style.charAt(0).toUpperCase() + style.slice(1)](value);
+							}
+							return
+						} 
+						// #endif
+						// #ifdef MP-TOUTIAO
+						if(colorReg.test(value)) {
+							value = value.replace(colorReg, '#$1$1$2$2$3$3')
+						}
+						// #endif
+						ctx['set' + style.charAt(0).toUpperCase() + style.slice(1)](value);
+					}
+				}
+			});
+		});
+		if(!this.isNew && !child) {
+			ctx.uniDrawImage = ctx.drawImage
+			ctx.drawImage = (...a) => {
+				a[0] = a[0].src
+				ctx.uniDrawImage(...a)
+			}
+		}
+		if(!ctx.createRadialGradient) {
+			ctx.createRadialGradient = function() {
+				return ctx.createCircularGradient(...[...arguments].slice(-3))
+			};
+		}
+		// 字节不支持
+		if (!ctx.strokeText) {
+			ctx.strokeText = (...a) => {
+				ctx.fillText(...a)
+			}
+		}
+		
+		// 钉钉不支持 , 鸿蒙是异步
+		if (!ctx.measureText || uni.getSystemInfoSync().osName == 'harmonyos') {
+			ctx._measureText = ctx.measureText
+			const strLen = (str) => {
+				let len = 0;
+				for (let i = 0; i < str.length; i++) {
+					if (str.charCodeAt(i) > 0 && str.charCodeAt(i) < 128) {
+						len++;
+					} else {
+						len += 2;
+					}
+				}
+				return len;
+			}
+			ctx.measureText = (text, font) => {
+				let fontSize = ctx?.state?.fontSize || 12;
+				if (font) {
+					fontSize = parseInt(font.match(/([\d\.]+)px/)[1])
+				}
+				fontSize /= 2;
+				let isBold = fontSize >= 16;
+				const widthFactor = isBold ? 1.3 : 1;
+				// ctx._measureText(text, (res) => {})
+				return {
+					width: strLen(text) * fontSize * widthFactor
+				};
+			}
+		}
+	}
+
+	_initEvent(e) {
+		this.event = {};
+		const eventNames = [{
+			wxName: 'touchStart',
+			ecName: 'mousedown'
+		}, {
+			wxName: 'touchMove',
+			ecName: 'mousemove'
+		}, {
+			wxName: 'touchEnd',
+			ecName: 'mouseup'
+		}, {
+			wxName: 'touchEnd',
+			ecName: 'click'
+		}];
+
+		eventNames.forEach(name => {
+			this.event[name.wxName] = e => {
+				const touch = e.touches[0];
+				this.chart.getZr().handler.dispatch(name.ecName, {
+					zrX: name.wxName === 'tap' ? touch.clientX : touch.x,
+					zrY: name.wxName === 'tap' ? touch.clientY : touch.y
+				});
+			};
+		});
+	}
+
+	set width(w) {
+		this.canvasNode.width = w
+	}
+	set height(h) {
+		this.canvasNode.height = h
+	}
+
+	get width() {
+		return this.canvasNode.width || 0
+	}
+	get height() {
+		return this.canvasNode.height || 0
+	}
+	get ctx() {
+		return cacheChart[this.canvasId]['ctx'] || null
+	}
+	set chart(chart) {
+		cacheChart[this.canvasId]['chart'] = chart
+	}
+	get chart() {
+		return cacheChart[this.canvasId]['chart'] || null
+	}
+}
+
+export function dispatch(name, {x,y, wheelDelta}) {
+	this.dispatch(name, {
+		zrX: x,
+		zrY: y,
+		zrDelta: wheelDelta,
+		preventDefault: () => {},
+		stopPropagation: () =>{}
+	});
+}
+export function setCanvasCreator(echarts, {canvas, node}) {
+	// echarts.setCanvasCreator(() => canvas);
+	if(echarts && !echarts.registerPreprocessor) {
+		return console.warn('echarts 版本不对或未传入echarts,vue3请使用esm格式')
+	}
+	echarts.registerPreprocessor(option => {
+		if (option && option.series) {
+			if (option.series.length > 0) {
+				option.series.forEach(series => {
+					series.progressive = 0;
+				});
+			} else if (typeof option.series === 'object') {
+				option.series.progressive = 0;
+			}
+		}
+	});
+	function loadImage(src, onload, onerror) {
+		let img = null
+		if(node && node.createImage) {
+			img = node.createImage()
+			img.onload = onload.bind(img);
+			img.onerror = onerror.bind(img);
+			img.src = src;
+			return img
+		} else {
+			img = new Image()
+			img.onload = onload.bind(img)
+			img.onerror = onerror.bind(img);
+			img.src = src
+			return img
+		}
+	}
+	if(echarts.setPlatformAPI) {
+		echarts.setPlatformAPI({
+			loadImage: canvas.setChart ? loadImage : null,
+			createCanvas(){
+				const key = 'createOffscreenCanvas'
+				return uni.canIUse(key) && uni[key] ? uni[key]({type: '2d'}) : canvas
+			}
+		})
+	}
+}

+ 252 - 0
components/l-echart/l-echart.uvue

@@ -0,0 +1,252 @@
+<template>
+	<!-- #ifdef APP -->
+	<web-view class="lime-echart" ref="chartRef" @load="loaded" :style="[customStyle]" 
+		:webview-styles="[webviewStyles]" src="/uni_modules/lime-echart/static/uvue.html?v=10112">
+	</web-view>
+	<!-- #endif -->
+	<!-- #ifdef H5 -->
+	<div class="lime-echart" ref="chartRef"></div>
+	<!-- #endif -->
+</template>
+
+<script lang="uts" setup>
+	// @ts-nocheck
+	import { Echarts } from './uvue';
+	type EchartsResolve = (value : Echarts) => void
+	defineOptions({
+		name: 'l-echart'
+	})
+	const emits = defineEmits(['finished'])
+	const props = defineProps({
+		// #ifdef APP
+		webviewStyles: {
+			type: Object
+		},
+		customStyle: {
+			type: Object
+		},
+		// #endif
+		// #ifndef APP
+		webviewStyles: {
+			type: Object
+		},
+		customStyle: {
+			type: [String, Object]
+		},
+		// #endif
+		isDisableScroll: {
+			type: Boolean,
+			default: false
+		},
+		isClickable: {
+			type: Boolean,
+			default: true
+		},
+		enableHover: {
+			type: Boolean,
+			default: false
+		},
+		beforeDelay: {
+			type: Number,
+			default: 30
+		}
+	})
+
+	const finished = ref(false)
+	const map = [] as EchartsResolve[]
+	const callbackMap = [] as EchartsResolve[]
+	// let context = null as UniWebViewElement | null
+	let chart = null as Echarts | null
+	let chartRef = ref<UniWebViewElement | null>(null)
+	
+	const trigger = () => {
+		// #ifdef APP
+		if (finished.value) {
+			if (chart == null) {
+				chart = new Echarts(chartRef.value!)
+			}
+			while (map.length > 0) {
+				const resolve = map.pop() as EchartsResolve
+				resolve(chart!)
+			}
+		}
+		// #endif
+		// #ifdef H5
+		while (map.length > 0) {
+			if(chart != null){
+				const resolve = map.pop() as EchartsResolve
+				resolve(chart!)
+			}
+		}
+		// #endif
+		
+		if(chart != null){
+			while(callbackMap.length > 0){
+				const callback = callbackMap.pop() as EchartsResolve
+				callback(chart!)
+			}
+		}
+	}
+	
+	// #ifdef APP
+	const loaded = (event : UniWebViewLoadEvent) => {
+		event.stopPropagation()
+		event.preventDefault()
+		finished.value = true
+		trigger()
+		emits('finished')
+	}
+	// #endif
+	
+	
+	const _next = () : boolean => {
+		if (chart == null) {
+			console.warn(`组件还未初始化,请先使用 init`)
+			return true
+		}
+		return false
+	}
+	const setOption = (option : UTSJSONObject) => {
+		if (_next()) return
+		chart!.setOption(option);
+	}
+	const showLoading = () => {
+		if (_next()) return
+		chart!.showLoading();
+	}
+	const hideLoading = () => {
+		if (_next()) return
+		chart!.hideLoading();
+	}
+	const clear = () => {
+		if (_next()) return
+		chart!.clear();
+	}
+	const dispose = () => {
+		if (_next()) return
+		chart!.dispose();
+	}
+	const resize = (size : UTSJSONObject) => {
+		if (_next()) return
+		chart!.resize(size);
+	}
+	const canvasToTempFilePath = (opt : UTSJSONObject) => {
+		if (_next()) return
+		chart!.canvasToTempFilePath(opt);
+	}
+	// function init() : Promise<Echarts> {
+	// 	return new Promise((resolve) => {
+	// 		map.push(resolve)
+	// 		trigger()
+	// 	})
+	// }
+	// #ifdef APP
+	function init(callback : ((chart : Echarts) => void) | null) : Promise<Echarts> {
+		// if (chart !== null && callback != null) {
+		// 	callback(chart!)
+		// } else {
+		// 	console.warn('echarts 未加载完成,您可以延时一下')
+		// }
+		if(callback!=null){
+			callbackMap.push(callback)
+		}
+		return new Promise<Echarts>((resolve) => {
+			map.push(resolve)
+			trigger()
+		})
+	}
+	// #endif
+	// #ifdef H5
+	const touchstart = (e) => {
+		if(chart == null) return
+		const handler = chart.getZr().handler;
+		const rect = chart.getZr().dom.getBoundingClientRect()
+		handler.dispatch('mousedown', {
+			zrX: e.touches[0].clientX - rect.left,
+			zrY: e.touches[0].clientY - rect.top
+		})
+		handler.dispatch('click', {
+			zrX: e.touches[0].clientX - rect.left,
+			zrY: e.touches[0].clientY - rect.top
+		})
+	}
+	const touchmove = (e) => {
+		if(chart == null) return
+		const handler = chart.getZr().handler;
+		const rect = chart.getZr().dom.getBoundingClientRect()
+		handler.dispatch('mousemove', {
+			zrX: e.touches[0].clientX - rect.left,
+			zrY: e.touches[0].clientY - rect.top
+		})
+	}
+	const mouseup = (e) => {
+		if(chart == null) return
+		const handler = chart.getZr().handler;
+		handler.dispatch('mousemove', {
+			zrX: 999999999,
+			zrY: 999999999
+		})
+		handler.dispatch('mouseup', {
+			zrX: 999999999,
+			zrY: 999999999
+		})
+	}
+	function init(echarts: any, ...args: any[]): Promise<Echarts>{
+		if(echarts == null){
+			console.error('请确保已经引入了 ECharts 库');
+			return Promise.reject('请确保已经引入了 ECharts 库');
+		}
+		let theme:string|null=null
+		let opts={}
+		let callback:Function|null=null;
+		
+		args.forEach(item =>{
+			if(typeof item === 'function') {
+				callback = item
+			} else if(['string'].includes(typeof item)){
+				theme = item
+			} else if(typeof item === 'object'){
+				opts = item
+			}
+		})
+		chart = echarts.init(chartRef.value, theme, opts)
+		window.addEventListener('touchstart', touchstart)
+		window.addEventListener('touchmove', touchmove)
+		window.addEventListener('touchend', mouseup)
+		
+		if(callback!=null && typeof callback == 'function'){
+			callbackMap.push(callback)
+		}
+		return new Promise<Echarts>((resolve) => {
+			map.push(resolve)
+			trigger()
+		})
+	}
+	onMounted(()=>{
+		finished.value = true
+		trigger()
+		emits('finished')
+	})
+	onUnmounted(()=>{
+		window.removeEventListener('touchstart', touchstart)
+		window.removeEventListener('touchmove', touchmove)
+		window.removeEventListener('touchend', mouseup)
+	})
+	// #endif
+	
+	defineExpose({
+		init,
+		setOption,
+		showLoading,
+		hideLoading,
+		clear,
+		dispose,
+		resize,
+		canvasToTempFilePath
+	})
+</script>
+<style lang="scss">
+	.lime-echart {
+		flex: 1;
+	}
+</style>

+ 516 - 0
components/l-echart/l-echart.vue

@@ -0,0 +1,516 @@
+<template>
+	<view class="lime-echart" :style="customStyle" v-if="canvasId" ref="limeEchart" :aria-label="ariaLabel">
+		<!-- #ifndef APP-NVUE -->
+		<canvas
+			class="lime-echart__canvas"
+			v-if="use2dCanvas"
+			type="2d"
+			:id="canvasId"
+			:style="canvasStyle"
+			:disable-scroll="isDisableScroll"
+			@touchstart="touchStart"
+			@touchmove="touchMove"
+			@touchend="touchEnd"
+		/>
+		<canvas
+			class="lime-echart__canvas"
+			v-else
+			:width="nodeWidth"
+			:height="nodeHeight"
+			:style="canvasStyle"
+			:canvas-id="canvasId"
+			:id="canvasId"
+			:disable-scroll="isDisableScroll"
+			@touchstart="touchStart"
+			@touchmove="touchMove"
+			@touchend="touchEnd"
+		/>
+		<view class="lime-echart__mask"
+			v-if="isPC"
+			@mousedown="touchStart"
+			@mousemove="touchMove"
+			@mouseup="touchEnd"
+			@touchstart="touchStart"
+			@touchmove="touchMove"
+			@touchend="touchEnd">
+		</view>
+		<canvas v-if="isOffscreenCanvas" :style="offscreenStyle" :canvas-id="offscreenCanvasId"></canvas>
+		<!-- #endif -->
+		<!-- #ifdef APP-NVUE -->
+		<web-view
+			class="lime-echart__canvas"
+			:id="canvasId"
+			:style="canvasStyle"
+			:webview-styles="webviewStyles"
+			ref="webview"
+			src="/uni_modules/lime-echart/static/uvue.html?v=1"
+			@pagefinish="finished = true"
+			@onPostMessage="onMessage"
+		></web-view>
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+// #ifndef APP-NVUE
+import {Canvas, setCanvasCreator, dispatch} from './canvas';
+import {wrapTouch, convertTouchesToArray, devicePixelRatio ,sleep, canIUseCanvas2d, getRect} from './utils';
+// #endif
+// #ifdef APP-NVUE
+import { base64ToPath, sleep } from './utils';
+import {Echarts} from './nvue'
+// #endif
+const charts = {}
+const echartsObj = {}
+
+
+/**
+ * LimeChart 图表
+ * @description 全端兼容的eCharts
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=4899
+
+ * @property {String} customStyle 自定义样式
+ * @property {String} type 指定 canvas 类型
+ * @value 2d 使用canvas 2d,部分小程序支持
+ * @value '' 使用原生canvas,会有层级问题
+ * @value bottom right	不缩放图片,只显示图片的右下边区域
+ * @property {Boolean} isDisableScroll	 
+ * @property {number} beforeDelay = [30]  延迟初始化 (毫秒)
+ * @property {Boolean} enableHover PC端使用鼠标悬浮
+
+ * @event {Function} finished 加载完成触发
+ */
+export default {
+	name: 'lime-echart',
+	props: {
+		// #ifdef MP-WEIXIN || MP-TOUTIAO
+		type: {
+			type: String,
+			default: '2d'
+		},
+		// #endif
+		// #ifdef APP-NVUE
+		webviewStyles: Object,
+		// hybrid: Boolean,
+		// #endif
+		customStyle: String,
+		isDisableScroll: Boolean,
+		isClickable: {
+			type: Boolean,
+			default: true
+		},
+		enableHover: Boolean,
+		beforeDelay: {
+			type: Number,
+			default: 30
+		}
+	},
+	data() {
+		return {
+			// #ifdef MP-WEIXIN || MP-TOUTIAO || MP-ALIPAY
+			use2dCanvas: true,
+			// #endif
+			// #ifndef MP-WEIXIN || MP-TOUTIAO || MP-ALIPAY
+			use2dCanvas: false,
+			// #endif
+			ariaLabel: '图表',
+			width: null,
+			height: null,
+			nodeWidth: null,
+			nodeHeight: null,
+			// canvasNode: null,
+			config: {},
+			inited: false,
+			finished: false,
+			file: '',
+			platform: '',
+			isPC: false,
+			isDown: false,
+			isOffscreenCanvas: false,
+			offscreenWidth: 0,
+			offscreenHeight: 0
+		};
+	},
+	computed: {
+		canvasId() {
+			return `lime-echart${this._ && this._.uid || this._uid}`
+		},
+		offscreenCanvasId() {
+			return `${this.canvasId}_offscreen`
+		},
+		offscreenStyle() {
+			return `width:${this.offscreenWidth}px;height: ${this.offscreenHeight}px; position: fixed; left: 99999px; background: red`
+		},
+		canvasStyle() {
+			return  this.width && this.height ? ('width:' + this.width + 'px;height:' + this.height + 'px') : ''
+		}
+	},
+	// #ifndef VUE3
+	beforeDestroy() {
+		this.clear()
+		this.dispose()
+		// #ifdef H5
+		if(this.isPC) {
+			document.removeEventListener('mousewheel', this.mousewheel)
+		}
+		// #endif
+	},
+	// #endif
+	// #ifdef VUE3
+	beforeUnmount() {
+		this.clear()
+		this.dispose()
+		// #ifdef H5
+		if(this.isPC) {
+			document.removeEventListener('mousewheel', this.mousewheel)
+		}
+		// #endif
+	},
+	// #endif
+	created() {
+		// #ifdef H5
+		if(!('ontouchstart' in window)) {
+			this.isPC = true
+			document.addEventListener('mousewheel', this.mousewheel)
+		}
+		// #endif
+		// #ifdef MP-WEIXIN || MP-TOUTIAO || MP-ALIPAY
+		const { platform } = uni.getSystemInfoSync();
+		this.isPC = /windows/i.test(platform)
+		// #endif
+		this.use2dCanvas = this.type === '2d' && canIUseCanvas2d()
+	},
+	mounted() {
+		this.$nextTick(() => {
+			this.$emit('finished')
+		})
+	},
+	methods: {
+		// #ifdef APP-NVUE
+		onMessage(e) {
+			const detail = e?.detail?.data[0] || null;
+			const data = detail?.data
+			const key = detail?.event
+			const options = data?.options
+			const event = data?.event
+			const file = detail?.file
+			if (key == 'log' && data) {
+				console.log(data)
+			}
+			if(event) {
+				this.chart.dispatchAction(event.replace(/"/g,''), options)
+			}
+			if(file) {
+				thie.file = file
+			}
+		},
+		// #endif
+		setChart(callback) {
+			if(!this.chart) {
+				console.warn(`组件还未初始化,请先使用 init`)
+				return
+			}
+			if(typeof callback === 'function' && this.chart) {
+				callback(this.chart);
+			}
+			// #ifdef APP-NVUE
+			if(typeof callback === 'function') {
+				this.$refs.webview.evalJs(`setChart(${JSON.stringify(callback.toString())}, ${JSON.stringify(this.chart.options)})`);
+			}
+			// #endif
+		},
+		setOption() {
+			if (!this.chart || !this.chart.setOption) {
+				console.warn(`组件还未初始化,请先使用 init`)
+				return
+			}
+			this.chart.setOption(...arguments);
+		},
+		showLoading() {
+			if(this.chart) {
+				this.chart.showLoading(...arguments)
+			}
+		},
+		hideLoading() {
+			if(this.chart) {
+				this.chart.hideLoading()
+			}
+		},
+		clear() {
+			if(this.chart) {
+				this.chart.clear()
+			}
+		},
+		dispose() {
+			if(this.chart) {
+				this.chart.dispose()
+			}
+		},
+		resize(size) {
+			if(size && size.width && size.height) {
+				this.height = size.height
+				this.width = size.width
+				if(this.chart) {this.chart.resize(size)}
+			} else {
+				this.$nextTick(() => {
+					uni.createSelectorQuery()
+						.in(this)
+						.select(`.lime-echart`)
+						.boundingClientRect()
+						.exec(res => {
+							if (res) {
+								let { width, height } = res[0];
+								this.width = width = width || 300;
+								this.height = height = height || 300;
+								this.chart.resize({width, height})
+							}
+						});
+				})
+				
+			}
+			
+		},
+		canvasToTempFilePath(args = {}) {
+			// #ifndef APP-NVUE
+			const { use2dCanvas, canvasId } = this;
+			return new Promise((resolve, reject) => {
+				const copyArgs = Object.assign({
+					canvasId,
+					success: resolve,
+					fail: reject
+				}, args);
+				if (use2dCanvas) {
+					delete copyArgs.canvasId;
+					copyArgs.canvas = this.canvasNode;
+				}
+				uni.canvasToTempFilePath(copyArgs, this);
+			});
+			// #endif
+			// #ifdef APP-NVUE
+			this.file = ''
+			this.$refs.webview.evalJs(`canvasToTempFilePath()`);
+			return new Promise((resolve, reject) => {
+				this.$watch('file', async (file) => {
+					if(file) {
+						const tempFilePath = await base64ToPath(file)
+						resolve(args.success({tempFilePath}))
+					} else {
+						reject(args.fail({error: ``}))
+					}
+				})
+			})
+			// #endif
+		},
+		async init(echarts, ...args) {
+			// #ifndef APP-NVUE
+			if(args && args.length == 0 && !echarts) {
+				console.error('缺少参数:init(echarts, theme?:string, opts?: object, callback?: function)')
+				return
+			}
+			// #endif
+			let theme=null,opts={},callback;
+			
+			Array.from(arguments).forEach(item => {
+				if(typeof item === 'function') {
+					callback = item
+				}
+				if(['string'].includes(typeof item)) {
+					theme = item
+				}
+				if(typeof item === 'object') {
+					opts = item
+				}
+			})
+			
+			if(this.beforeDelay) {
+				await sleep(this.beforeDelay)
+			}
+			let config = await this.getContext();
+			console.log(config,'config');
+			// #ifndef APP-NVUE
+			setCanvasCreator(echarts, config)
+			try {
+				console.log(typeof callback,'callback');
+				this.chart = echarts.init(config.canvas, theme, Object.assign({}, config, opts))
+				if(typeof callback === 'function') {
+					callback(this.chart)
+				} else {
+					return this.chart
+				}
+			} catch(e) {
+				console.error(e,'e')
+				return null
+			}
+			// #endif
+			// #ifdef APP-NVUE
+			this.chart = new Echarts(this.$refs.webview)
+			this.$refs.webview.evalJs(`init(null, null, ${JSON.stringify(opts)}, ${theme})`)
+			if(callback) {
+				callback(this.chart)
+			} else {
+				return this.chart
+			}
+			// #endif
+		},
+		getContext() {
+			// #ifdef APP-NVUE
+			if(this.finished) {
+				return Promise.resolve(this.finished)
+			}
+			return new Promise(resolve => {
+				this.$watch('finished', (val) => {
+					if(val) {
+						resolve(this.finished)
+					}
+				})
+			})
+			// #endif
+			// #ifndef APP-NVUE
+			return getRect(`#${this.canvasId}`, {context: this, type: this.use2dCanvas ? 'fields': 'boundingClientRect'}).then(res => {
+				if(res) {
+					let dpr = devicePixelRatio
+					let {width, height, node} = res
+					let canvas;
+					this.width = width = width || 300;
+					this.height = height = height || 300;
+					if(node) {
+						const ctx = node.getContext('2d');
+						canvas = new Canvas(ctx, this, true, node);
+						this.canvasNode = node
+					} else {
+						// #ifdef MP-TOUTIAO
+						dpr = !this.isPC ? devicePixelRatio : 1// 1.25
+						// #endif
+						// #ifndef MP-ALIPAY || MP-TOUTIAO
+						dpr = this.isPC ? devicePixelRatio : 1
+						// #endif
+						// #ifdef MP-ALIPAY || MP-LARK
+						dpr = devicePixelRatio
+						// #endif
+						// #ifdef WEB
+						dpr = 1
+						// #endif
+						this.rect = res
+						this.nodeWidth = width * dpr;
+						this.nodeHeight = height * dpr;
+						const ctx = uni.createCanvasContext(this.canvasId, this);
+						canvas =  new Canvas(ctx, this, false);
+					}
+					return { canvas, width, height, devicePixelRatio: dpr, node };
+				} else {
+					return {}
+				}
+			})
+			// #endif
+		},
+		// #ifndef APP-NVUE
+		getRelative(e, touches) {
+			let { clientX, clientY } = e
+			if(!(clientX && clientY) && touches && touches[0]) {
+				clientX = touches[0].clientX
+				clientY = touches[0].clientY
+			}
+			return {x: clientX - this.rect.left, y: clientY - this.rect.top, wheelDelta: e.wheelDelta || 0}
+		},
+		getTouch(e, touches) {
+			const {x} = touches && touches[0] || {}
+			return x ? touches[0] : this.getRelative(e, touches);
+		},
+		touchStart(e) {
+			this.isDown = true
+			const next = () => {
+				const touches = convertTouchesToArray(e.touches)
+				if(this.chart) {
+					const touch = this.getTouch(e, touches)
+					this.startX = touch.x
+					this.startY = touch.y
+					this.startT = new Date()
+					const handler = this.chart.getZr().handler;
+					dispatch.call(handler, 'mousedown', touch)
+					dispatch.call(handler, 'mousemove', touch)
+					handler.processGesture(wrapTouch(e), 'start');
+					clearTimeout(this.endTimer);
+				}
+				
+			}
+			if(this.isPC) {
+				getRect(`#${this.canvasId}`, {context: this}).then(res => {
+					this.rect = res
+					next()
+				})
+				return
+			}
+			next()
+		},
+		touchMove(e) {
+			if(this.isPC && this.enableHover && !this.isDown) {this.isDown = true}
+			const touches = convertTouchesToArray(e.touches)
+			if (this.chart && this.isDown) {
+				const handler = this.chart.getZr().handler;
+				dispatch.call(handler, 'mousemove', this.getTouch(e, touches))
+				handler.processGesture(wrapTouch(e), 'change');
+			}
+			
+		},
+		touchEnd(e) {
+			this.isDown = false
+			if (this.chart) {
+				const touches = convertTouchesToArray(e.changedTouches)
+				const {x} = touches && touches[0] || {}
+				const touch = (x ? touches[0] : this.getRelative(e, touches)) || {};
+				const handler = this.chart.getZr().handler;
+				const isClick = Math.abs(touch.x - this.startX) < 10 && new Date() - this.startT < 200;
+				dispatch.call(handler, 'mouseup', touch)
+				handler.processGesture(wrapTouch(e), 'end');
+				if(isClick) {
+					dispatch.call(handler, 'click', touch)
+				} else {
+					this.endTimer = setTimeout(() => {
+						dispatch.call(handler, 'mousemove', {x: 999999999,y: 999999999});
+						dispatch.call(handler, 'mouseup', {x: 999999999,y: 999999999});
+					},50)
+				}
+			}
+		},
+		// #endif
+		// #ifdef H5
+		mousewheel(e){
+			if(this.chart) {
+				dispatch.call(this.chart.getZr().handler, 'mousewheel', this.getTouch(e))
+			}
+		}
+		// #endif
+	}
+};
+</script>
+<style>	
+.lime-echart {
+	position: relative;
+	/* #ifndef APP-NVUE */
+	width: 100%;
+	height: 100%;
+	/* #endif */
+	/* #ifdef APP-NVUE */
+	flex: 1;
+	/* #endif */
+}
+.lime-echart__canvas {
+	/* #ifndef APP-NVUE */
+	width: 100%;
+	height: 100%;
+	/* #endif */
+	/* #ifdef APP-NVUE */
+	flex: 1;
+	/* #endif */
+}
+/* #ifndef APP-NVUE */
+.lime-echart__mask {
+	position: absolute;
+	width: 100%;
+	height: 100%;
+	left: 0;
+	top: 0;
+	z-index: 1;
+}
+/* #endif */
+</style>

+ 51 - 0
components/l-echart/nvue.js

@@ -0,0 +1,51 @@
+export class Echarts {
+	eventMap = new Map()
+	constructor(webview) {
+		this.webview = webview
+		this.options = null
+	}
+	setOption() {
+		this.options = arguments
+		this.webview.evalJs(`setOption(${JSON.stringify(arguments)})`);
+	}
+	getOption() {
+		return this.options
+	}
+	showLoading() {
+		this.webview.evalJs(`showLoading(${JSON.stringify(arguments)})`);
+	}
+	hideLoading() {
+		this.webview.evalJs(`hideLoading()`);
+	}
+	clear() {
+		this.webview.evalJs(`clear()`);
+	}
+	dispose() {
+		this.webview.evalJs(`dispose()`);
+	}
+	resize(size) {
+		if(size) {
+			this.webview.evalJs(`resize(${JSON.stringify(size)})`);
+		} else {
+			this.webview.evalJs(`resize()`);
+		}
+	}
+	on(type, ...args) {
+		const query = args[0]
+		const useQuery = query && typeof query != 'function'
+		const param = useQuery ? [type, query] : [type]
+		const key = `${type}${useQuery ? JSON.stringify(query): '' }`
+		const callback = useQuery ? args[1]: args[0]
+		if(typeof callback == 'function'){
+			this.eventMap.set(key, callback)
+		}
+		this.webview.evalJs(`on(${JSON.stringify(param)})`);
+		console.warn('nvue 暂不支持事件')
+	}
+	dispatchAction(type, options){
+		const handler = this.eventMap.get(type)
+		if(handler){
+			handler(options)
+		}
+	}
+}

+ 145 - 0
components/l-echart/utils.js

@@ -0,0 +1,145 @@
+// #ifndef APP-NVUE
+// 计算版本
+export function compareVersion(v1, v2) {
+	v1 = v1.split('.')
+	v2 = v2.split('.')
+	const len = Math.max(v1.length, v2.length)
+	while (v1.length < len) {
+		v1.push('0')
+	}
+	while (v2.length < len) {
+		v2.push('0')
+	}
+	for (let i = 0; i < len; i++) {
+		const num1 = parseInt(v1[i], 10)
+		const num2 = parseInt(v2[i], 10)
+
+		if (num1 > num2) {
+			return 1
+		} else if (num1 < num2) {
+			return -1
+		}
+	}
+	return 0
+}
+const systemInfo = uni.getSystemInfoSync();
+
+function gte(version) {
+	// 截止 2023-03-22 mac pc小程序不支持 canvas 2d
+	let {
+		SDKVersion,
+		platform
+	} = systemInfo;
+	// #ifdef MP-ALIPAY
+	SDKVersion = my.SDKVersion
+	// #endif
+	// #ifdef MP-WEIXIN
+	return platform !== 'mac' && compareVersion(SDKVersion, version) >= 0;
+	// #endif
+	return compareVersion(SDKVersion, version) >= 0;
+}
+
+
+export function canIUseCanvas2d() {
+	// #ifdef MP-WEIXIN
+	return gte('2.9.0');
+	// #endif
+	// #ifdef MP-ALIPAY
+	return gte('2.7.0');
+	// #endif
+	// #ifdef MP-TOUTIAO
+	return gte('1.78.0');
+	// #endif
+	return false
+}
+
+export function convertTouchesToArray(touches) {
+	// 如果 touches 是一个数组,则直接返回它
+	if (Array.isArray(touches)) {
+		return touches;
+	}
+	// 如果touches是一个对象,则转换为数组
+	if (typeof touches === 'object' && touches !== null) {
+		return Object.values(touches);
+	}
+	// 对于其他类型,直接返回它
+	return touches;
+}
+
+export function wrapTouch(event) {
+	for (let i = 0; i < event.touches.length; ++i) {
+		const touch = event.touches[i];
+		touch.offsetX = touch.x;
+		touch.offsetY = touch.y;
+	}
+	return event;
+}
+export const devicePixelRatio = uni.getSystemInfoSync().pixelRatio
+// #endif
+// #ifdef APP-NVUE
+export function base64ToPath(base64) {
+	return new Promise((resolve, reject) => {
+		const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64) || [];
+		const bitmap = new plus.nativeObj.Bitmap('bitmap' + Date.now())
+		bitmap.loadBase64Data(base64, () => {
+			if (!format) {
+				reject(new Error('ERROR_BASE64SRC_PARSE'))
+			}
+			const time = new Date().getTime();
+			const filePath = `_doc/uniapp_temp/${time}.${format}`
+
+			bitmap.save(filePath, {},
+				() => {
+					bitmap.clear()
+					resolve(filePath)
+				},
+				(error) => {
+					bitmap.clear()
+					console.error(`${JSON.stringify(error)}`)
+					reject(error)
+				})
+		}, (error) => {
+			bitmap.clear()
+			console.error(`${JSON.stringify(error)}`)
+			reject(error)
+		})
+	})
+}
+// #endif
+
+
+export function sleep(time) {
+	return new Promise((resolve) => {
+		setTimeout(() => {
+			resolve(true)
+		}, time)
+	})
+}
+
+
+export function getRect(selector, options = {}) {
+	const typeDefault = 'boundingClientRect'
+	const {
+		context,
+		type = typeDefault
+	} = options
+	return new Promise((resolve, reject) => {
+		const dom = uni.createSelectorQuery().in(context).select(selector);
+		const result = (rect) => {
+			if (rect) {
+				resolve(rect)
+			} else {
+				reject()
+			}
+		}
+		if (type == typeDefault) {
+			dom[type](result).exec()
+		} else {
+			dom[type]({
+				node: true,
+				size: true,
+				rect: true
+			}, result).exec()
+		}
+	});
+};

+ 133 - 0
components/l-echart/uvue.uts

@@ -0,0 +1,133 @@
+// @ts-nocheck
+// #ifdef APP
+type EchartsEventHandler = (event: UTSJSONObject)=>void
+// type EchartsTempResolve = (obj : UTSJSONObject) => void
+// type EchartsTempOptions = UTSJSONObject
+export class Echarts {
+	options: UTSJSONObject = {} as UTSJSONObject
+	context: UniWebViewElement
+	eventMap: Map<string, EchartsEventHandler> = new Map()
+	private temp: UTSJSONObject[] = []
+	constructor(context: UniWebViewElement){
+		this.context = context
+		this.init()
+	}
+	init(){
+		this.context.evalJS(`init(null, null, ${JSON.stringify({})})`)
+		
+		this.context.addEventListener('message', (e : UniWebViewMessageEvent) => {
+			// event.stopPropagation()
+			// event.preventDefault()
+			
+			const detail = e.detail.data[0]
+			const file = detail.getString('file')
+			const data = detail.get('data')
+			const key = detail.getString('event')
+			const options = typeof data == 'object' ? (data as UTSJSONObject).getJSON('options'): null
+			const event = typeof data == 'object' ? (data as UTSJSONObject).getString('event'): null
+			if (key == 'log' && data != null) {
+				console.log(data)
+			}
+			if (event != null && options != null) {
+				this.dispatchAction(event.replace(/"/g,''), options)
+			}
+			if(file != null){
+				while (this.temp.length > 0) {
+					const opt = this.temp.pop()
+					const success = opt?.get('success')
+					if(typeof success == 'function'){
+						success as (res: UTSJSONObject) => void
+						success({tempFilePath: file})
+					}
+				}
+			}
+			
+		})
+	}
+	setOption(option: UTSJSONObject){
+		this.options = option;
+		this.context.evalJS(`setOption(${JSON.stringify([option])})`)
+	}
+	setOption(option: UTSJSONObject, notMerge: boolean = false, lazyUpdate: boolean = false){
+		this.options = option;
+		this.context.evalJS(`setOption(${JSON.stringify([option, notMerge, lazyUpdate])})`)
+	}
+	setOption(option: UTSJSONObject, notMerge: UTSJSONObject){
+		this.options = option;
+		this.context.evalJS(`setOption(${JSON.stringify([option, notMerge])})`)
+	}
+	getOption(): UTSJSONObject {
+		return this.options
+	}
+	showLoading(){
+		this.context.evalJS(`showLoading(${JSON.stringify([] as any[])})`);
+	}
+	showLoading(type: string, opts: UTSJSONObject){
+		this.context.evalJS(`showLoading(${JSON.stringify([type, opts])})`);
+	}
+	hideLoading(){
+		this.context.evalJS(`hideLoading()`);
+	}
+	clear(){
+		this.context.evalJS(`clear()`);
+	}
+	dispose(){
+		this.context.evalJS(`dispose()`);
+	}
+	resize(size:UTSJSONObject){
+		setTimeout(()=>{
+			this.context.evalJS(`resize(${JSON.stringify(size)})`);
+		},0)
+	}
+	resize(){
+		setTimeout(()=>{
+			this.context.evalJS(`resize()`);
+		},10)
+		
+	}
+	on(type:string, query: any, callback: EchartsEventHandler) {
+		const key = `${type}${JSON.stringify(query)}`
+		if(typeof callback == 'function'){
+			this.eventMap.set(key, callback)
+		}
+		this.context.evalJS(`on(${JSON.stringify([type, query])})`);
+		console.warn('uvue 暂不支持事件')
+	}
+	on(type:string, callback: EchartsEventHandler) {
+		const key = `${type}`
+		if(typeof callback == 'function'){
+			this.eventMap.set(key, callback)
+		}
+		this.context.evalJS(`on(${JSON.stringify([type])})`);
+		console.warn('uvue 暂不支持事件')
+	}
+	dispatchAction(type:string, options: UTSJSONObject){
+		const handler = this.eventMap.get(type)
+		if(handler!=null){
+			handler(options)
+		}
+	}
+	canvasToTempFilePath(opt: UTSJSONObject){
+		// this.context.evalJS(`on(${JSON.stringify(opt)})`);
+		this.context.evalJS(`canvasToTempFilePath(${JSON.stringify(opt)})`);
+		this.temp.push(opt)
+	}
+}
+
+// #endif
+// #ifndef APP
+export class Echarts {
+	constructor() {}
+	setOption(option: UTSJSONObject): void
+	isDisposed(): boolean;
+	clear(): void;
+	resize(size:UTSJSONObject): void;
+	resize(): void;
+	canvasToTempFilePath(opt : UTSJSONObject): void;
+	dispose(): void;
+	showLoading(cfg?: UTSJSONObject): void;
+	showLoading(name?: string, cfg?: UTSJSONObject): void;
+	hideLoading(): void;
+	getZr(): any
+}
+// #endif

+ 159 - 0
components/lime-echart/lime-echart.nvue

@@ -0,0 +1,159 @@
+<template>
+	<view style="width: 100%; height: 408px;">
+		<l-echart ref="chartRef" @finished="init"></l-echart>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				showTip: false,
+				option: {
+					tooltip: {
+						trigger: 'axis',
+						// shadowBlur: 0,
+						textStyle: {
+							textShadowBlur: 0
+						},
+						renderMode: 'richText',
+					},
+					legend: {
+						data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
+					},
+					grid: {
+						left: '3%',
+						right: '4%',
+						bottom: '3%',
+						containLabel: true
+					},
+					xAxis: {
+						type: 'category',
+						boundaryGap: false,
+						data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
+					},
+					yAxis: {
+						type: 'value'
+					},
+					series: [
+						{
+							name: '邮件营销',
+							type: 'line',
+							stack: '总量',
+							data: [120, 132, 101, 134, 90, 230, 210]
+						},
+						{
+							name: '联盟广告',
+							type: 'line',
+							stack: '总量',
+							data: [220, 182, 191, 234, 290, 330, 310]
+						},
+						{
+							name: '视频广告',
+							type: 'line',
+							stack: '总量',
+							data: [150, 232, 201, 154, 190, 330, 410]
+						},
+						{
+							name: '直接访问',
+							type: 'line',
+							stack: '总量',
+							data: [320, 332, 301, 334, 390, 330, 320]
+						},
+						{
+							name: '搜索引擎',
+							type: 'line',
+							stack: '总量',
+							data: [820, 932, 901, 934, 1290, 1330, 1320]
+						}
+					]
+				}
+			}
+		},
+		mounted() {
+			console.log('lime echarts nvue')
+		},
+		methods: {
+			init() {
+				const chartRef = this.$refs['chartRef']
+				chartRef.init(chart => {
+					chart.setOption(this.option);
+					
+					
+					setTimeout(()=>{
+						const option = {
+							tooltip: {
+								trigger: 'axis',
+								// shadowBlur: 0,
+								textStyle: {
+									textShadowBlur: 0
+								},
+								renderMode: 'richText',
+							},
+							legend: {
+								data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
+							},
+							grid: {
+								left: '3%',
+								right: '4%',
+								bottom: '3%',
+								containLabel: true
+							},
+							xAxis: {
+								type: 'category',
+								boundaryGap: false,
+								data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
+							},
+							yAxis: {
+								type: 'value'
+							},
+							series: [
+								{
+									name: '邮件营销',
+									type: 'line',
+									stack: '总量',
+									data: [120, 132, 101, 134, 90, 230, 210]
+								},
+								{
+									name: '联盟广告',
+									type: 'line',
+									stack: '总量',
+									data: [220, 182, 191, 234, 290, 330, 310]
+								},
+								{
+									name: '视频广告',
+									type: 'line',
+									stack: '总量',
+									data: [150, 232, 201, 154, 190, 330, 410]
+								},
+								{
+									name: '直接访问',
+									type: 'line',
+									stack: '总量',
+									data: [320, 332, 301, 334, 390, 330, 320]
+								},
+								{
+									name: '搜索引擎',
+									type: 'line',
+									stack: '总量',
+									data: [820, 932, 901, 934, 1290, 1330, 1320]
+								}
+							]
+						}
+						chart.setOption(option);
+					},1000)
+				})
+			},
+			save() {
+				// this.$refs.chart.canvasToTempFilePath({
+				// 	success(res) {
+				// 		console.log('res::::', res)
+				// 	}
+				// })
+			}
+		}
+	}
+</script>
+<style>
+
+</style>

+ 160 - 0
components/lime-echart/lime-echart.uvue

@@ -0,0 +1,160 @@
+<template>
+	<view style="width: 100%; height: 408px;background-color: aqua;">
+		<l-echart ref="chartRef" @finished="init"></l-echart>
+	</view>
+</template>
+
+<script lang="uts" setup>
+	// @ts-nocheck
+	// #ifdef H5
+	import * as echarts from 'echarts/dist/echarts.esm.js'
+	// #endif
+	const chartRef = ref<LEchartComponentPublicInstance|null>(null)
+	const option = {
+		tooltip: {
+			trigger: 'axis',
+			// shadowBlur: 0,
+			textStyle: {
+				textShadowBlur: 0
+			},
+			renderMode: 'richText',
+		},
+		// formatter: async (params: any) => {
+		// 	console.log('params', params)
+		// 	return 1
+		// },
+		legend: {
+			data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
+		},
+		grid: {
+			left: '3%',
+			right: '4%',
+			bottom: '3%',
+			containLabel: true
+		},
+		xAxis: {
+			type: 'category',
+			boundaryGap: false,
+			data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
+		},
+		yAxis: {
+			type: 'value'
+		},
+		series: [
+			{
+				name: '邮件营销',
+				type: 'line',
+				stack: '总量',
+				data: [120, 132, 101, 134, 90, 230, 210]
+			},
+			{
+				name: '联盟广告',
+				type: 'line',
+				stack: '总量',
+				data: [220, 182, 191, 234, 290, 330, 310]
+			},
+			{
+				name: '视频广告',
+				type: 'line',
+				stack: '总量',
+				data: [150, 232, 201, 154, 190, 330, 410]
+			},
+			{
+				name: '直接访问',
+				type: 'line',
+				stack: '总量',
+				data: [320, 332, 301, 334, 390, 330, 320]
+			},
+			{
+				name: '搜索引擎',
+				type: 'line',
+				stack: '总量',
+				data: [820, 932, 901, 934, 1290, 1330, 1320]
+			}
+		]
+	}
+
+	const init = async () =>{
+		if(chartRef.value== null) return
+		// #ifdef APP
+		const chart = await chartRef.value!.init(null)
+		// #endif
+		// #ifdef H5
+		const chart = await chartRef.value!.init(echarts, null)
+		// #endif
+		chart.setOption(option)
+		chart.on('mouseover', function (params) {
+		    console.log('params', params);
+		});
+		
+		
+		// setTimeout(()=> {
+		// 	const option1 = {
+		// 		tooltip: {
+		// 			trigger: 'axis',
+		// 			// shadowBlur: 0,
+		// 			textStyle: {
+		// 				textShadowBlur: 0
+		// 			},
+		// 			renderMode: 'richText',
+		// 		},
+		// 		legend: {
+		// 			data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
+		// 		},
+		// 		grid: {
+		// 			left: '3%',
+		// 			right: '4%',
+		// 			bottom: '3%',
+		// 			containLabel: true
+		// 		},
+		// 		xAxis: {
+		// 			type: 'category',
+		// 			boundaryGap: false,
+		// 			data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
+		// 		},
+		// 		yAxis: {
+		// 			type: 'value'
+		// 		},
+		// 		series: [
+		// 			{
+		// 				name: '邮件营销',
+		// 				type: 'line',
+		// 				stack: '总量',
+		// 				data: [820, 132, 101, 134, 90, 230, 210]
+		// 			},
+		// 			{
+		// 				name: '联盟广告',
+		// 				type: 'line',
+		// 				stack: '总量',
+		// 				data: [220, 182, 191, 234, 290, 330, 310]
+		// 			},
+		// 			{
+		// 				name: '视频广告',
+		// 				type: 'line',
+		// 				stack: '总量',
+		// 				data: [950, 232, 201, 154, 190, 330, 410]
+		// 			},
+		// 			{
+		// 				name: '直接访问',
+		// 				type: 'line',
+		// 				stack: '总量',
+		// 				data: [320, 332, 301, 334, 390, 330, 320]
+		// 			},
+		// 			{
+		// 				name: '搜索引擎',
+		// 				type: 'line',
+		// 				stack: '总量',
+		// 				data: [820, 932, 901, 934, 1290, 1330, 1320]
+		// 			}
+		// 		]
+		// 	}
+		// 	chart.setOption(option1)
+		// },1000)
+	}
+	
+	
+	
+</script>
+<style>
+
+</style>

+ 226 - 0
components/lime-echart/lime-echart.vue

@@ -0,0 +1,226 @@
+<template>
+	<view >
+		<view style="height: 750rpx; position: relative">
+			<l-echart ref="chart" @finished="init"></l-echart>
+			<view class="customTooltips" :style="{left: position[0] + 'px',top: position[1] + 'px'}" v-if="params.length && position.length && showTip">
+				<view>这是个自定的tooltips</view>
+				<view>{{params[0]['axisValue']}}</view>
+				<view v-for="item in params">
+					<view>
+						<text>{{item.seriesName}}</text>
+						<text>{{item.value}}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>		
+</template>
+
+<script>
+	// nvue 不需要引入
+	// #ifdef VUE2
+	import * as echarts from '@/uni_modules/lime-echart/static/echarts.min';
+	// #endif
+	// #ifdef VUE3
+	// #ifdef MP
+	// 由于vue3 使用vite 不支持umd格式的包,小程序依然可以使用,但需要使用require
+	const echarts = require('../../static/echarts.min');
+	// #endif
+	// #ifndef MP
+	// 由于 vue3 使用vite 不支持umd格式的包,故引入npm的包
+	import * as echarts from 'echarts/dist/echarts.esm';
+	// #endif
+	// #endif
+	export default {
+		data() {
+			return {
+				showTip: false,
+				position: [],
+				params: [],
+				option:  {
+					tooltip: {
+						trigger: 'axis',
+						// shadowBlur: 0,
+						textStyle: {
+							textShadowBlur : 0
+						},
+						renderMode: 'richText',
+						position: (point, params, dom, rect, size) => {
+							// 假设自定义的tooltips尺寸
+							const box = [170, 170]
+							// 偏移
+							const offsetX = point[0] < size.viewSize[0] / 2 ? 20 : -box[0] - 20;
+							const offsetY = point[1] < size.viewSize[1] / 2 ? 20 : -box[1] - 20;
+							const x = point[0] + offsetX;
+							const y = point[1] + offsetY;
+							
+							this.position = [x, y]
+							this.params = params
+						},
+						formatter: (params, ticket, callback) => {
+							
+						}
+					},
+					legend: {
+						data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
+					},
+					grid: {
+						left: '3%',
+						right: '4%',
+						bottom: '3%',
+						containLabel: true
+					},
+					xAxis: {
+						type: 'category',
+						boundaryGap: false,
+						data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
+					},
+					yAxis: {
+						type: 'value'
+					},
+					series: [
+						{
+							name: '邮件营销',
+							type: 'line',
+							stack: '总量',
+							data: [120, 132, 101, 134, 90, 230, 210]
+						},
+						{
+							name: '联盟广告',
+							type: 'line',
+							stack: '总量',
+							data: [220, 182, 191, 234, 290, 330, 310]
+						},
+						{
+							name: '视频广告',
+							type: 'line',
+							stack: '总量',
+							data: [150, 232, 201, 154, 190, 330, 410]
+						},
+						{
+							name: '直接访问',
+							type: 'line',
+							stack: '总量',
+							data: [320, 332, 301, 334, 390, 330, 320]
+						},
+						{
+							name: '搜索引擎',
+							type: 'line',
+							stack: '总量',
+							data: [820, 932, 901, 934, 1290, 1330, 1320]
+						}
+					]
+				}
+			}
+		},
+		
+		methods: {
+			init() {
+				// init(echarts, theme?:string, opts?:{}, chart => {})
+				// echarts 必填, 非nvue必填,nvue不用填
+				// theme 可选,应用的主题,目前只支持名称,如:'dark'
+				// opts = { // 可选
+				//	locale?: string  // 从 `5.0.0` 开始支持
+				// }
+				// chart => {} , callback 返回图表实例
+				// setTimeout(()=>{
+				// 	this.$refs.chart.init(echarts, chart => {
+				// 		chart.setOption(this.option);
+				// 	});
+				// },300)
+				this.$refs.chart.init(echarts, chart => {
+					chart.setOption(this.option);
+					
+					// 监听tooltip显示事件
+					chart.on('showTip', (params) => {
+					  this.showTip = true
+					  console.log('showTip::')
+					});
+					chart.on('hideTip', (params) => {
+						setTimeout(() => {
+							 this.showTip = false
+						},300)
+					});
+					
+					setTimeout(()=>{
+						const option = {
+							tooltip: {
+								trigger: 'axis',
+								// shadowBlur: 0,
+								textStyle: {
+									textShadowBlur: 0
+								},
+								renderMode: 'richText',
+							},
+							legend: {
+								data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
+							},
+							grid: {
+								left: '3%',
+								right: '4%',
+								bottom: '3%',
+								containLabel: true
+							},
+							xAxis: {
+								type: 'category',
+								boundaryGap: false,
+								data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
+							},
+							yAxis: {
+								type: 'value'
+							},
+							series: [
+								{
+									name: '邮件营销',
+									type: 'line',
+									stack: '总量',
+									data: [1120, 132, 101, 134, 90, 230, 210]
+								},
+								{
+									name: '联盟广告',
+									type: 'line',
+									stack: '总量',
+									data: [220, 182, 191, 234, 290, 330, 310]
+								},
+								{
+									name: '视频广告',
+									type: 'line',
+									stack: '总量',
+									data: [150, 632, 201, 154, 190, 330, 410]
+								},
+								{
+									name: '直接访问',
+									type: 'line',
+									stack: '总量',
+									data: [820, 332, 301, 334, 390, 330, 320]
+								},
+								{
+									name: '搜索引擎',
+									type: 'line',
+									stack: '总量',
+									data: [820, 932, 901, 934, 1290, 1330, 1320]
+								}
+							]
+						}
+						chart.setOption(option);
+					},1000)
+					
+				});
+			},
+			save() {
+				this.$refs.chart.canvasToTempFilePath({
+					success(res) {
+						console.log('res::::', res)
+					}
+				})
+			}
+		}
+	}
+</script>
+<style>
+	.customTooltips {
+		position: absolute;
+		background-color: rgba(255, 255, 255, 0.8);
+		padding: 20rpx;
+	}
+</style>

+ 2 - 0
main.js

@@ -33,6 +33,8 @@ Vue.mixin(pageCommon);
 //全局注册组件
 import uHeader from '@/components/common/uHeader'
 Vue.component('uHeader',uHeader);
+import cusEcharts from '@/components/cusEcharts/index'
+Vue.component('cusEcharts',cusEcharts);
 
 // #endif
 

+ 13 - 0
node_modules/.package-lock.json

@@ -495,6 +495,14 @@
         "url": "https://github.com/sponsors/mesqueeb"
       }
     },
+    "node_modules/echarts": {
+      "version": "4.9.0",
+      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-4.9.0.tgz",
+      "integrity": "sha512-+ugizgtJ+KmsJyyDPxaw2Br5FqzuBnyOWwcxPKO6y0gc5caYcfnEUIlNStx02necw8jmKmTafmpHhGo4XDtEIA==",
+      "dependencies": {
+        "zrender": "4.3.2"
+      }
+    },
     "node_modules/electron-to-chromium": {
       "version": "1.5.12",
       "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.12.tgz",
@@ -1414,6 +1422,11 @@
       "engines": {
         "node": ">=10.13.0"
       }
+    },
+    "node_modules/zrender": {
+      "version": "4.3.2",
+      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-4.3.2.tgz",
+      "integrity": "sha512-bIusJLS8c4DkIcdiK+s13HiQ/zjQQVgpNohtd8d94Y2DnJqgM1yjh/jpDb8DoL6hd7r8Awagw8e3qK/oLaWr3g=="
     }
   }
 }

BIN
node_modules/echarts/.DS_Store


+ 38 - 0
node_modules/echarts/.editorconfig

@@ -0,0 +1,38 @@
+root = true
+
+[*]
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[**.js]
+indent_style = space
+indent_size = 4
+
+[**.css]
+indent_style = space
+indent_size = 4
+
+[**.less]
+indent_style = space
+indent_size = 4
+
+[**.styl]
+indent_style = space
+indent_size = 4
+
+[**.html]
+indent_style = space
+indent_size = 4
+
+[**.tpl]
+indent_style = space
+indent_size = 4
+
+[**.json]
+indent_style = space
+indent_size = 4
+
+[*.md]
+trim_trailing_whitespace = false

+ 2 - 0
node_modules/echarts/.eslintignore

@@ -0,0 +1,2 @@
+/dist
+/node_modules

+ 3 - 0
node_modules/echarts/.gitattributes

@@ -0,0 +1,3 @@
+# for pull request size bot
+# excludes all files from test directory
+test/** linguist-generated=true

+ 10 - 0
node_modules/echarts/.github/ISSUE_TEMPLATE.md

@@ -0,0 +1,10 @@
+<!--
+Please Use https://ecomfe.github.io/echarts-issue-helper to create the issue.
+Otherwise, it will be closed immediately.
+Questions in the form of *How to use ...* should be at Stack Overflow rather than GitHub issue list.
+
+请注意,所有 issue 必须由 https://ecomfe.github.io/echarts-issue-helper/ 创建,不然将会被直接关闭。建议使用英文提问。
+Issues 中不要问「如何使用 ECharts 实现……功能」的问题,相关问题请到 SegmentFault 或 Stack Overflow 提问,详见上面的链接。
+-->
+
+This issue is not created by [echarts-issue-helper](https://ecomfe.github.io/echarts-issue-helper) and will be soon closed.

+ 66 - 0
node_modules/echarts/.github/pull_request_template.md

@@ -0,0 +1,66 @@
+<!-- Please fill in the following information to help us review your PR more efficiently. -->
+
+## Brief Information
+
+This pull request is in the type of:
+
+- [ ] bug fixing
+- [ ] new feature
+- [ ] others
+
+
+
+### What does this PR do?
+
+<!-- USE ONCE SENTENCE TO DESCRIBE WHAT THIS PR DOES. -->
+
+
+
+### Fixed issues
+
+<!--
+- #xxxx: ...
+-->
+
+
+## Details
+
+### Before: What was the problem?
+
+<!-- DESCRIBE THE BUG OR REQUIREMENT HERE. -->
+
+<!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
+
+
+
+### After: How is it fixed in this PR?
+
+<!-- THE RESULT AFTER FIXING AND A SIMPLE EXPLANATION ABOUT HOW IT IS FIXED. -->
+
+<!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
+
+
+
+## Usage
+
+### Are there any API changes?
+
+- [ ] The API has been changed.
+
+<!-- LIST THE API CHANGES HERE -->
+
+
+
+### Related test cases or examples to use the new APIs
+
+NA.
+
+
+
+## Others
+
+### Merging options
+
+- [ ] Please squash the commits into a single one when merge.
+
+### Other information

+ 60 - 0
node_modules/echarts/.github/stale.yml

@@ -0,0 +1,60 @@
+# Configuration for probot-stale - https://github.com/probot/stale
+
+# Number of days of inactivity before an Issue or Pull Request becomes stale
+daysUntilStale: 730 # two years
+
+# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
+# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
+daysUntilClose: 7
+
+# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
+onlyLabels: []
+
+# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
+exemptLabels:
+  - "maybe-later"
+  - "priority: high"
+
+# Set to true to ignore issues in a project (defaults to false)
+exemptProjects: true
+
+# Set to true to ignore issues in a milestone (defaults to false)
+exemptMilestones: false
+
+# Set to true to ignore issues with an assignee (defaults to false)
+exemptAssignees: false
+
+# Label to use when marking as stale
+staleLabel: stale
+
+# Comment to post when marking as stale. Set to `false` to disable
+markComment: >
+  This issue has been automatically marked as stale because it has not had
+  recent activity. It will be closed if no further activity occurs. Thank you
+  for your contributions.
+
+# Comment to post when removing the stale label.
+unmarkComment: >
+  This issue is marked to be `stale` and is going to be closed within a week. If you think it shouldn't be closed, please leave a comment.
+
+# Comment to post when closing a stale Issue or Pull Request.
+# closeComment: >
+#   Your comment here.
+
+# Limit the number of actions per hour, from 1-30. Default is 30
+limitPerRun: 30
+
+# Limit to only `issues` or `pulls`
+# only: issues
+
+# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
+# pulls:
+#   daysUntilStale: 30
+#   markComment: >
+#     This pull request has been automatically marked as stale because it has not had
+#     recent activity. It will be closed if no further activity occurs. Thank you
+#     for your contributions.
+
+# issues:
+#   exemptLabels:
+#     - confirmed

+ 43 - 0
node_modules/echarts/.github/workflows/nodejs.yml

@@ -0,0 +1,43 @@
+name: Node CI
+
+on:
+  pull_request:
+    types: [opened, synchronize]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+
+    strategy:
+      matrix:
+        node-version: [12.x]
+
+    steps:
+      - uses: actions/checkout@v1
+      - name: Use Node.js ${{ matrix.node-version }}
+        uses: actions/setup-node@v1
+        with:
+          node-version: ${{ matrix.node-version }}
+      - name: npm install
+        run: |
+          npm install
+          npm install -g jshint
+          npm install git+https://github.com/ecomfe/zrender.git
+      - name: build zrender
+        run: |
+          cd node_modules/zrender
+          npm install
+          npm run prepublish
+          cd ../..
+      - name: jshint
+        run: |
+          jshint
+      - name: build release
+        run: |
+          npm run release
+        env:
+          CI: true
+      - name: unit test
+        run: |
+          npm run test

+ 52 - 0
node_modules/echarts/.headerignore

@@ -0,0 +1,52 @@
+# Only support regexp, testing against each relative file path
+# based on the echart base directory. And the pattern should
+# match the relative path completely.
+
+node_modules
+.*\.git
+.*\.github
+.*\.editorconfig
+.*\.gitignore
+.*\.jshintrc
+.*\.jshintrc-dist
+.*\.npmignore
+.*\.ratignore
+.*\.headerignore
+.*\.DS_Store
+.*\.idea
+.*rat\.iml
+__MAC_OS
+.*README.md
+.*MANIFEST\.txt
+DISCLAIMER
+NOTICE
+KEYS
+LICENSE
+LICENSE-.+
+licenses
+map/js
+map/json
+benchmark/dep/*
+test/ut/lib
+test/data$
+test/lib/esl\.js
+test/lib/perlin\.js
+test/lib/countup\.js
+.*jquery\.min\.js
+.*rollup\.browser\.js
+.*configure
+.+\.json
+.+\.map
+.+\.gexf
+.+\.jar
+.+\.bin
+.+\.csv
+.+\.png
+.+\.PNG
+.+\.jpg
+.+\.JPG
+.+\.jpeg
+.+\.JPEG
+.+\.gif
+.+\.GIF
+.+\.class

+ 5 - 0
node_modules/echarts/.huskyrc

@@ -0,0 +1,5 @@
+{
+  "hooks": {
+    "pre-commit": "npm run lint",
+  }
+}

+ 70 - 0
node_modules/echarts/.jshintrc

@@ -0,0 +1,70 @@
+{
+    "bitwise": false,
+    "camelcase": true,
+    "curly": true,
+    "eqeqeq": false,
+    "forin": false,
+    "immed": true,
+    "latedef": false,
+    "newcap": true,
+    "noarg": false,
+    "noempty": true,
+    "nonew": true,
+    "plusplus": false,
+    "quotmark": "single",
+    "regexp": false,
+    "undef": true,
+    "unused": "vars",
+    "strict": false,
+    "trailing": false,
+    "maxparams": 20,
+    "maxdepth": 6,
+    "maxlen": 200,
+
+    "asi": false,
+    "boss": false,
+    "debug": false,
+    "eqnull": true,
+    "esversion": 6,
+    "module": true,
+    "evil": true,
+    "expr": true,
+    "funcscope": false,
+    "globalstrict": false,
+    "iterator": false,
+    "lastsemic": false,
+    "laxbreak": true,
+    "laxcomma": false,
+    "loopfunc": false,
+    "multistr": false,
+    "onecase": false,
+    "proto": false,
+    "regexdash": false,
+    "scripturl": false,
+    "smarttabs": false,
+    "shadow": true,
+    "sub": true,
+    "supernew": false,
+    "validthis": true,
+
+    "browser": true,
+    "couch": false,
+    "devel": true,
+    "dojo": false,
+    "jquery": true,
+    "mootools": false,
+    "node": false,
+    "nonstandard": false,
+    "prototypejs": false,
+    "rhino": false,
+    "wsh": false,
+
+    "nomen": false,
+    "onevar": false,
+    "passfail": false,
+    "white": false,
+
+    "predef": [
+        "global"
+    ]
+}

+ 70 - 0
node_modules/echarts/.jshintrc-dist

@@ -0,0 +1,70 @@
+{
+    "bitwise": false,
+    "camelcase": false,
+    "curly": true,
+    "eqeqeq": false,
+    "forin": false,
+    "immed": true,
+    "latedef": false,
+    "newcap": true,
+    "noarg": false,
+    "noempty": true,
+    "nonew": true,
+    "plusplus": false,
+    "quotmark": "single",
+    "regexp": false,
+    "undef": true,
+    "unused": "vars",
+    "strict": false,
+    "trailing": false,
+    "maxparams": 20,
+    "maxdepth": 6,
+    "maxlen": 200,
+
+    "asi": false,
+    "boss": false,
+    "debug": false,
+    "eqnull": true,
+    "esversion": 3,
+    "module": false,
+    "evil": true,
+    "expr": true,
+    "funcscope": false,
+    "globalstrict": false,
+    "iterator": false,
+    "lastsemic": false,
+    "laxbreak": true,
+    "laxcomma": false,
+    "loopfunc": false,
+    "multistr": false,
+    "onecase": false,
+    "proto": false,
+    "regexdash": false,
+    "scripturl": false,
+    "smarttabs": false,
+    "shadow": true,
+    "sub": true,
+    "supernew": false,
+    "validthis": true,
+
+    "browser": true,
+    "couch": false,
+    "devel": true,
+    "dojo": false,
+    "jquery": true,
+    "mootools": false,
+    "node": false,
+    "nonstandard": false,
+    "prototypejs": false,
+    "rhino": false,
+    "wsh": false,
+
+    "nomen": false,
+    "onevar": false,
+    "passfail": false,
+    "white": false,
+
+    "predef": [
+        "global"
+    ]
+}

+ 72 - 0
node_modules/echarts/CONTRIBUTING.md

@@ -0,0 +1,72 @@
+# Contributing
+
+👍🎉 First off, thanks for taking the time to contribute! 🎉👍
+
+Please check out the [Apache Code of Conduct](https://www.apache.org/foundation/policies/conduct.html) first.
+
+## What can you do for the ECharts community?
+
+Contributions can be made in varied ways:
+
+- Help others in the issues
+    - Help solve problems with the issues
+    - Remind the authors to provide a demo if they are reporting for a bug
+    - Try to reproduce the problem as describe in the issues
+- Make pull requests to fix bugs or implement new features
+- Mend or translate the documents
+- Discuss in the [mailing list](https://echarts.apache.org/en/maillist.html)
+- ...
+
+## Issues
+
+When opening new issues, please use the [echarts issue helper](https://ecomfe.github.io/echarts-issue-helper/), opening issues in any other way will cause our bot to close them automatically.
+
+And before doing so, please search for similar questions in our [issues list](https://github.com/apache/incubator-echarts/issues?utf8=%E2%9C%93&q=is%3Aissue). If you are able to reproduce an issue found in a closed issue, please create a new issue and reference the closed one.
+
+Please read the [documentation](http://echarts.apache.org/option.html) carefully before asking any questions.
+
+Any questions in the form of *how can I use echarts to* or *how to use echarts x feature to* belong in [Stack Overflow](http://stackoverflow.com), issues with questions like that in the issue tracker will be closed.
+
+## Release Milestone Discussion
+
+We will start the discussion about the bugs to fix and features of each release in the [mailing list](https://echarts.apache.org/en/maillist.html). You may subscribe our [mailing list](https://echarts.apache.org/en/maillist.html) to give your valuable advice in the milestone dicussion.
+
+About our release plan, we will release a mior version at the end of every month. Here is some detail.
+
+1. Assume our current stable release is 4.3.0. We will start the discussion of milestone of the release two versions ahead, which is 4.5.0 at the beginning of each month. At this time we should also kickoff the developing of the next release, which is 4.4.0.
+2. Finish 4.4.0 developing at about 22th of this month and start the testing. And the 4.5.0 milestone discussion is frozen and published on the [GitHub](https://github.com/apache/incubator-echarts/milestone/14)
+3. Vote in the mailing list for the 4.4.0 release at the end of this month.
+
+## Pull Requests
+
+Wiki: [How to make a pull request](https://github.com/apache/incubator-echarts/wiki/How-to-make-a-pull-request)
+
+## How to Debug ECharts
+
+Wiki: [How to setup the dev environment](https://github.com/apache/incubator-echarts/wiki/How-to-setup-the-dev-environment)
+
+## Some hints about using code from other authors
+
++ About using some algorithms/formulas or inspired by other's work:
+    + We can be inspired from other people’s work. There is no problem with copying ideas and no problems associated with that so long as the code is entirely yours and you aren’t violating the license of the inspirational work. You can just follow "normal" source code rules.
+    + But when you copy the code, even parts of files, it must remain under the copyright of the original authors.
+    + What's the right thing to do for the public good here? I'll go with:
+        + Be transparent when implementing an existing idea/algorithm.
+        + Reference where that idea/algorithm came from.
+        + Use standard language when doing so (we need to define standard language).
+            + "inspired by", "learned from" and "references to" are vague concepts in copyright.
+        + If any copyrightable expression is copied from the existing idea/algorithm, compare its licensing to our licensing policies and include licensing accordingly.
+    + Check the original discussion about it in: https://lists.apache.org/list.html?legal-discuss@apache.org:lte=36M:echarts
++ About adding the license/header of 3rd-party work:
+    + https://www.apache.org/legal/src-headers.html#3party
++ Licenses that are compatible with the Apache license:
+    + BSD and MIT are compatible with the Apache license but CC_BY_SA is not (https://apache.org/legal/resolved.html#cc-sa).
++ Stack overflow:
+    + before intending to copy code from Stack overlow, we must check:
+    + https://apache.org/legal/resolved.html#stackoverflow
+    + https://issues.apache.org/jira/browse/LEGAL-471
++ Wikipedia:
+    + Wikipedia is licensed CC 4.0 BY_SA and is incompatible with the Apache license. So we should not copy code from Wikipedia.
++ Working in progress disclaimer:
+    + In some cases we might use the work in progress disclaimer and document the issues in that until they are fixed.
+    + https://incubator.apache.org/policy/incubation.html#disclaimers

+ 12 - 0
node_modules/echarts/DISCLAIMER

@@ -0,0 +1,12 @@
+Apache ECharts (incubating) is an effort undergoing incubation at The
+Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC.
+
+Incubation is required of all newly accepted
+projects until a further review indicates that the
+infrastructure, communications, and decision making process have
+stabilized in a manner consistent with other successful ASF
+projects.
+
+While incubation status is not necessarily a reflection
+of the completeness or stability of the code, it does indicate
+that the project has yet to be fully endorsed by the ASF.

+ 134 - 0
node_modules/echarts/KEYS

@@ -0,0 +1,134 @@
+This file contains the PGP keys of various developers.
+Please don't use them for email unless you have to. Their main
+purpose is code signing.
+
+Examples of importing this file in your keystore:
+ gpg --import KEYS.txt
+ (need pgp and other examples here)
+
+Examples of adding your key to this file:
+ pgp -kxa <your name> and append it to this file.
+ (pgpk -ll <your name> && pgpk -xa <your name>) >> this file.
+ (gpg --list-sigs <your name>
+     && gpg --armor --export <your name>) >> this file.
+
+---------------------------------------
+pub   rsa4096 2018-04-23 [SC]
+      9B06D9B4FA37C4DD52725742747985D7E3CEB635
+uid           [ultimate] Su Shuang (CODE SIGNING KEY) <sushuang@apache.org>
+sig 3        747985D7E3CEB635 2018-04-23  Su Shuang (CODE SIGNING KEY) <sushuang@apache.org>
+sub   rsa4096 2018-04-23 [E]
+sig          747985D7E3CEB635 2018-04-23  Su Shuang (CODE SIGNING KEY) <sushuang@apache.org>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQINBFrd5SYBEADoCBw12lsK1sxn3r879jI50GhRAg5vF0aBql0h2BIJ3d+oYYSm
+nIsK/XGpIk3t6ZhJRXK+le89t8a7vBsU+y0+3+OehxOV63du1wscQU9GPu7IfXhw
+V4YcsGK330+V/GiwBs3EX808fdQrdkfCsaGEJhKJbK2fldUcnNp3M1Y2+DVZqGmb
+I7fRJuEj/S9bcVGWnv40jBbMKjx/8LyP2dxZLyy1+whEUimU9em6Tj+SnyISe1I2
+sLa3lwhWer0rkrz0siGFTgDHaDvLlpL9TV34acj/FOon3XKMtx4neNVmkC3QVi0z
+PSlnX6EV8Fas9ylA4x9bdaUo6zUZKO533ASfC6uEibvE2XSRXYJ0xB2bThcQbkdl
+332JqD1TkyF/UQRel3pUm/bCsv2daKD98ZO+eCbvNNonrip2qXDwJJ5HzlXlThyR
+eN1Og90gXvYix4sbsZgNEIyYSaLri7/GjyMD34GCLQiV/kvc/foaC/hkvz6kVOiq
+/tMHY3KsGYAIF4Z9kuTCwJOwFqgfb+Y15bPRDK84uyCiRhtIubNWY7Euy4bBd3ul
+uazQ9LabBhZaa7HCOMssW+TaB+GondZJTiwnI6MCTJKrKtvb8kzcKR4mNf/dvF0O
+x7zwVBeklMKXjkpOtje/+/XOYKuD3g1BZ/+vrfMFPTZ7y7ASC2ylcKI0/QARAQAB
+tDJTdSBTaHVhbmcgKENPREUgU0lHTklORyBLRVkpIDxzdXNodWFuZ0BhcGFjaGUu
+b3JnPokCTgQTAQoAOBYhBJsG2bT6N8TdUnJXQnR5hdfjzrY1BQJa3eUmAhsDBQsJ
+CAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEHR5hdfjzrY13yIP+wS+Mh86IuIK+zG5
+qr/cncV541RxvIGbv5uCQEbFRIwtR8SJEyx2tu4pIgsaTu93hdwxHFCcOZT2IsXP
+meRWPfhaguDFQArdu4VdOfq2AbMqqByFWRsbwvF8CX8fGMPBCsMp0pzqp0px1uUr
+WlK5hBSVwDHWACElyJE7jmk5K+O7RmDUD2E/pgXid+SiU8W+k9vWj49nHAhStYTm
+SwVQA4Gl7jGCJY5jFwZIRD5/b8kVYjbJFl9CBDD2nOIytrGfMVlhp2OcT1f6yZvZ
+oY2nvWLBUF0SmQzlli3EW9zzsNAXDu3f81kqwa+kC2WqQ3s4bKZKQurN5sCWvoyX
+db+AWedArK+m3fH9y3JFIr5Lu1MwfbgfMfm9EZS4A+3DqLFIsLrmnzbGZ9FCkqsj
+TuvKWOP2H365xH44gHImYKZ92PDdLKE7XArVU5b9qtAimgCDsCjEiXTB4S3NVJGX
+R0RZCttKgnrLHwAad3TeLhktWcjH4TdxNCrNZsHLO9mklGyeM1IxKqba4OdHTmYX
+tYYlixSlAu5vSPa+vDkILRfyU87n9YD9RiVGmvy27IP7wdxSClJun6+9fviU2NpG
+FCkLZovYz8/Qht1c8yQZGscw3sa316m1nJz42Lo+p2s6AQZhZupu8bi/W85VHoxa
+roRO16i+mFr4bnbo2/jftB6UVVo7uQINBFrd5SYBEACVsgwBHz5cpBqZQVNS6o0W
+RUnWWNDiBYidNQNTWCF9NDF0HCh6oHecjjXQEPduvMPdzOPpawAkKMRG+7MlHiu/
+ugAq0RluoM3QzDZwvCPw+p/NTESZMqLvbHXEs2u6YCdIsFcTLXr2d+JBWDeGri0S
+YB4gjjQIVvDGqG0tDoW4JmqHHMZiJ6c+h2Rq+saHte0rctHcVAq4p5I8O1iJ1Mkg
+gKJ/TBsjPM5aK6ahPpIPPh48nbhpsLjKHwqB/UWdUcB/HUDa0YfV4JbJilEeeQFZ
+PzlP5SJaGyuEnTnhEwnoXpFetfMYi+Mxnc4VoSrQ3UOsVpD2Ii3haUjdKWTjukyn
+o3sCxvsBTQ8jyBtjjhLw1jfWJdHJ2WCDGVtQVuJ6Gx1GCV0XRbKDTWdIBnCkdKtU
+FY+VMt77oQ/ydeRsZDXhkdgBqqkvdiRHRyEFy72rx61cGTIKuKcWu0rJx8/LnVyi
+nOEk8K8mgNR8omnpFmkkStOtSDLjDb8WeIdigxwJ4wtQnLlLGWiAAVNnDDsqgGIB
+3rrR+/HKUa05CwKI1oIC7i4f7qkgfFUjjr1e496FDSq2tBTLukq/v5FpU6C0JSVq
+MeD5+UuGtSezBxQUdxV7caftIptopwWnx4bBjWSuk2FVCzWcYMnXNIbtfEbqMKuS
+mrpk4mOBNAV6XYzNcOHQqwARAQABiQI2BBgBCgAgFiEEmwbZtPo3xN1ScldCdHmF
+1+POtjUFAlrd5SYCGwwACgkQdHmF1+POtjXK4g//c7vJXmN0FtACspBJVrgsKrYj
+ha4c2PCEynfKSwhVXW3yHnQMwh8/bpQUs5bwCTWx27IEeBrfb03/X9tlx12koGvl
+LujaR7IP6xaqWpbh6rrfttOKGx3xKopJ4nHgNPIYN/ApflAacwyOd+/leWOjHrii
+JXbB60oc7FNvfQRREICLZyeAnzlAcEOVcWvBTngB0EDUZucKwkQtt0x3YvKetgQf
+EMFBAH4RUXG0ms85acX2rpi/kbdarFv6Hc2pzakoWDKNjHMMae1J8wQbPRaXx1NB
++xF362eLXZaxtvKdzs9Q03R46DY9cyQRofG5WNnZapgemEzPgixur8FYK5EPCQkh
+Y2FA0WUbZFIkO7pE7UNS5ZN5fHkkEhAFo4wV0uqWRVBpFrjKeBxtRkIaw7jLCHr5
+3EpkTusjT/529rEYIq9cGOTwf75AbKR1IZFxffEZYOU76y6SH0bINoYp0VxFJ/IR
+zy5CHqvyUQVUed5O/7UzkYx0IVBGk2wSwOtC7+iRptqj+kI9RCjGizhNe4hG3SUq
+1qkUGkQu6+skyXeFCR1PIAbQgleRNUQotsh/rfsfZpQOomBdvDRPT8ZcN5bjUIJ1
+5c4abryWPkun+BgZk+YFtYLbGZVJAUy2OtXRG5uYzeLc5ID+X5XwwtZOO4gSWMTh
+oQH7TsthVKvdZyjtZQg=
+=Uv8d
+-----END PGP PUBLIC KEY BLOCK-----
+
+pub   rsa4096 2019-01-24 [SC]
+      1683FBD23F6DD36C0E52223507D78F777D2C0C27
+uid           [ultimate] Ovilia (CODE SIGNING KEY) <oviliazhang@gmail.com>
+sig 3        07D78F777D2C0C27 2019-01-24  Ovilia (CODE SIGNING KEY) <oviliazhang@gmail.com>
+sub   rsa4096 2019-01-24 [E]
+sig          07D78F777D2C0C27 2019-01-24  Ovilia (CODE SIGNING KEY) <oviliazhang@gmail.com>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQINBFxJWEYBEADYzZRcG+WIllHo8PloMv9pX2QZxmZiVJzM7Prgg8KlWfHnO68/
+7Et//hMA2zexJWweZwM0ffmjvcIIEre23De6KaA2htM/54aPoBweDAOBi34RsdR9
+kpN0RvipvJMMZKGB0tDSB3mLhWaiApDGMsysfJAgTaGsIISrC2+xLO/+HxgoEAIX
+a0BTJ+P3cOLPghBBaRtyKNWJjJ2e4XzlVM0T4bM06QmzC0qWTSufKqk1XAZTSOGU
+LXYESonSu/+kL2TCsKi90THNX69a9SBx3DAohbb5WKjXkYistSQi9S33jqZMIc7n
+I1kG1x39YxZiQwwszwbfa3/+qE3X0Qjp2k3fD7wa+qDnSpHTchqy8d71EN0wU6S/
+9vEiJ2e+gxN6WZetK9wl90P70Iu0rvLqSu+5EdkenvIbh6i4CR+Cer1Sky2z7rEY
+vmEjFNjV2ktvbu83RDofxp4ERSbZOwq8VMOWqj6Ft9mIWfw1OAoSkLCRchYFR1ue
+r+e3FuF01KlCXjTV4t24F7l5QO/bwexnmYuVTlSEo4PVZLJAv/UYSP0ngie5DawL
+z2RDCuRrROgtzcf84SaRxwcPNQ0h6EZlKZ4NFL7nl4rwbDsyZRdBqzQ5JPm6dbGe
+CZXCBA84ivcnK845flcsl7ITNjcfsLbeN9s6FMnYZgOHZh/ucmw2dL+5vQARAQAB
+tDFPdmlsaWEgKENPREUgU0lHTklORyBLRVkpIDxvdmlsaWF6aGFuZ0BnbWFpbC5j
+b20+iQJOBBMBCAA4FiEEFoP70j9t02wOUiI1B9ePd30sDCcFAlxJWEYCGwMFCwkI
+BwIGFQoJCAsCBBYCAwECHgECF4AACgkQB9ePd30sDCcgHA//be3mdnRU+jYCP3VU
+l/pcYnbxoIfAhf1Z2orVcN3/E6v2wDYvbvcV7EX/cqwMXBc0/CEVisGQ3zX5CM4/
+C/vwjAsPNPWsX8iyE/Mui/Ktl9tZqQ3/8hTOHe5RQIn0VQ5wIYmyh3Q42BI4vKK3
+BodV9PwONdRhQVJ15x1fp59wiPTqflcXJ0qdGml3JY4ULLFYh63MBV4as6pg/Qtb
+1enZmw8/Bgg6mhY6HiBI+v+8wAwdatwYuG33JdzhoPVbjsnovqAE+kMvOuxmVbK/
+q5dwdwFULbyHzojNAj7zg1zjtksawP8Uspc02JHr16pW3u48E2/uk6XCkTpFDJ09
+xqwtZyEGSobl/9BaDuidXQ9UDsrOIYuvBXO53vlVv1nwzyF7qUhNRNn1HdzIbEiV
+16CaYT5Soy4Xh5sFTFoIg0g/E8JquSgIEJN/NutqbQOHO4ldMxaDEgFp7dRJ/tqo
+CEJgahC/D16efbIUP2gVScYsJK3VYNjuEfnTu2qiR7XDXosG0zGOMGsr4xCuSx8y
+mwtrqRZdl4wfaHi2/QojJGAXwd1Q9WNBxYKuE31amAo7AxGKZ8QLZ9m0RwitG912
+yP7gsw9k/TA195GJiQ5W1qNTHa4gKXhzFtPqg7s9xhJOkb+GOk6tOCWzts1IJSXa
+oyGerp3bGP4Ho49nipEFjeiUKgW5Ag0EXElYRgEQAMbeZQMWRo9h6RgGm7eLCfz2
+K9Ro9yL0U0Jz8SmNz2I7YoYqg4idPV7D0gBym/502QsalQc427vE4QtJGlNPx8yH
+uXIKD0u9sGadO3wkz3WmPqyVMlAgdzjB9ddoWjeQDYTvJLO1eo4LtVUoSydoOs67
+bBNr9Wi2hIso60+cZGxczI+dTkqvgd+nSrhzG1+N1NPjpGqLUSvjWEZiu4NT1oVd
+4f8C6SpQNkgUbliomLE9Zv8Wkcj8RDU5je+dU8r4fKQy1GtDVGW89QXGKALwTg4F
+4/d+/qbF/ZhfZk3e6dxJV4Slmb+IKWUd5dcEYwXIdYXJuQu84CnEtsnQDsIUCc5V
+Qfk1E4SqEmc0gWsmTlsPKF51VdeDpbqQShGgt+xM65wCL7/JASnuEwr1Jt2pPRDq
+VF9s4APQJi/neuJh1A6RlHU6PFcPXmqjsglMdbfKdc0dzoOcc4OcSFPdAlX935L8
+Tlwrp2dy2ARNTSdCvbXx4Lj+Ru7tIUTjDqIFzRLBdppRU/NO6SpNMoIKkOwrjFYd
+H8nV9z6+nYHfJNR/FfT8LLx7ac/trYwDYWMJhk/h9taOszZ5OpQM4LOrWwyg2HA8
+80H95TcQ0c1/dp5OBfPSNfse75yBJrW0PwtQA3++38PHQQZVhO7J3Ha2Y9/MmLqU
+Ip+rhd38hfkHlkrwCr7tABEBAAGJAjYEGAEIACAWIQQWg/vSP23TbA5SIjUH1493
+fSwMJwUCXElYRgIbDAAKCRAH1493fSwMJ4GVD/9AS8YwflROUAodGe7jBHZ41oye
+4I8AX8iTP1qxww8ydeCBVCz3n3lvEHHP8JfVB0aJwiezUtt/1uV0bTFt9ycxyJS1
+5eIefOVN0wFEsj4pgQfBfSWxI0Yd97m+W1xg5h+aAN9W1MNH6rb1ktHCebW709Vf
+Bs+NfktKww98M134cQlmJSo1pBQEBzKaE5KEvLAiafluAPTkvafZfe+35QQdJAXx
+iLE/ZNJQ8L9lBYZaA5mM/NKNzeEqeSTwfvcIonY5sD2EsgBU/ux6QzjRV5EmteJr
+eg+bCWJnbVvZY/2LVru8NKDgfhTSMN0ocDLaWKW6aQO36TequQNdD09wasdSpQmV
+GoCydtdCVoetGdGm8SZvi6EUgAWH4eI3Su/19V8sVo3kHhJ1d575NJCFwTPvKAre
+s8wgU+7CgTojnMxFmb68p+lLe1qQheyXaa44WQ7d7hmXPIoe3EgMYtMc7tLcKccE
+upu7zWG7BNU97kpUw7nmHKalI/1fKEEAYQUmNm9mNVGKjLVNtuG8jw6Zq0vX1tP9
+mh+T3SMBEnsdzoQ+E31lIDNYTZaEHxt0XupNdjt+uEfASdrD3+8+jlWVkpO3FlZ0
+MhfLdHrk689ty11m+5HlrSU7O1I1wZkt/OlYsZmS1yIpD1hEnOuSjAuqm4D3s+YI
+B4WM8AJSCwl8WlZrRA==
+=wft0
+-----END PGP PUBLIC KEY BLOCK-----

+ 223 - 0
node_modules/echarts/LICENSE

@@ -0,0 +1,223 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+
+
+
+========================================================================
+Apache ECharts Subcomponents:
+
+The Apache ECharts project contains subcomponents with separate copyright
+notices and license terms. Your use of the source code for these
+subcomponents is also subject to the terms and conditions of the following
+licenses.
+
+BSD 3-Clause (d3.js):
+The following files embed [d3.js](https://github.com/d3/d3) BSD 3-Clause:
+    `/src/chart/treemap/treemapLayout.js`,
+    `/src/chart/tree/layoutHelper.js`,
+    `/src/chart/graph/forceHelper.js`,
+    `/src/util/number.js`,
+    `/src/scale/Time.js`,
+See `/licenses/LICENSE-d3` for details of the license.

+ 5 - 0
node_modules/echarts/NOTICE

@@ -0,0 +1,5 @@
+Apache ECharts (incubating)
+Copyright 2017-2020 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).

+ 115 - 0
node_modules/echarts/README.md

@@ -0,0 +1,115 @@
+# ECharts
+
+<a href="https://echarts.apache.org/">
+    <img style="vertical-align: top;" src="./asset/logo.png?raw=true" alt="logo" height="50px">
+</a>
+
+ECharts is a free, powerful charting and visualization library offering an easy way of adding intuitive, interactive, and highly customizable charts to your commercial products. It is written in pure JavaScript and based on <a href="https://github.com/ecomfe/zrender">zrender</a>, which is a whole new lightweight canvas library.
+
+Now ECharts is an incubator project of Apache Software Foundation.
+Please check its incubator status [here](http://incubator.apache.org/projects/echarts.html)
+
+**[中文官网](https://echarts.apache.org/zh/index.html)** | **[ENGLISH HOMEPAGE](https://echarts.apache.org/en/index.html)**
+
+[![Build Status](https://travis-ci.org/apache/incubator-echarts.svg?branch=master)](https://travis-ci.org/apache/incubator-echarts) [![](https://img.shields.io/npm/dw/echarts.svg?label=npm%20downloads&style=flat)](https://www.npmjs.com/package/echarts) [![Last npm release](https://img.shields.io/npm/v/echarts)](https://www.npmjs.com/package/echarts)
+
+## Get ECharts
+
+You may choose one of the following methods:
+
++ Download from Official Website in [中文下载页](https://echarts.apache.org/zh/download.html)
++ Download from Official Website in [English](https://echarts.apache.org/en/download.html)
++ `npm install echarts --save`
++ CDN: [jsDelivr CDN](https://www.jsdelivr.com/package/npm/echarts?path=dist)
+
+## Docs
+
++ Tutorial
+    + [中文](https://echarts.apache.org/zh/tutorial.html)
+    + [English](https://echarts.apache.org/en/tutorial.html)
+
++ API
+    + [中文](https://echarts.apache.org/zh/api.html)
+    + [English](https://echarts.apache.org/en/api.html)
+
++ Option Manual
+    + [中文](https://echarts.apache.org/zh/option.html)
+    + [English](https://echarts.apache.org/en/option.html)
+
+## Get Help
+
++ [GitHub Issues](https://github.com/apache/incubator-echarts/issues) for bug report and feature requests
++ Email [dev@echarts.apache.org](mailto:dev@echarts.apache.org) for general questions
++ Subscribe [mailing list](https://echarts.apache.org/en/maillist.html) to get updated with the project
+
+## Build
+
+Build echarts source code:
+
+Execute the instructions in the root directory of the echarts:
+([Node.js](https://nodejs.org) is required)
+
+```shell
+# Install the dependencies from NPM:
+npm install
+
+# If intending to build and get all types of the "production" files:
+npm run release
+# The same as `node build/build.js --release`
+
+# If only intending to get `dist/echarts.js`, which is usually
+# enough in dev or running the tests:
+npm run build
+# The same as `node build/build.js`
+
+# Get the same "production" files as `node build/build.js`, while
+# watching the editing of the source code. Usually used in dev.
+npm run watch
+# The same as `node build/build.js -w`
+
+# Check the manual:
+npm run help
+# The same as `node build/build.js --help`
+```
+
+Then the "production" files are generated in the `dist` directory.
+
+More custom build approaches can be checked in this tutorial: [Create Custom Build of ECharts](https://echarts.apache.org/en/tutorial.html#Create%20Custom%20Build%20of%20ECharts) please.
+
+## Contribution
+
+If you wish to debug locally or make pull requests, please refer to [contributing](https://github.com/apache/incubator-echarts/blob/master/CONTRIBUTING.md) document.
+
+## Resources
+
+### Awesome ECharts
+
+[https://github.com/ecomfe/awesome-echarts](https://github.com/ecomfe/awesome-echarts)
+
+### Extensions
+
++ [ECharts GL](https://github.com/ecomfe/echarts-gl) An extension pack of ECharts, which provides 3D plots, globe visualization, and WebGL acceleration.
+
++ [Liquidfill 水球图](https://github.com/ecomfe/echarts-liquidfill)
+
++ [Wordcloud 字符云](https://github.com/ecomfe/echarts-wordcloud)
+
++ [Extension for Baidu Map 百度地图扩展](https://github.com/apache/incubator-echarts/tree/master/extension/bmap) An extension provides a wrapper of Baidu Map Service SDK. 
+
++ [vue-echarts](https://github.com/ecomfe/vue-echarts) ECharts component for Vue.js
+
++ [echarts-stat](https://github.com/ecomfe/echarts-stat) Statistics tool for ECharts
+
+## License
+
+ECharts is available under the Apache License V2.
+
+## Code of Conduct
+
+Please refer to [Apache Code of Conduct](https://www.apache.org/foundation/policies/conduct.html).
+
+## Paper
+
+Deqing Li, Honghui Mei, Yi Shen, Shuang Su, Wenli Zhang, Junting Wang, Ming Zu, Wei Chen.
+[ECharts: A Declarative Framework for Rapid Construction of Web-based Visualization](https://www.sciencedirect.com/science/article/pii/S2468502X18300068).
+Visual Informatics, 2018.

BIN
node_modules/echarts/asset/.DS_Store


BIN
node_modules/echarts/asset/contributing-inspect.png


BIN
node_modules/echarts/asset/logo.png


BIN
node_modules/echarts/build/.DS_Store


+ 77 - 0
node_modules/echarts/build/.jshintrc

@@ -0,0 +1,77 @@
+{
+    "bitwise": false,
+    "camelcase": true,
+    "curly": true,
+    "eqeqeq": false,
+    "forin": false,
+    "immed": true,
+    "latedef": false,
+    "newcap": true,
+    "noarg": false,
+    "noempty": true,
+    "nonew": true,
+    "plusplus": false,
+    "quotmark": "single",
+    "regexp": false,
+    "undef": true,
+    "unused": "vars",
+    "strict": false,
+    "trailing": false,
+    "maxparams": 20,
+    "maxdepth": 6,
+    "maxlen": 200,
+
+    "asi": false,
+    "boss": false,
+    "debug": false,
+    "eqnull": true,
+    "esversion": 6,
+    "evil": true,
+    "expr": true,
+    "funcscope": false,
+    "globalstrict": false,
+    "iterator": false,
+    "lastsemic": false,
+    "laxbreak": true,
+    "laxcomma": false,
+    "loopfunc": false,
+    "multistr": false,
+    "onecase": false,
+    "proto": false,
+    "regexdash": false,
+    "scripturl": false,
+    "smarttabs": false,
+    "shadow": true,
+    "sub": true,
+    "supernew": false,
+    "validthis": true,
+
+    "browser": true,
+    "couch": false,
+    "devel": true,
+    "dojo": false,
+    "jquery": true,
+    "mootools": false,
+    "node": false,
+    "nonstandard": false,
+    "prototypejs": false,
+    "rhino": false,
+    "wsh": false,
+
+    "nomen": false,
+    "onevar": false,
+    "passfail": false,
+    "white": false,
+
+    "varstmt": true,
+
+    "predef": [
+        "__DEV__",
+        "global",
+        "require",
+        "exports",
+        "Buffer",
+        "module",
+        "__dirname"
+    ]
+}

+ 183 - 0
node_modules/echarts/build/addHeader.js

@@ -0,0 +1,183 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+
+const fs = require('fs');
+const preamble = require('./preamble');
+const pathTool = require('path');
+const {color} = require('zrender/build/helper');
+
+// In the `.headerignore`, each line is a pattern in RegExp.
+// all relative path (based on the echarts base directory) is tested.
+// The pattern should match the relative path completely.
+const excludesPath = pathTool.join(__dirname, '../.headerignore');
+const ecBasePath = pathTool.join(__dirname, '../');
+
+const isVerbose = process.argv[2] === '--verbose';
+
+// const lists = [
+//     '../src/**/*.js',
+//     '../build/*.js',
+//     '../benchmark/src/*.js',
+//     '../benchmark/src/gulpfile.js',
+//     '../extension-src/**/*.js',
+//     '../extension/**/*.js',
+//     '../map/js/**/*.js',
+//     '../test/build/**/*.js',
+//     '../test/node/**/*.js',
+//     '../test/ut/core/*.js',
+//     '../test/ut/spe/*.js',
+//     '../test/ut/ut.js',
+//     '../test/*.js',
+//     '../theme/*.js',
+//     '../theme/tool/**/*.js',
+//     '../echarts.all.js',
+//     '../echarts.blank.js',
+//     '../echarts.common.js',
+//     '../echarts.simple.js',
+//     '../index.js',
+//     '../index.common.js',
+//     '../index.simple.js'
+// ];
+
+function run() {
+    const updatedFiles = [];
+    const passFiles = [];
+    const pendingFiles = [];
+
+    eachFile(function (absolutePath, fileExt) {
+        const fileStr = fs.readFileSync(absolutePath, 'utf-8');
+
+        const existLicense = preamble.extractLicense(fileStr, fileExt);
+
+        if (existLicense) {
+            passFiles.push(absolutePath);
+            return;
+        }
+
+        // Conside binary files, only add for files with known ext.
+        if (!preamble.hasPreamble(fileExt)) {
+            pendingFiles.push(absolutePath);
+            return;
+        }
+
+        fs.writeFileSync(absolutePath, preamble.addPreamble(fileStr, fileExt), 'utf-8');
+        updatedFiles.push(absolutePath);
+    });
+
+    console.log('\n');
+    console.log('----------------------------');
+    console.log(' Files that exists license: ');
+    console.log('----------------------------');
+    if (passFiles.length) {
+        if (isVerbose) {
+            passFiles.forEach(function (path) {
+                console.log(color('fgGreen', 'dim')(path));
+            });
+        }
+        else {
+            console.log(color('fgGreen', 'dim')(passFiles.length + ' files. (use argument "--verbose" see details)'));
+        }
+    }
+    else {
+        console.log('Nothing.');
+    }
+
+    console.log('\n');
+    console.log('--------------------');
+    console.log(' License added for: ');
+    console.log('--------------------');
+    if (updatedFiles.length) {
+        updatedFiles.forEach(function (path) {
+            console.log(color('fgGreen', 'bright')(path));
+        });
+    }
+    else {
+        console.log('Nothing.');
+    }
+
+    console.log('\n');
+    console.log('----------------');
+    console.log(' Pending files: ');
+    console.log('----------------');
+    if (pendingFiles.length) {
+        pendingFiles.forEach(function (path) {
+            console.log(color('fgRed', 'dim')(path));
+        });
+    }
+    else {
+        console.log('Nothing.');
+    }
+
+    console.log('\nDone.');
+}
+
+function eachFile(visit) {
+
+    const excludePatterns = [];
+    const extReg = /\.([a-zA-Z0-9_-]+)$/;
+
+    prepareExcludePatterns();
+    travel('./');
+
+    function travel(relativePath) {
+        if (isExclude(relativePath)) {
+            return;
+        }
+
+        const absolutePath = pathTool.join(ecBasePath, relativePath);
+        const stat = fs.statSync(absolutePath);
+
+        if (stat.isFile()) {
+            visit(absolutePath, getExt(absolutePath));
+        }
+        else if (stat.isDirectory()) {
+            fs.readdirSync(relativePath).forEach(function (file) {
+                travel(pathTool.join(relativePath, file));
+            });
+        }
+    }
+
+    function prepareExcludePatterns() {
+        const content = fs.readFileSync(excludesPath, {encoding: 'utf-8'});
+        content.replace(/\r/g, '\n').split('\n').forEach(function (line) {
+            line = line.trim();
+            if (line && line.charAt(0) !== '#') {
+                excludePatterns.push(new RegExp(line));
+            }
+        });
+    }
+
+    function isExclude(relativePath) {
+        for (let i = 0; i < excludePatterns.length; i++) {
+            if (excludePatterns[i].test(relativePath)) {
+                return true;
+            }
+        }
+    }
+
+    function getExt(path) {
+        if (path) {
+            const mathResult = path.match(extReg);
+            return mathResult && mathResult[1];
+        }
+    }
+}
+
+run();

+ 182 - 0
node_modules/echarts/build/amd2common.js

@@ -0,0 +1,182 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var glob = require('glob');
+var fsExtra = require('fs-extra');
+var esprima = require('esprima');
+
+function run(cb) {
+    glob('**/*.js', {
+        cwd: __dirname + '/../src/'
+    }, function (err, files) {
+        files.forEach(function (filePath) {
+            var code = parse(fsExtra.readFileSync(
+                __dirname + '/../src/' + filePath, 'utf-8'));
+            code = code.replace(/require\(([\'"])zrender\//g, 'require($1zrender/lib/');
+            fsExtra.outputFileSync(
+                __dirname + '/../lib/' + filePath,
+                code, 'utf-8');
+        });
+
+        cb && cb();
+    });
+}
+
+if (require.main === module) {
+    run();
+}
+else {
+    module.exports = run;
+}
+
+var MAGIC_DEPS = {
+    'exports': true,
+    'module': true,
+    'require': true
+};
+
+var SIMPLIFIED_CJS = ['require', 'exports', 'module'];
+
+// Convert AMD-style JavaScript string into node.js compatible module
+function parse(raw) {
+    var output = '';
+    var ast = esprima.parse(raw, {
+        range: true,
+        raw: true
+    });
+
+    var defines = ast.body.filter(isDefine);
+
+    if (defines.length > 1) {
+        throw new Error('Each file can have only a single define call. Found "' + defines.length + '"');
+    }
+    else if (!defines.length) {
+        return raw;
+    }
+
+    var def = defines[0];
+    var args = def.expression['arguments'];
+    var factory = getFactory(args);
+    var useStrict = getUseStrict(factory);
+
+    // do replacements in-place to avoid modifying the code more than needed
+    if (useStrict) {
+        output += useStrict.expression.raw + ';\n';
+    }
+    output += raw.substring(0, def.range[0]); // anything before define
+    output += getRequires(args, factory); // add requires
+    output += getBody(raw, factory.body, useStrict); // module body
+
+    output += raw.substring(def.range[1], raw.length); // anything after define
+
+    return output;
+}
+
+
+function getRequires(args, factory) {
+    var requires = [];
+    var deps = getDependenciesNames(args);
+    var params = factory.params.map(function (param, i) {
+        return {
+            name: param.name,
+            // simplified cjs doesn't have deps
+            dep: (deps.length) ? deps[i] : SIMPLIFIED_CJS[i]
+        };
+    });
+
+    params.forEach(function (param) {
+        if (MAGIC_DEPS[param.dep] && !MAGIC_DEPS[param.name]) {
+            // if user remaped magic dependency we declare a var
+            requires.push('var ' + param.name + ' = ' + param.dep + ';');
+        }
+        else if (param.dep && !MAGIC_DEPS[param.dep]) {
+            // only do require for params that have a matching dependency also
+            // skip "magic" dependencies
+            requires.push('var ' + param.name + ' = require(\'' + param.dep + '\');');
+        }
+    });
+
+    return requires.join('\n');
+}
+
+
+function getDependenciesNames(args) {
+    var deps = [];
+    var arr = args.filter(function (arg) {
+        return arg.type === 'ArrayExpression';
+    })[0];
+
+    if (arr) {
+        deps = arr.elements.map(function (el) {
+            return el.value;
+        });
+    }
+
+    return deps;
+}
+
+
+function isDefine(node) {
+    return node.type === 'ExpressionStatement'
+            && node.expression.type === 'CallExpression'
+            && node.expression.callee.type === 'Identifier'
+            && node.expression.callee.name === 'define';
+}
+
+
+function getFactory(args) {
+    return args.filter(function (arg) {
+        return arg.type === 'FunctionExpression';
+    })[0];
+}
+
+
+function getBody(raw, factoryBody, useStrict) {
+    var returnStatement = factoryBody.body.filter(function (node) {
+        return node.type === 'ReturnStatement';
+    })[0];
+
+    var body = '';
+    var bodyStart = useStrict ? useStrict.expression.range[1] + 1 : factoryBody.range[0] + 1;
+
+    if (returnStatement) {
+        body += raw.substring(bodyStart, returnStatement.range[0]);
+        // "return ".length === 7 so we add "6" to returnStatement start
+        body += 'module.exports =' + raw.substring(returnStatement.range[0] + 6, factoryBody.range[1] - 1);
+    }
+    else {
+        // if using exports or module.exports or just a private module we
+        // simply return the factoryBody content
+        body = raw.substring(bodyStart, factoryBody.range[1] - 1);
+    }
+
+    return body;
+}
+
+
+function getUseStrict(factory) {
+    return factory.body.body.filter(isUseStrict)[0];
+}
+
+
+function isUseStrict(node) {
+    return node.type === 'ExpressionStatement'
+            && node.expression.type === 'Literal'
+            && node.expression.value === 'use strict';
+}

+ 255 - 0
node_modules/echarts/build/build.js

@@ -0,0 +1,255 @@
+#!/usr/bin/env node
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+const fsExtra = require('fs-extra');
+const fs = require('fs');
+const {resolve} = require('path');
+const config = require('./config.js');
+const commander = require('commander');
+const {build, watch, color} = require('zrender/build/helper');
+const ecLangPlugin = require('./rollup-plugin-ec-lang');
+const prePublish = require('./pre-publish');
+const recheckDEV = require('zrender/build/babel-plugin-transform-remove-dev').recheckDEV;
+
+function run() {
+
+    /**
+     * Tips for `commander`:
+     * (1) If arg xxx not specified, `commander.xxx` is undefined.
+     *     Otherwise:
+     *      If '-x, --xxx', `commander.xxx` can only be true/false, even if '--xxx yyy' input.
+     *      If '-x, --xxx <some>', the 'some' string is required, or otherwise error will be thrown.
+     *      If '-x, --xxx [some]', the 'some' string is optional, that is, `commander.xxx` can be boolean or string.
+     * (2) `node ./build/build.js --help` will print helper info and exit.
+     */
+
+    let descIndent = '                                 ';
+    let egIndent = '    ';
+
+    commander
+        .usage('[options]')
+        .description([
+            'Build echarts and generate result files in directory `echarts/dist`.',
+            '',
+            '  For example:',
+            '',
+            egIndent + 'node build/build.js --release'
+                + '\n' + descIndent + '# Build all to `dist` folder.',
+            egIndent + 'node build/build.js --prepublish'
+                + '\n' + descIndent + '# Only prepublish.',
+            egIndent + 'node build/build.js --removedev'
+                + '\n' + descIndent + '# Remove __DEV__ code. If --min, __DEV__ always be removed.',
+            egIndent + 'node build/build.js --type ""'
+                + '\n' + descIndent + '# Only generate `dist/echarts.js`.',
+            egIndent + 'node build/build.js --type common --min'
+                + '\n' + descIndent + '# Only generate `dist/echarts.common.min.js`.',
+            egIndent + 'node build/build.js --type simple --min --lang en'
+                + '\n' + descIndent + '# Only generate `dist/echarts-en.simple.min.js`.',
+            egIndent + 'node build/build.js --lang "my/lang.js" -i "my/index.js" -o "my/bundle.js"'
+                + '\n' + descIndent + '# Take `<cwd>/my/index.js` as input and generate `<cwd>/my/bundle.js`,'
+                + '\n' + descIndent + 'where `<cwd>/my/lang.js` is used as language file.',
+        ].join('\n'))
+        .option(
+            '-w, --watch', [
+            'Watch modifications of files and auto-compile to dist file. For example,',
+            descIndent + '`echarts/dist/echarts.js`.'
+        ].join('\n'))
+        .option(
+            '--lang <language file path or shortcut>', [
+            'Use the specified file instead of `echarts/src/lang.js`. For example:',
+            descIndent + '`--lang en` will use `echarts/src/langEN.js`.',
+            descIndent + '`--lang my/langDE.js` will use `<cwd>/my/langDE.js`. -o must be specified in this case.',
+            descIndent + '`--lang /my/indexSW.js` will use `/my/indexSW.js`. -o must be specified in this case.'
+        ].join('\n'))
+        .option(
+            '--release',
+            'Build all for release'
+        )
+        .option(
+            '--prepublish',
+            'Build all for release'
+        )
+        .option(
+            '--removedev',
+            'Remove __DEV__ code. If --min, __DEV__ always be removed.'
+        )
+        .option(
+            '--min',
+            'Whether to compress the output file, and remove error-log-print code.'
+        )
+        .option(
+            '--type <type name>', [
+            'Can be "simple" or "common" or "" (default). For example,',
+            descIndent + '`--type ""` or `--type "common"`.'
+        ].join('\n'))
+        .option(
+            '--sourcemap',
+            'Whether output sourcemap.'
+        )
+        .option(
+            '--format <format>',
+            'The format of output bundle. Can be "umd", "amd", "iife", "cjs", "es".'
+        )
+        .option(
+            '-i, --input <input file path>',
+            'If input file path is specified, output file path must be specified too.'
+        )
+        .option(
+            '-o, --output <output file path>',
+            'If output file path is specified, input file path must be specified too.'
+        )
+        .parse(process.argv);
+
+    let isWatch = !!commander.watch;
+    let isRelease = !!commander.release;
+    let isPrePublish = !!commander.prepublish;
+
+    let opt = {
+        lang: commander.lang,
+        min: commander.min,
+        type: commander.type || '',
+        input: commander.input,
+        output: commander.output,
+        format: commander.format,
+        sourcemap: commander.sourcemap,
+        removeDev: commander.removedev,
+        addBundleVersion: isWatch
+    };
+
+    validateIO(opt.input, opt.output);
+    validateLang(opt.lang, opt.output);
+
+    normalizeParams(opt);
+
+    // Clear `echarts/dist`
+    if (isRelease) {
+        fsExtra.removeSync(getPath('./dist'));
+    }
+
+    if (isWatch) {
+        watch(config.createECharts(opt));
+    }
+    else if (isPrePublish) {
+        prePublish();
+    }
+    else if (isRelease) {
+        let configs = [];
+        let configForCheck;
+
+        [
+            {min: false},
+            {min: true},
+            {min: false, lang: 'en'},
+            {min: true, lang: 'en'}
+        ].forEach(function (opt) {
+
+            ['', 'simple', 'common'].forEach(function (type) {
+                let singleOpt = Object.assign({type}, opt);
+                normalizeParams(singleOpt);
+                let singleConfig = config.createECharts(singleOpt);
+                configs.push(singleConfig);
+
+                if (singleOpt.min && singleOpt.type === '') {
+                    configForCheck = singleConfig;
+                }
+            });
+        });
+
+        configs.push(
+            config.createBMap(false),
+            config.createBMap(true),
+            config.createDataTool(false),
+            config.createDataTool(true)
+        );
+
+        build(configs)
+            .then(function () {
+                checkCode(configForCheck);
+                prePublish();
+            }).catch(handleBuildError);
+    }
+    else {
+        let cfg = config.createECharts(opt);
+        build([cfg])
+            .then(function () {
+                if (opt.removeDev) {
+                    checkCode(cfg);
+                }
+            })
+            .catch(handleBuildError);
+    }
+}
+
+function normalizeParams(opt) {
+    if (opt.sourcemap == null) {
+        opt.sourcemap = !(opt.min || opt.type);
+    }
+    if (opt.removeDev == null) {
+        opt.removeDev = !!opt.min;
+    }
+}
+
+function handleBuildError(err) {
+    console.log(err);
+}
+
+function checkCode(singleConfig) {
+    // Make sure __DEV__ is eliminated.
+    let code = fs.readFileSync(singleConfig.output.file, {encoding: 'utf-8'});
+    if (!code) {
+        throw new Error(`${singleConfig.output.file} is empty`);
+    }
+    recheckDEV(code);
+    console.log(color('fgGreen', 'dim')('Check code: correct.'));
+}
+
+function validateIO(input, output) {
+    if ((input != null && output == null)
+        || (input == null && output != null)
+    ) {
+        throw new Error('`input` and `output` must be both set.');
+    }
+}
+
+function validateLang(lang, output) {
+    if (!lang) {
+        return;
+    }
+
+    let langInfo = ecLangPlugin.getLangFileInfo(lang);
+
+    if (langInfo.isOuter && !output) {
+        throw new Error('`-o` or `--output` must be specified if using a file path in `--lang`.');
+    }
+    if (!langInfo.absolutePath || !fs.statSync(langInfo.absolutePath).isFile()) {
+        throw new Error(`File ${langInfo.absolutePath} does not exist yet. Contribution is welcome!`);
+    }
+}
+
+/**
+ * @param {string} relativePath Based on echarts directory.
+ * @return {string} Absolute path.
+ */
+function getPath(relativePath) {
+    return resolve(__dirname, '../', relativePath);
+}
+
+run();

+ 178 - 0
node_modules/echarts/build/config.js

@@ -0,0 +1,178 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+const nodeResolvePlugin = require('rollup-plugin-node-resolve');
+const uglifyPlugin = require('rollup-plugin-uglify');
+const ecRemoveDevPlugin = require('./rollup-plugin-ec-remove-dev');
+const ecLangPlugin = require('./rollup-plugin-ec-lang');
+const {resolve} = require('path');
+const preamble = require('./preamble');
+
+function getPathBasedOnECharts(path) {
+    return resolve(__dirname, '../', path);
+}
+
+function getPlugins({min, lang, sourcemap, removeDev, addBundleVersion}) {
+    let plugins = [];
+
+    removeDev && plugins.push(
+        ecRemoveDevPlugin({sourcemap})
+    );
+
+    lang && plugins.push(
+        ecLangPlugin({lang})
+    );
+
+    plugins.push(
+        nodeResolvePlugin()
+    );
+
+    addBundleVersion && plugins.push({
+        outro: function () {
+            return 'exports.bundleVersion = \'' + (+new Date()) + '\';';
+        }
+    });
+
+    min && plugins.push(uglifyPlugin({
+        compress: {
+            // Eliminate __DEV__ code.
+            // Currently, in uglify:
+            // `var vx; if(vx) {...}` can not be removed.
+            // `if (__DEV__) {...}` can be removed if `__DEV__` is defined as `false` in `global_defs`.
+            // 'global_defs': {
+            //     __DEV__: false
+            // },
+            'dead_code': true
+        },
+        output: {
+            preamble: preamble.js
+        }
+    }));
+
+    return plugins;
+}
+
+/**
+ * @param {Object} [opt]
+ * @param {string} [opt.type=''] '' or 'simple' or 'common'
+ * @param {boolean} [opt.min=false]
+ * @param {string} [opt.lang=undefined] null/undefined/'' or 'en' or 'fi' or a file path.
+ * @param {string} [opt.input=undefined] If set, `opt.output` is required too, and `opt.type` is ignored.
+ * @param {string} [opt.output=undefined] If set, `opt.input` is required too, and `opt.type` is ignored.
+ * @param {boolean} [opt.sourcemap] If set, `opt.input` is required too, and `opt.type` is ignored.
+ * @param {boolean} [opt.removeDev]
+ * @param {string} [opt.format='umd'] If set, `opt.input` is required too, and `opt.type` is ignored.
+ * @param {boolean} [opt.addBundleVersion=false] Only for debug in watch, prompt that the two build is different.
+ */
+exports.createECharts = function (opt = {}) {
+    let min = opt.min;
+    let srcType = opt.type ? '.' + opt.type : '.all';
+    let postfixType = opt.type ? '.' + opt.type : '';
+    let postfixMin = min ? '.min' : '';
+    let postfixLang = opt.lang ? '-' + opt.lang.toLowerCase() : '';
+    let input = opt.input;
+    let output = opt.output;
+    let sourcemap = opt.sourcemap;
+    let format = opt.format || 'umd';
+
+    if (input != null || output != null) {
+        // Based on process.cwd();
+        input = resolve(input);
+        output = resolve(output);
+    }
+    else {
+        input = getPathBasedOnECharts(`./echarts${srcType}.js`);
+        output = getPathBasedOnECharts(`dist/echarts${postfixLang}${postfixType}${postfixMin}.js`);
+    }
+
+    return {
+        plugins: getPlugins(opt),
+        input: input,
+        legacy: true, // Support IE8-
+        output: {
+            name: 'echarts',
+            format: format,
+            sourcemap: sourcemap,
+            legacy: true, // Must be declared both in inputOptions and outputOptions.
+            file: output
+        },
+        watch: {
+            include: [
+                getPathBasedOnECharts('./src/**'),
+                getPathBasedOnECharts('./echarts*.js'),
+                getPathBasedOnECharts('../zrender/src/**')
+            ]
+        }
+    };
+};
+
+/**
+ * @param {boolean} [min=false]
+ */
+exports.createBMap = function (min) {
+    let postfix = min ? '.min' : '';
+
+    return {
+        plugins: getPlugins({min}),
+        input: getPathBasedOnECharts(`./extension-src/bmap/bmap.js`),
+        legacy: true, // Support IE8-
+        external: ['echarts'],
+        output: {
+            name: 'bmap',
+            format: 'umd',
+            sourcemap: !min,
+            legacy: true, // Must be declared both in inputOptions and outputOptions.
+            globals: {
+                // For UMD `global.echarts`
+                echarts: 'echarts'
+            },
+            file: getPathBasedOnECharts(`dist/extension/bmap${postfix}.js`)
+        },
+        watch: {
+            include: [getPathBasedOnECharts('./extension-src/bmap/**')]
+        }
+    };
+};
+
+/**
+ * @param {boolean} [min=false]
+ */
+exports.createDataTool = function (min) {
+    let postfix = min ? '.min' : '';
+    return {
+        plugins: getPlugins({min}),
+        input: getPathBasedOnECharts(`./extension-src/dataTool/index.js`),
+        legacy: true, // Support IE8-
+        external: ['echarts'],
+        output: {
+            name: 'dataTool',
+            format: 'umd',
+            sourcemap: !min,
+            legacy: true, // Must be declared both in inputOptions and outputOptions.
+            globals: {
+                // For UMD `global.echarts`
+                echarts: 'echarts'
+            },
+            file: getPathBasedOnECharts(`dist/extension/dataTool${postfix}.js`)
+        },
+        watch: {
+            include: [getPathBasedOnECharts('./extension-src/dataTool/**')]
+        }
+    };
+};

+ 184 - 0
node_modules/echarts/build/mangleString.js

@@ -0,0 +1,184 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var esprima = require('esprima');
+var escodegen = require('escodegen');
+var estraverse = require('estraverse');
+
+var SYNTAX = estraverse.Syntax;
+
+var STR_MIN_LENGTH = 5;
+var STR_MIN_DIST = 1000;
+var STR_MIN_COUNT = 2;
+
+function createDeclaration(declarations) {
+    return {
+        type: SYNTAX.VariableDeclaration,
+        declarations: declarations,
+        kind: 'var'
+    };
+}
+
+function createDeclarator(id, init) {
+    return {
+        type: SYNTAX.VariableDeclarator,
+        id: {
+            type: SYNTAX.Identifier,
+            name: id
+        },
+        init: {
+            type: SYNTAX.Literal,
+            value: init
+        }
+    };
+}
+
+function base54Digits() {
+    return 'etnrisouaflchpdvmgybwESxTNCkLAOM_DPHBjFIqRUzWXV$JKQGYZ0516372984';
+}
+
+var base54 = (function(){
+    var DIGITS = base54Digits();
+    return function(num) {
+        var ret = '';
+        var base = 54;
+        do {
+            ret += DIGITS.charAt(num % base);
+            num = Math.floor(num / base);
+            base = 64;
+        } while (num > 0);
+        return ret;
+    };
+})();
+
+function mangleString(source) {
+
+    var ast = esprima.parse(source, {
+        loc: true
+    });
+
+    var stringVariables = {};
+
+    var stringRelaceCount = 0;
+
+    estraverse.traverse(ast, {
+        enter: function (node, parent) {
+            if (node.type === SYNTAX.Literal
+                && typeof node.value === 'string'
+            ) {
+                // Ignore if string is the key of property
+                if (parent.type === SYNTAX.Property) {
+                    return;
+                }
+                var value = node.value;
+                if (value.length > STR_MIN_LENGTH) {
+                    if (!stringVariables[value]) {
+                        stringVariables[value] = {
+                            count: 0,
+                            lastLoc: node.loc.start.line,
+                            name: '__echartsString__' + base54(stringRelaceCount++)
+                        };
+                    }
+                    var diff = node.loc.start.line - stringVariables[value].lastLoc;
+                    // GZIP ?
+                    if (diff >= STR_MIN_DIST) {
+                        stringVariables[value].lastLoc = node.loc.start.line;
+                        stringVariables[value].count++;
+                    }
+                }
+            }
+
+            if (node.type === SYNTAX.MemberExpression && !node.computed) {
+                if (node.property.type === SYNTAX.Identifier) {
+                    var value = node.property.name;
+                    if (value.length > STR_MIN_LENGTH) {
+                        if (!stringVariables[value]) {
+                            stringVariables[value] = {
+                                count: 0,
+                                lastLoc: node.loc.start.line,
+                                name: '__echartsString__' + base54(stringRelaceCount++)
+                            };
+                        }
+                        var diff = node.loc.start.line - stringVariables[value].lastLoc;
+                        if (diff >= STR_MIN_DIST) {
+                            stringVariables[value].lastLoc = node.loc.start.line;
+                            stringVariables[value].count++;
+                        }
+                    }
+                }
+            }
+        }
+    });
+
+    estraverse.replace(ast, {
+        enter: function (node, parent) {
+            if ((node.type === SYNTAX.Literal
+                && typeof node.value === 'string')
+            ) {
+                // Ignore if string is the key of property
+                if (parent.type === SYNTAX.Property) {
+                    return;
+                }
+                var str = node.value;
+                if (stringVariables[str] && stringVariables[str].count > STR_MIN_COUNT) {
+                    return {
+                        type: SYNTAX.Identifier,
+                        name: stringVariables[str].name
+                    };
+                }
+            }
+            if (node.type === SYNTAX.MemberExpression && !node.computed) {
+                if (node.property.type === SYNTAX.Identifier) {
+                    var str = node.property.name;
+                    if (stringVariables[str] && stringVariables[str].count > STR_MIN_COUNT) {
+                        return {
+                            type: SYNTAX.MemberExpression,
+                            object: node.object,
+                            property: {
+                                type: SYNTAX.Identifier,
+                                name: stringVariables[str].name
+                            },
+                            computed: true
+                        };
+                    }
+                }
+            }
+        }
+    });
+
+    // Add variables in the top
+    for (var str in stringVariables) {
+        // Used more than once
+        if (stringVariables[str].count > STR_MIN_COUNT) {
+            ast.body.unshift(createDeclaration([
+                createDeclarator(stringVariables[str].name, str)
+            ]));
+        }
+    }
+
+    return escodegen.generate(
+        ast,
+        {
+            format: {escapeless: true},
+            comment: true
+        }
+    );
+}
+
+exports = module.exports = mangleString;

+ 59 - 0
node_modules/echarts/build/optimize.js

@@ -0,0 +1,59 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var UglifyJS = require('uglify-js');
+var fs = require('fs');
+var etpl = require('etpl');
+var argv = require('optimist').argv;
+
+etpl.config({
+    commandOpen: '/**',
+    commandClose: '*/'
+});
+
+var mode = argv.m || 'all';
+var configPath = mode === 'all' ? 'config/echarts.js' : 'config/echarts.' + mode + '.js';
+var outPath = mode === 'all' ? '../dist/echarts.js' : '../dist/echarts.' + mode + '.js';
+
+var config = eval('(' + fs.readFileSync(configPath, 'utf-8') + ')');
+var mainCode = fs.readFileSync(outPath, 'utf-8');
+var startCode = fs.readFileSync('wrap/start.js', 'utf-8');
+var nutCode = fs.readFileSync('wrap/nut.js', 'utf-8');
+var endCode = fs.readFileSync('wrap/end.js', 'utf-8');
+
+endCode = etpl.compile(endCode)({
+    parts: config.include
+});
+
+// FIXME
+var sourceCode = [startCode, nutCode, require('./mangleString')(mainCode), endCode].join('\n');
+
+var ast = UglifyJS.parse(sourceCode);
+/* jshint camelcase: false */
+// compressor needs figure_out_scope too
+ast.figure_out_scope();
+ast = ast.transform(UglifyJS.Compressor( {} ));
+
+// need to figure out scope again so mangler works optimally
+ast.figure_out_scope();
+ast.compute_char_frequency();
+ast.mangle_names();
+
+fs.writeFileSync(outPath, [startCode, nutCode, mainCode, endCode].join('\n'), 'utf-8');
+fs.writeFileSync(outPath.replace('.js', '.min.js'), ast.print_to_string(), 'utf-8');

+ 97 - 0
node_modules/echarts/build/pre-publish.js

@@ -0,0 +1,97 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/**
+ * Compatible with prevoius folder structure: `echarts/lib` exists in `node_modules`
+ * (1) Build all files to CommonJS to `echarts/lib`.
+ * (2) Remove __DEV__.
+ * (3) Mount `echarts/src/export.js` to `echarts/lib/echarts.js`.
+ */
+
+const path = require('path');
+const fsExtra = require('fs-extra');
+const {color, travelSrcDir, prePulishSrc} = require('zrender/build/helper');
+
+const ecDir = path.resolve(__dirname, '..');
+const srcDir = path.resolve(__dirname, '../src');
+const extensionSrcDir = path.resolve(__dirname, '../extension-src');
+const extensionDir = path.resolve(__dirname, '../extension');
+const libDir = path.resolve(__dirname, '../lib');
+const preamble = require('./preamble');
+
+
+module.exports = function () {
+
+    fsExtra.removeSync(libDir);
+    fsExtra.ensureDirSync(libDir);
+
+    travelSrcDir(srcDir, ({fileName, relativePath, absolutePath}) => {
+        prePulishSrc({
+            inputPath: absolutePath,
+            outputPath: path.resolve(libDir, relativePath, fileName),
+            transform: transform,
+            preamble: preamble.js
+        });
+    });
+
+    travelSrcDir(extensionSrcDir, ({fileName, relativePath, absolutePath}) => {
+        prePulishSrc({
+            inputPath: absolutePath,
+            outputPath: path.resolve(extensionDir, relativePath, fileName),
+            transform: transform,
+            preamble: preamble.js
+        });
+    });
+
+    prePulishSrc({
+        inputPath: path.resolve(ecDir, 'echarts.all.js'),
+        outputPath: path.resolve(ecDir, 'index.js'),
+        preamble: preamble.js
+    });
+    prePulishSrc({
+        inputPath: path.resolve(ecDir, 'echarts.common.js'),
+        outputPath: path.resolve(ecDir, 'index.common.js'),
+        preamble: preamble.js
+    });
+    prePulishSrc({
+        inputPath: path.resolve(ecDir, 'echarts.simple.js'),
+        outputPath: path.resolve(ecDir, 'index.simple.js'),
+        preamble: preamble.js
+    });
+
+    function transform({code, inputPath, outputPath}) {
+        if (inputPath === path.resolve(ecDir, 'src/echarts.js')) {
+            // Using `echarts/echarts.blank.js` to overwrite `echarts/lib/echarts.js`
+            // for including exports API.
+            code += `
+var ___ec_export = require("./export");
+(function () {
+    for (var key in ___ec_export) {
+        if (___ec_export.hasOwnProperty(key)) {
+            exports[key] = ___ec_export[key];
+        }
+    }
+})();`;
+        }
+
+        return code;
+    }
+
+    console.log(color('fgGreen', 'bright')('All done.'));
+};

+ 215 - 0
node_modules/echarts/build/preamble.js

@@ -0,0 +1,215 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+const cStyleComment = `
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+`;
+
+const hashComment = `
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+`;
+
+const mlComment = `
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+`;
+
+function hasPreamble(fileExt) {
+    return fileExt && preambleMap[fileExt];
+}
+
+function addPreamble(fileStr, fileExt) {
+    if (fileStr && fileExt) {
+        const addFn = addFns[fileExt];
+        const headStr = preambleMap[fileExt];
+        return addFn && headStr && addFn(headStr, fileStr);
+    }
+}
+
+const addFns = {
+
+    js: function (headStr, fileStr) {
+        return headStr + fileStr;
+    },
+
+    css: function (headStr, fileStr) {
+        return headStr + fileStr;
+    },
+
+    java: function (headStr, fileStr) {
+        return headStr + fileStr;
+    },
+
+    sh: function (headStr, fileStr) {
+        // Git diff enables manual check.
+        if (/^#\!/.test(fileStr)) {
+            const lines = fileStr.split('\n');
+            lines.splice(1, 0, headStr);
+            return lines.join('\n');
+        }
+        else {
+            return headStr + fileStr;
+        }
+    },
+
+    html: function (headStr, fileStr) {
+        // Git diff enables manual check.
+        let resultStr = fileStr.replace(/^\s*<!DOCTYPE\s[^<>]+>/i, '$&' + headStr);
+        // If no doctype
+        if (resultStr.length === fileStr.length) {
+            resultStr = headStr + fileStr;
+        }
+        return resultStr;
+    },
+
+    xml: xmlAddFn,
+
+    xsl: xmlAddFn
+};
+
+function xmlAddFn(headStr, fileStr) {
+    // Git diff enables manual check.
+    let resultStr = fileStr.replace(/^\s*<\?xml\s[^<>]+\?>/i, '$&' + headStr);
+    // If no <?xml version='1.0' ?>
+    if (resultStr.length === fileStr.length) {
+        resultStr = headStr + fileStr;
+    }
+    return resultStr;
+}
+
+const preambleMap = {
+    js: cStyleComment,
+    css: cStyleComment,
+    java: cStyleComment,
+    sh: hashComment,
+    html: mlComment,
+    xml: mlComment,
+    xsl: mlComment
+};
+
+const licenseReg = [
+    {name: 'Apache', reg: /apache (license|commons)/i},
+    {name: 'BSD', reg: /BSD/},
+    {name: 'LGPL', reg: /LGPL/},
+    {name: 'GPL', reg: /GPL/},
+    {name: 'Mozilla', reg: /mozilla public/i},
+    {name: 'MIT', reg: /mit license/i},
+    {name: 'BSD-d3', reg: /Copyright\s+\(c\)\s+2010-2015,\s+Michael\s+Bostock/i}
+];
+
+function extractLicense(fileStr, fileExt) {
+    let commentText = extractComment(fileStr.trim(), fileExt);
+    if (!commentText) {
+        return;
+    }
+    for (let i = 0; i < licenseReg.length; i++) {
+        if (licenseReg[i].reg.test(commentText)) {
+            return licenseReg[i].name;
+        }
+    }
+}
+
+const cStyleCommentReg = /\/\*[\S\s]*?\*\//;
+const hashCommentReg = /^\s*#.*$/gm;
+const mlCommentReg = /<\!\-\-[\S\s]*?\-\->/;
+const commentReg = {
+    js: cStyleCommentReg,
+    css: cStyleCommentReg,
+    java: cStyleCommentReg,
+    sh: hashCommentReg,
+    html: mlCommentReg,
+    xml: mlCommentReg,
+    xsl: mlCommentReg
+};
+
+function extractComment(str, fileExt) {
+    const reg = commentReg[fileExt];
+
+    if (!fileExt || !reg || !str) {
+        return;
+    }
+
+    reg.lastIndex = 0;
+
+    if (fileExt === 'sh') {
+        let result = str.match(reg);
+        return result && result.join('\n');
+    }
+    else {
+        let result = reg.exec(str);
+        return result && result[0];
+    }
+}
+
+module.exports = Object.assign({
+    extractLicense,
+    hasPreamble,
+    addPreamble
+}, preambleMap);

+ 80 - 0
node_modules/echarts/build/rollup-plugin-ec-lang.js

@@ -0,0 +1,80 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+
+/**
+ * Find language definations.
+ *
+ * Usage:
+ *
+ * import ecLangPlugin from 'echarts/build/rollup-plugin-ec-lang';
+ * let rollupConfig = {
+ *     plugins: [
+ *         ecLangPlugin({lang: 'en'}),
+ *         ...
+ *     ]
+ * };
+ */
+
+const {resolve} = require('path');
+const {readFileSync} = require('fs');
+
+/**
+ * @param {Object} [opt]
+ * @param {string} [opt.lang=null] null/undefined/'' or 'en' or 'fi' or a file path.
+ */
+function getPlugin(opt) {
+    let lang = opt && opt.lang || '';
+
+    return {
+        load: function (absolutePath) {
+            if (/\/src\/lang\.js$/.test(absolutePath)) {
+                let langPath = getLangFileInfo(lang).absolutePath;
+                if (langPath) {
+                    absolutePath = langPath;
+                }
+            }
+            return readFileSync(absolutePath, 'utf-8');
+        }
+    };
+}
+
+/**
+ * @param {string} lang null/undefined/'' or 'en' or 'fi' or a file path.
+ * @return {Object} {isOuter, absolutePath}
+ */
+let getLangFileInfo = getPlugin.getLangFileInfo = function (lang) {
+    let absolutePath;
+    let isOuter = false;
+
+    if (lang) {
+        if (/^[a-zA-Z]{2}$/.test(lang)) {
+            absolutePath = resolve(__dirname, '../', 'src/lang' + lang.toUpperCase() + '.js');
+        }
+        else {
+            isOuter = true;
+            // `lang` is an absolute path or a relative path based on process.cwd().
+            absolutePath = resolve(lang);
+        }
+    }
+
+    return {isOuter, absolutePath};
+};
+
+module.exports = getPlugin;

+ 54 - 0
node_modules/echarts/build/rollup-plugin-ec-remove-dev.js

@@ -0,0 +1,54 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/**
+ * Remove the code of `if (__DEV__) { ... }`.
+ *
+ * Usage:
+ *
+ * import ecRemoveDevPlugin from 'echats/build/rollup-plugin-ec-remove-dev';
+ * let rollupConfig = {
+ *     plugins: [
+ *         ecRemoveDevPlugin(),
+ *         ...
+ *     ]
+ * };
+ */
+
+const babel = require('@babel/core');
+const removeDEVPlugin = require('zrender/build/babel-plugin-transform-remove-dev');
+
+/**
+ * @param {Object} [opt]
+ * @param {Object} [opt.sourcemap]
+ */
+module.exports = function ({sourcemap} = {}) {
+
+    return {
+        transform: function (sourceCode) {
+
+            let {code, map} = babel.transform(sourceCode, {
+                plugins: [removeDEVPlugin],
+                sourceMaps: sourcemap
+            });
+
+            return {code, map};
+        }
+    };
+};

File diff suppressed because it is too large
+ 64732 - 0
node_modules/echarts/dist/echarts-en.common.js


File diff suppressed because it is too large
+ 22 - 0
node_modules/echarts/dist/echarts-en.common.min.js


File diff suppressed because it is too large
+ 98860 - 0
node_modules/echarts/dist/echarts-en.js


File diff suppressed because it is too large
+ 1 - 0
node_modules/echarts/dist/echarts-en.js.map


File diff suppressed because it is too large
+ 22 - 0
node_modules/echarts/dist/echarts-en.min.js


File diff suppressed because it is too large
+ 44521 - 0
node_modules/echarts/dist/echarts-en.simple.js


File diff suppressed because it is too large
+ 22 - 0
node_modules/echarts/dist/echarts-en.simple.min.js


File diff suppressed because it is too large
+ 64732 - 0
node_modules/echarts/dist/echarts.common.js


File diff suppressed because it is too large
+ 22 - 0
node_modules/echarts/dist/echarts.common.min.js


File diff suppressed because it is too large
+ 98860 - 0
node_modules/echarts/dist/echarts.js


File diff suppressed because it is too large
+ 1 - 0
node_modules/echarts/dist/echarts.js.map


File diff suppressed because it is too large
+ 22 - 0
node_modules/echarts/dist/echarts.min.js


File diff suppressed because it is too large
+ 44521 - 0
node_modules/echarts/dist/echarts.simple.js


File diff suppressed because it is too large
+ 22 - 0
node_modules/echarts/dist/echarts.simple.min.js


+ 457 - 0
node_modules/echarts/dist/extension/bmap.js

@@ -0,0 +1,457 @@
+(function (global, factory) {
+	typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('echarts')) :
+	typeof define === 'function' && define.amd ? define(['exports', 'echarts'], factory) :
+	(factory((global.bmap = {}),global.echarts));
+}(this, (function (exports,echarts) { 'use strict';
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/* global BMap */
+
+function BMapCoordSys(bmap, api) {
+    this._bmap = bmap;
+    this.dimensions = ['lng', 'lat'];
+    this._mapOffset = [0, 0];
+
+    this._api = api;
+
+    this._projection = new BMap.MercatorProjection();
+}
+
+BMapCoordSys.prototype.dimensions = ['lng', 'lat'];
+
+BMapCoordSys.prototype.setZoom = function (zoom) {
+    this._zoom = zoom;
+};
+
+BMapCoordSys.prototype.setCenter = function (center) {
+    this._center = this._projection.lngLatToPoint(new BMap.Point(center[0], center[1]));
+};
+
+BMapCoordSys.prototype.setMapOffset = function (mapOffset) {
+    this._mapOffset = mapOffset;
+};
+
+BMapCoordSys.prototype.getBMap = function () {
+    return this._bmap;
+};
+
+BMapCoordSys.prototype.dataToPoint = function (data) {
+    var point = new BMap.Point(data[0], data[1]);
+    // TODO mercator projection is toooooooo slow
+    // var mercatorPoint = this._projection.lngLatToPoint(point);
+
+    // var width = this._api.getZr().getWidth();
+    // var height = this._api.getZr().getHeight();
+    // var divider = Math.pow(2, 18 - 10);
+    // return [
+    //     Math.round((mercatorPoint.x - this._center.x) / divider + width / 2),
+    //     Math.round((this._center.y - mercatorPoint.y) / divider + height / 2)
+    // ];
+    var px = this._bmap.pointToOverlayPixel(point);
+    var mapOffset = this._mapOffset;
+    return [px.x - mapOffset[0], px.y - mapOffset[1]];
+};
+
+BMapCoordSys.prototype.pointToData = function (pt) {
+    var mapOffset = this._mapOffset;
+    var pt = this._bmap.overlayPixelToPoint({
+        x: pt[0] + mapOffset[0],
+        y: pt[1] + mapOffset[1]
+    });
+    return [pt.lng, pt.lat];
+};
+
+BMapCoordSys.prototype.getViewRect = function () {
+    var api = this._api;
+    return new echarts.graphic.BoundingRect(0, 0, api.getWidth(), api.getHeight());
+};
+
+BMapCoordSys.prototype.getRoamTransform = function () {
+    return echarts.matrix.create();
+};
+
+BMapCoordSys.prototype.prepareCustoms = function (data) {
+    var rect = this.getViewRect();
+    return {
+        coordSys: {
+            // The name exposed to user is always 'cartesian2d' but not 'grid'.
+            type: 'bmap',
+            x: rect.x,
+            y: rect.y,
+            width: rect.width,
+            height: rect.height
+        },
+        api: {
+            coord: echarts.util.bind(this.dataToPoint, this),
+            size: echarts.util.bind(dataToCoordSize, this)
+        }
+    };
+};
+
+function dataToCoordSize(dataSize, dataItem) {
+    dataItem = dataItem || [0, 0];
+    return echarts.util.map([0, 1], function (dimIdx) {
+        var val = dataItem[dimIdx];
+        var halfSize = dataSize[dimIdx] / 2;
+        var p1 = [];
+        var p2 = [];
+        p1[dimIdx] = val - halfSize;
+        p2[dimIdx] = val + halfSize;
+        p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx];
+        return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]);
+    }, this);
+}
+
+var Overlay;
+
+// For deciding which dimensions to use when creating list data
+BMapCoordSys.dimensions = BMapCoordSys.prototype.dimensions;
+
+function createOverlayCtor() {
+    function Overlay(root) {
+        this._root = root;
+    }
+
+    Overlay.prototype = new BMap.Overlay();
+    /**
+     * 初始化
+     *
+     * @param {BMap.Map} map
+     * @override
+     */
+    Overlay.prototype.initialize = function (map) {
+        map.getPanes().labelPane.appendChild(this._root);
+        return this._root;
+    };
+    /**
+     * @override
+     */
+    Overlay.prototype.draw = function () {};
+
+    return Overlay;
+}
+
+BMapCoordSys.create = function (ecModel, api) {
+    var bmapCoordSys;
+    var root = api.getDom();
+
+    // TODO Dispose
+    ecModel.eachComponent('bmap', function (bmapModel) {
+        var painter = api.getZr().painter;
+        var viewportRoot = painter.getViewportRoot();
+        if (typeof BMap === 'undefined') {
+            throw new Error('BMap api is not loaded');
+        }
+        Overlay = Overlay || createOverlayCtor();
+        if (bmapCoordSys) {
+            throw new Error('Only one bmap component can exist');
+        }
+        if (!bmapModel.__bmap) {
+            // Not support IE8
+            var bmapRoot = root.querySelector('.ec-extension-bmap');
+            if (bmapRoot) {
+                // Reset viewport left and top, which will be changed
+                // in moving handler in BMapView
+                viewportRoot.style.left = '0px';
+                viewportRoot.style.top = '0px';
+                root.removeChild(bmapRoot);
+            }
+            bmapRoot = document.createElement('div');
+            bmapRoot.style.cssText = 'width:100%;height:100%';
+            // Not support IE8
+            bmapRoot.classList.add('ec-extension-bmap');
+            root.appendChild(bmapRoot);
+
+            // initialize bmap
+            var mapOptions = bmapModel.get('mapOptions') || {};
+            // Not support `mapType`, use `bmap.setMapType(MapType)` instead.
+            delete mapOptions.mapType;
+            var bmap = bmapModel.__bmap = new BMap.Map(bmapRoot, mapOptions);
+
+            var overlay = new Overlay(viewportRoot);
+            bmap.addOverlay(overlay);
+
+            // Override
+            painter.getViewportRootOffset = function () {
+                return {offsetLeft: 0, offsetTop: 0};
+            };
+        }
+        var bmap = bmapModel.__bmap;
+
+        // Set bmap options
+        // centerAndZoom before layout and render
+        var center = bmapModel.get('center');
+        var zoom = bmapModel.get('zoom');
+        if (center && zoom) {
+            var bmapCenter = bmap.getCenter();
+            var bmapZoom = bmap.getZoom();
+            var centerOrZoomChanged = bmapModel.centerOrZoomChanged([bmapCenter.lng, bmapCenter.lat], bmapZoom);
+            if (centerOrZoomChanged) {
+                var pt = new BMap.Point(center[0], center[1]);
+                bmap.centerAndZoom(pt, zoom);
+            }
+        }
+
+        bmapCoordSys = new BMapCoordSys(bmap, api);
+        bmapCoordSys.setMapOffset(bmapModel.__mapOffset || [0, 0]);
+        bmapCoordSys.setZoom(zoom);
+        bmapCoordSys.setCenter(center);
+
+        bmapModel.coordinateSystem = bmapCoordSys;
+    });
+
+    ecModel.eachSeries(function (seriesModel) {
+        if (seriesModel.get('coordinateSystem') === 'bmap') {
+            seriesModel.coordinateSystem = bmapCoordSys;
+        }
+    });
+};
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+function v2Equal(a, b) {
+    return a && b && a[0] === b[0] && a[1] === b[1];
+}
+
+echarts.extendComponentModel({
+    type: 'bmap',
+
+    getBMap: function () {
+        // __bmap is injected when creating BMapCoordSys
+        return this.__bmap;
+    },
+
+    setCenterAndZoom: function (center, zoom) {
+        this.option.center = center;
+        this.option.zoom = zoom;
+    },
+
+    centerOrZoomChanged: function (center, zoom) {
+        var option = this.option;
+        return !(v2Equal(center, option.center) && zoom === option.zoom);
+    },
+
+    defaultOption: {
+
+        center: [104.114129, 37.550339],
+
+        zoom: 5,
+
+        // 2.0 http://lbsyun.baidu.com/custom/index.htm
+        mapStyle: {},
+
+        // 3.0 http://lbsyun.baidu.com/index.php?title=open/custom
+        mapStyleV2: {},
+
+        // See https://lbsyun.baidu.com/cms/jsapi/reference/jsapi_reference.html#a0b1
+        mapOptions: {},
+
+        roam: false
+    }
+});
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+function isEmptyObject(obj) {
+    for (var key in obj) {
+        if (obj.hasOwnProperty(key)) {
+            return false;
+        }
+    }
+    return true;
+}
+
+echarts.extendComponentView({
+    type: 'bmap',
+
+    render: function (bMapModel, ecModel, api) {
+        var rendering = true;
+
+        var bmap = bMapModel.getBMap();
+        var viewportRoot = api.getZr().painter.getViewportRoot();
+        var coordSys = bMapModel.coordinateSystem;
+        var moveHandler = function (type, target) {
+            if (rendering) {
+                return;
+            }
+            var offsetEl = viewportRoot.parentNode.parentNode.parentNode;
+            var mapOffset = [
+                -parseInt(offsetEl.style.left, 10) || 0,
+                -parseInt(offsetEl.style.top, 10) || 0
+            ];
+            viewportRoot.style.left = mapOffset[0] + 'px';
+            viewportRoot.style.top = mapOffset[1] + 'px';
+
+            coordSys.setMapOffset(mapOffset);
+            bMapModel.__mapOffset = mapOffset;
+
+            api.dispatchAction({
+                type: 'bmapRoam'
+            });
+        };
+
+        function zoomEndHandler() {
+            if (rendering) {
+                return;
+            }
+            api.dispatchAction({
+                type: 'bmapRoam'
+            });
+        }
+
+        bmap.removeEventListener('moving', this._oldMoveHandler);
+        bmap.removeEventListener('moveend', this._oldMoveHandler);
+        bmap.removeEventListener('zoomend', this._oldZoomEndHandler);
+        bmap.addEventListener('moving', moveHandler);
+        bmap.addEventListener('moveend', moveHandler);
+        bmap.addEventListener('zoomend', zoomEndHandler);
+
+        this._oldMoveHandler = moveHandler;
+        this._oldZoomEndHandler = zoomEndHandler;
+
+        var roam = bMapModel.get('roam');
+        if (roam && roam !== 'scale') {
+            bmap.enableDragging();
+        }
+        else {
+            bmap.disableDragging();
+        }
+        if (roam && roam !== 'move') {
+            bmap.enableScrollWheelZoom();
+            bmap.enableDoubleClickZoom();
+            bmap.enablePinchToZoom();
+        }
+        else {
+            bmap.disableScrollWheelZoom();
+            bmap.disableDoubleClickZoom();
+            bmap.disablePinchToZoom();
+        }
+
+        /* map 2.0 */
+        var originalStyle = bMapModel.__mapStyle;
+
+        var newMapStyle = bMapModel.get('mapStyle') || {};
+        // FIXME, Not use JSON methods
+        var mapStyleStr = JSON.stringify(newMapStyle);
+        if (JSON.stringify(originalStyle) !== mapStyleStr) {
+            // FIXME May have blank tile when dragging if setMapStyle
+            if (!isEmptyObject(newMapStyle2)) {
+                bmap.setMapStyle(echarts.util.clone(newMapStyle));
+            }
+            bMapModel.__mapStyle = JSON.parse(mapStyleStr);
+        }
+
+        /* map 3.0 */
+        var originalStyle2 = bMapModel.__mapStyle2;
+
+        var newMapStyle2 = bMapModel.get('mapStyleV2') || {};
+        // FIXME, Not use JSON methods
+        var mapStyleStr2 = JSON.stringify(newMapStyle2);
+        if (JSON.stringify(originalStyle2) !== mapStyleStr2) {
+            // FIXME May have blank tile when dragging if setMapStyle
+            if (!isEmptyObject(newMapStyle2)) {
+                bmap.setMapStyleV2(echarts.util.clone(newMapStyle2));
+            }
+            bMapModel.__mapStyle2 = JSON.parse(mapStyleStr2);
+        }
+
+        rendering = false;
+    }
+});
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/**
+ * BMap component extension
+ */
+
+echarts.registerCoordinateSystem('bmap', BMapCoordSys);
+
+// Action
+echarts.registerAction({
+    type: 'bmapRoam',
+    event: 'bmapRoam',
+    update: 'updateLayout'
+}, function (payload, ecModel) {
+    ecModel.eachComponent('bmap', function (bMapModel) {
+        var bmap = bMapModel.getBMap();
+        var center = bmap.getCenter();
+        bMapModel.setCenterAndZoom([center.lng, center.lat], bmap.getZoom());
+    });
+});
+
+var version = '1.0.0';
+
+exports.version = version;
+
+})));
+//# sourceMappingURL=bmap.js.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/echarts/dist/extension/bmap.js.map


File diff suppressed because it is too large
+ 22 - 0
node_modules/echarts/dist/extension/bmap.min.js


+ 872 - 0
node_modules/echarts/dist/extension/dataTool.js

@@ -0,0 +1,872 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+(function (global, factory) {
+	typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('echarts')) :
+	typeof define === 'function' && define.amd ? define(['exports', 'echarts'], factory) :
+	(factory((global.dataTool = {}),global.echarts));
+}(this, (function (exports,echarts) { 'use strict';
+
+/**
+ * @module zrender/core/util
+ */
+
+// 用于处理merge时无法遍历Date等对象的问题
+var arrayProto = Array.prototype;
+var nativeMap = arrayProto.map;
+
+
+/**
+ * Those data types can be cloned:
+ *     Plain object, Array, TypedArray, number, string, null, undefined.
+ * Those data types will be assgined using the orginal data:
+ *     BUILTIN_OBJECT
+ * Instance of user defined class will be cloned to a plain object, without
+ * properties in prototype.
+ * Other data types is not supported (not sure what will happen).
+ *
+ * Caution: do not support clone Date, for performance consideration.
+ * (There might be a large number of date in `series.data`).
+ * So date should not be modified in and out of echarts.
+ *
+ * @param {*} source
+ * @return {*} new
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} target
+ * @param {*} source
+ * @param {boolean} [overwrite=false]
+ */
+
+
+/**
+ * @param {Array} targetAndSources The first item is target, and the rests are source.
+ * @param {boolean} [overwrite=false]
+ * @return {*} target
+ */
+
+
+/**
+ * @param {*} target
+ * @param {*} source
+ * @memberOf module:zrender/core/util
+ */
+
+
+/**
+ * @param {*} target
+ * @param {*} source
+ * @param {boolean} [overlay=false]
+ * @memberOf module:zrender/core/util
+ */
+
+
+
+
+
+
+/**
+ * 查询数组中元素的index
+ * @memberOf module:zrender/core/util
+ */
+
+
+/**
+ * 构造类继承关系
+ *
+ * @memberOf module:zrender/core/util
+ * @param {Function} clazz 源类
+ * @param {Function} baseClazz 基类
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {Object|Function} target
+ * @param {Object|Function} sorce
+ * @param {boolean} overlay
+ */
+
+
+/**
+ * Consider typed array.
+ * @param {Array|TypedArray} data
+ */
+
+
+/**
+ * 数组或对象遍历
+ * @memberOf module:zrender/core/util
+ * @param {Object|Array} obj
+ * @param {Function} cb
+ * @param {*} [context]
+ */
+
+
+/**
+ * 数组映射
+ * @memberOf module:zrender/core/util
+ * @param {Array} obj
+ * @param {Function} cb
+ * @param {*} [context]
+ * @return {Array}
+ */
+function map(obj, cb, context) {
+    if (!(obj && cb)) {
+        return;
+    }
+    if (obj.map && obj.map === nativeMap) {
+        return obj.map(cb, context);
+    }
+    else {
+        var result = [];
+        for (var i = 0, len = obj.length; i < len; i++) {
+            result.push(cb.call(context, obj[i], i, obj));
+        }
+        return result;
+    }
+}
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {Array} obj
+ * @param {Function} cb
+ * @param {Object} [memo]
+ * @param {*} [context]
+ * @return {Array}
+ */
+
+
+/**
+ * 数组过滤
+ * @memberOf module:zrender/core/util
+ * @param {Array} obj
+ * @param {Function} cb
+ * @param {*} [context]
+ * @return {Array}
+ */
+
+
+/**
+ * 数组项查找
+ * @memberOf module:zrender/core/util
+ * @param {Array} obj
+ * @param {Function} cb
+ * @param {*} [context]
+ * @return {*}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {Function} func
+ * @param {*} context
+ * @return {Function}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {Function} func
+ * @return {Function}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * Whether is exactly NaN. Notice isNaN('a') returns true.
+ * @param {*} value
+ * @return {boolean}
+ */
+
+
+/**
+ * If value1 is not null, then return value1, otherwise judget rest of values.
+ * Low performance.
+ * @memberOf module:zrender/core/util
+ * @return {*} Final value
+ */
+
+
+
+
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {Array} arr
+ * @param {number} startIndex
+ * @param {number} endIndex
+ * @return {Array}
+ */
+
+
+/**
+ * Normalize css liked array configuration
+ * e.g.
+ *  3 => [3, 3, 3, 3]
+ *  [4, 2] => [4, 2, 4, 2]
+ *  [4, 3, 2] => [4, 3, 2, 3]
+ * @param {number|Array.<number>} val
+ * @return {Array.<number>}
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {boolean} condition
+ * @param {string} message
+ */
+
+
+/**
+ * @memberOf module:zrender/core/util
+ * @param {string} str string to be trimed
+ * @return {string} trimed string
+ */
+
+
+/**
+ * Set an object as primitive to be ignored traversing children in clone or merge
+ */
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/**
+ * This is a parse of GEXF.
+ *
+ * The spec of GEXF:
+ * https://gephi.org/gexf/1.2draft/gexf-12draft-primer.pdf
+ */
+
+function parse(xml) {
+    var doc;
+    if (typeof xml === 'string') {
+        var parser = new DOMParser();
+        doc = parser.parseFromString(xml, 'text/xml');
+    }
+    else {
+        doc = xml;
+    }
+    if (!doc || doc.getElementsByTagName('parsererror').length) {
+        return null;
+    }
+
+    var gexfRoot = getChildByTagName(doc, 'gexf');
+
+    if (!gexfRoot) {
+        return null;
+    }
+
+    var graphRoot = getChildByTagName(gexfRoot, 'graph');
+
+    var attributes = parseAttributes(getChildByTagName(graphRoot, 'attributes'));
+    var attributesMap = {};
+    for (var i = 0; i < attributes.length; i++) {
+        attributesMap[attributes[i].id] = attributes[i];
+    }
+
+    return {
+        nodes: parseNodes(getChildByTagName(graphRoot, 'nodes'), attributesMap),
+        links: parseEdges(getChildByTagName(graphRoot, 'edges'))
+    };
+}
+
+function parseAttributes(parent) {
+    return parent ? map(getChildrenByTagName(parent, 'attribute'), function (attribDom) {
+        return {
+            id: getAttr(attribDom, 'id'),
+            title: getAttr(attribDom, 'title'),
+            type: getAttr(attribDom, 'type')
+        };
+    }) : [];
+}
+
+function parseNodes(parent, attributesMap) {
+    return parent ? map(getChildrenByTagName(parent, 'node'), function (nodeDom) {
+
+        var id = getAttr(nodeDom, 'id');
+        var label = getAttr(nodeDom, 'label');
+
+        var node = {
+            id: id,
+            name: label,
+            itemStyle: {
+                normal: {}
+            }
+        };
+
+        var vizSizeDom = getChildByTagName(nodeDom, 'viz:size');
+        var vizPosDom = getChildByTagName(nodeDom, 'viz:position');
+        var vizColorDom = getChildByTagName(nodeDom, 'viz:color');
+        // var vizShapeDom = getChildByTagName(nodeDom, 'viz:shape');
+
+        var attvaluesDom = getChildByTagName(nodeDom, 'attvalues');
+
+        if (vizSizeDom) {
+            node.symbolSize = parseFloat(getAttr(vizSizeDom, 'value'));
+        }
+        if (vizPosDom) {
+            node.x = parseFloat(getAttr(vizPosDom, 'x'));
+            node.y = parseFloat(getAttr(vizPosDom, 'y'));
+            // z
+        }
+        if (vizColorDom) {
+            node.itemStyle.normal.color = 'rgb(' + [
+                getAttr(vizColorDom, 'r') | 0,
+                getAttr(vizColorDom, 'g') | 0,
+                getAttr(vizColorDom, 'b') | 0
+            ].join(',') + ')';
+        }
+        // if (vizShapeDom) {
+            // node.shape = getAttr(vizShapeDom, 'shape');
+        // }
+        if (attvaluesDom) {
+            var attvalueDomList = getChildrenByTagName(attvaluesDom, 'attvalue');
+
+            node.attributes = {};
+
+            for (var j = 0; j < attvalueDomList.length; j++) {
+                var attvalueDom = attvalueDomList[j];
+                var attId = getAttr(attvalueDom, 'for');
+                var attValue = getAttr(attvalueDom, 'value');
+                var attribute = attributesMap[attId];
+
+                if (attribute) {
+                    switch (attribute.type) {
+                        case 'integer':
+                        case 'long':
+                            attValue = parseInt(attValue, 10);
+                            break;
+                        case 'float':
+                        case 'double':
+                            attValue = parseFloat(attValue);
+                            break;
+                        case 'boolean':
+                            attValue = attValue.toLowerCase() === 'true';
+                            break;
+                        default:
+                    }
+                    node.attributes[attId] = attValue;
+                }
+            }
+        }
+
+        return node;
+    }) : [];
+}
+
+function parseEdges(parent) {
+    return parent ? map(getChildrenByTagName(parent, 'edge'), function (edgeDom) {
+        var id = getAttr(edgeDom, 'id');
+        var label = getAttr(edgeDom, 'label');
+
+        var sourceId = getAttr(edgeDom, 'source');
+        var targetId = getAttr(edgeDom, 'target');
+
+        var edge = {
+            id: id,
+            name: label,
+            source: sourceId,
+            target: targetId,
+            lineStyle: {
+                normal: {}
+            }
+        };
+
+        var lineStyle = edge.lineStyle.normal;
+
+        var vizThicknessDom = getChildByTagName(edgeDom, 'viz:thickness');
+        var vizColorDom = getChildByTagName(edgeDom, 'viz:color');
+        // var vizShapeDom = getChildByTagName(edgeDom, 'viz:shape');
+
+        if (vizThicknessDom) {
+            lineStyle.width = parseFloat(vizThicknessDom.getAttribute('value'));
+        }
+        if (vizColorDom) {
+            lineStyle.color = 'rgb(' + [
+                getAttr(vizColorDom, 'r') | 0,
+                getAttr(vizColorDom, 'g') | 0,
+                getAttr(vizColorDom, 'b') | 0
+            ].join(',') + ')';
+        }
+        // if (vizShapeDom) {
+        //     edge.shape = vizShapeDom.getAttribute('shape');
+        // }
+
+        return edge;
+    }) : [];
+}
+
+function getAttr(el, attrName) {
+    return el.getAttribute(attrName);
+}
+
+function getChildByTagName(parent, tagName) {
+    var node = parent.firstChild;
+
+    while (node) {
+        if (
+            node.nodeType !== 1
+            || node.nodeName.toLowerCase() !== tagName.toLowerCase()
+        ) {
+            node = node.nextSibling;
+        }
+        else {
+            return node;
+        }
+    }
+
+    return null;
+}
+
+function getChildrenByTagName(parent, tagName) {
+    var node = parent.firstChild;
+    var children = [];
+    while (node) {
+        if (node.nodeName.toLowerCase() === tagName.toLowerCase()) {
+            children.push(node);
+        }
+        node = node.nextSibling;
+    }
+
+    return children;
+}
+
+
+var gexf = (Object.freeze || Object)({
+	parse: parse
+});
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/*
+* A third-party license is embeded for some of the code in this file:
+* The method "quantile" was copied from "d3.js".
+* (See more details in the comment of the method below.)
+* The use of the source code of this file is also subject to the terms
+* and consitions of the license of "d3.js" (BSD-3Clause, see
+* </licenses/LICENSE-d3>).
+*/
+
+/**
+ * Linear mapping a value from domain to range
+ * @memberOf module:echarts/util/number
+ * @param  {(number|Array.<number>)} val
+ * @param  {Array.<number>} domain Domain extent domain[0] can be bigger than domain[1]
+ * @param  {Array.<number>} range  Range extent range[0] can be bigger than range[1]
+ * @param  {boolean} clamp
+ * @return {(number|Array.<number>}
+ */
+
+
+/**
+ * Convert a percent string to absolute number.
+ * Returns NaN if percent is not a valid string or number
+ * @memberOf module:echarts/util/number
+ * @param {string|number} percent
+ * @param {number} all
+ * @return {number}
+ */
+
+
+/**
+ * (1) Fix rounding error of float numbers.
+ * (2) Support return string to avoid scientific notation like '3.5e-7'.
+ *
+ * @param {number} x
+ * @param {number} [precision]
+ * @param {boolean} [returnStr]
+ * @return {number|string}
+ */
+
+
+/**
+ * asc sort arr.
+ * The input arr will be modified.
+ *
+ * @param {Array} arr
+ * @return {Array} The input arr.
+ */
+function asc(arr) {
+    arr.sort(function (a, b) {
+        return a - b;
+    });
+    return arr;
+}
+
+/**
+ * Get precision
+ * @param {number} val
+ */
+
+
+/**
+ * @param {string|number} val
+ * @return {number}
+ */
+
+
+/**
+ * Minimal dicernible data precisioin according to a single pixel.
+ *
+ * @param {Array.<number>} dataExtent
+ * @param {Array.<number>} pixelExtent
+ * @return {number} precision
+ */
+
+
+/**
+ * Get a data of given precision, assuring the sum of percentages
+ * in valueList is 1.
+ * The largest remainer method is used.
+ * https://en.wikipedia.org/wiki/Largest_remainder_method
+ *
+ * @param {Array.<number>} valueList a list of all data
+ * @param {number} idx index of the data to be processed in valueList
+ * @param {number} precision integer number showing digits of precision
+ * @return {number} percent ranging from 0 to 100
+ */
+
+
+// Number.MAX_SAFE_INTEGER, ie do not support.
+
+
+/**
+ * To 0 - 2 * PI, considering negative radian.
+ * @param {number} radian
+ * @return {number}
+ */
+
+
+/**
+ * @param {type} radian
+ * @return {boolean}
+ */
+
+
+/* eslint-enable */
+
+/**
+ * @param {string|Date|number} value These values can be accepted:
+ *   + An instance of Date, represent a time in its own time zone.
+ *   + Or string in a subset of ISO 8601, only including:
+ *     + only year, month, date: '2012-03', '2012-03-01', '2012-03-01 05', '2012-03-01 05:06',
+ *     + separated with T or space: '2012-03-01T12:22:33.123', '2012-03-01 12:22:33.123',
+ *     + time zone: '2012-03-01T12:22:33Z', '2012-03-01T12:22:33+8000', '2012-03-01T12:22:33-05:00',
+ *     all of which will be treated as local time if time zone is not specified
+ *     (see <https://momentjs.com/>).
+ *   + Or other string format, including (all of which will be treated as loacal time):
+ *     '2012', '2012-3-1', '2012/3/1', '2012/03/01',
+ *     '2009/6/12 2:00', '2009/6/12 2:05:08', '2009/6/12 2:05:08.123'
+ *   + a timestamp, which represent a time in UTC.
+ * @return {Date} date
+ */
+
+
+/**
+ * Quantity of a number. e.g. 0.1, 1, 10, 100
+ *
+ * @param  {number} val
+ * @return {number}
+ */
+
+
+/**
+ * Exponent of the quantity of a number
+ * e.g., 1234 equals to 1.234*10^3, so quantityExponent(1234) is 3
+ *
+ * @param  {number} val non-negative value
+ * @return {number}
+ */
+
+
+/**
+ * find a “nice” number approximately equal to x. Round the number if round = true,
+ * take ceiling if round = false. The primary observation is that the “nicest”
+ * numbers in decimal are 1, 2, and 5, and all power-of-ten multiples of these numbers.
+ *
+ * See "Nice Numbers for Graph Labels" of Graphic Gems.
+ *
+ * @param  {number} val Non-negative value.
+ * @param  {boolean} round
+ * @return {number}
+ */
+
+
+/**
+ * This code was copied from "d3.js"
+ * <https://github.com/d3/d3/blob/9cc9a875e636a1dcf36cc1e07bdf77e1ad6e2c74/src/arrays/quantile.js>.
+ * See the license statement at the head of this file.
+ * @param {Array.<number>} ascArr
+ */
+function quantile(ascArr, p) {
+    var H = (ascArr.length - 1) * p + 1;
+    var h = Math.floor(H);
+    var v = +ascArr[h - 1];
+    var e = H - h;
+    return e ? v + e * (ascArr[h] - v) : v;
+}
+
+/**
+ * Order intervals asc, and split them when overlap.
+ * expect(numberUtil.reformIntervals([
+ *     {interval: [18, 62], close: [1, 1]},
+ *     {interval: [-Infinity, -70], close: [0, 0]},
+ *     {interval: [-70, -26], close: [1, 1]},
+ *     {interval: [-26, 18], close: [1, 1]},
+ *     {interval: [62, 150], close: [1, 1]},
+ *     {interval: [106, 150], close: [1, 1]},
+ *     {interval: [150, Infinity], close: [0, 0]}
+ * ])).toEqual([
+ *     {interval: [-Infinity, -70], close: [0, 0]},
+ *     {interval: [-70, -26], close: [1, 1]},
+ *     {interval: [-26, 18], close: [0, 1]},
+ *     {interval: [18, 62], close: [0, 1]},
+ *     {interval: [62, 150], close: [0, 1]},
+ *     {interval: [150, Infinity], close: [0, 0]}
+ * ]);
+ * @param {Array.<Object>} list, where `close` mean open or close
+ *        of the interval, and Infinity can be used.
+ * @return {Array.<Object>} The origin list, which has been reformed.
+ */
+
+
+/**
+ * parseFloat NaNs numeric-cast false positives (null|true|false|"")
+ * ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+ * subtraction forces infinities to NaN
+ *
+ * @param {*} v
+ * @return {boolean}
+ */
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/**
+ * See:
+ *  <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2>
+ *  <http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html>
+ *
+ * Helper method for preparing data.
+ *
+ * @param {Array.<number>} rawData like
+ *        [
+ *            [12,232,443], (raw data set for the first box)
+ *            [3843,5545,1232], (raw datat set for the second box)
+ *            ...
+ *        ]
+ * @param {Object} [opt]
+ *
+ * @param {(number|string)} [opt.boundIQR=1.5] Data less than min bound is outlier.
+ *      default 1.5, means Q1 - 1.5 * (Q3 - Q1).
+ *      If 'none'/0 passed, min bound will not be used.
+ * @param {(number|string)} [opt.layout='horizontal']
+ *      Box plot layout, can be 'horizontal' or 'vertical'
+ * @return {Object} {
+ *      boxData: Array.<Array.<number>>
+ *      outliers: Array.<Array.<number>>
+ *      axisData: Array.<string>
+ * }
+ */
+var prepareBoxplotData = function (rawData, opt) {
+    opt = opt || [];
+    var boxData = [];
+    var outliers = [];
+    var axisData = [];
+    var boundIQR = opt.boundIQR;
+    var useExtreme = boundIQR === 'none' || boundIQR === 0;
+
+    for (var i = 0; i < rawData.length; i++) {
+        axisData.push(i + '');
+        var ascList = asc(rawData[i].slice());
+
+        var Q1 = quantile(ascList, 0.25);
+        var Q2 = quantile(ascList, 0.5);
+        var Q3 = quantile(ascList, 0.75);
+        var min = ascList[0];
+        var max = ascList[ascList.length - 1];
+
+        var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1);
+
+        var low = useExtreme
+            ? min
+            : Math.max(min, Q1 - bound);
+        var high = useExtreme
+            ? max
+            : Math.min(max, Q3 + bound);
+
+        boxData.push([low, Q1, Q2, Q3, high]);
+
+        for (var j = 0; j < ascList.length; j++) {
+            var dataItem = ascList[j];
+            if (dataItem < low || dataItem > high) {
+                var outlier = [i, dataItem];
+                opt.layout === 'vertical' && outlier.reverse();
+                outliers.push(outlier);
+            }
+        }
+    }
+    return {
+        boxData: boxData,
+        outliers: outliers,
+        axisData: axisData
+    };
+};
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var version = '1.0.0';
+
+// For backward compatibility, where the namespace `dataTool` will
+// be mounted on `echarts` is the extension `dataTool` is imported.
+// But the old version of echarts do not have `dataTool` namespace,
+// so check it before mounting.
+if (echarts.dataTool) {
+    echarts.dataTool.version = version;
+    echarts.dataTool.gexf = gexf;
+    echarts.dataTool.prepareBoxplotData = prepareBoxplotData;
+}
+
+exports.version = version;
+exports.gexf = gexf;
+exports.prepareBoxplotData = prepareBoxplotData;
+
+})));
+//# sourceMappingURL=dataTool.js.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/echarts/dist/extension/dataTool.js.map


File diff suppressed because it is too large
+ 22 - 0
node_modules/echarts/dist/extension/dataTool.min.js


+ 273 - 0
node_modules/echarts/echarts.all.js

@@ -0,0 +1,273 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+export * from './src/echarts';
+export * from './src/export';
+
+import './src/component/dataset';
+
+
+
+// ----------------------------------------------
+// All of the modules that are allowed to be
+// imported are listed below.
+//
+// Users MUST NOT import other modules that are
+// not included in this list.
+// ----------------------------------------------
+
+
+
+// ----------------
+// Charts (series)
+// ----------------
+
+
+
+// All of the series types, for example:
+// chart.setOption({
+//     series: [{
+//         type: 'line' // or 'bar', 'pie', ...
+//     }]
+// });
+
+import './src/chart/line';
+import './src/chart/bar';
+import './src/chart/pie';
+import './src/chart/scatter';
+import './src/chart/radar';
+import './src/chart/map';
+import './src/chart/tree';
+import './src/chart/treemap';
+import './src/chart/graph';
+import './src/chart/gauge';
+import './src/chart/funnel';
+import './src/chart/parallel';
+import './src/chart/sankey';
+import './src/chart/boxplot';
+import './src/chart/candlestick';
+import './src/chart/effectScatter';
+import './src/chart/lines';
+import './src/chart/heatmap';
+import './src/chart/pictorialBar';
+import './src/chart/themeRiver';
+import './src/chart/sunburst';
+import './src/chart/custom';
+
+
+
+// -------------------
+// Coordinate systems
+// -------------------
+
+
+
+// All of the axis modules have been included in the
+// coordinate system module below, do not need to
+// make extra import.
+
+// `cartesian` coordinate system. For some historical
+// reasons, it is named as grid, for example:
+// chart.setOption({
+//     grid: {...},
+//     xAxis: {...},
+//     yAxis: {...},
+//     series: [{...}]
+// });
+import './src/component/grid';
+
+// `polar` coordinate system, for example:
+// chart.setOption({
+//     polar: {...},
+//     radiusAxis: {...},
+//     angleAxis: {...},
+//     series: [{
+//         coordinateSystem: 'polar'
+//     }]
+// });
+import './src/component/polar';
+
+// `geo` coordinate system, for example:
+// chart.setOption({
+//     geo: {...},
+//     series: [{
+//         coordinateSystem: 'geo'
+//     }]
+// });
+import './src/component/geo';
+
+// `singleAxis` coordinate system (notice, it is a coordinate system
+// with only one axis, work for chart like theme river), for example:
+// chart.setOption({
+//     singleAxis: {...}
+//     series: [{type: 'themeRiver', ...}]
+// });
+import './src/component/singleAxis';
+
+// `parallel` coordinate system, only work for parallel series, for example:
+// chart.setOption({
+//     parallel: {...},
+//     parallelAxis: [{...}, ...],
+//     series: [{
+//         type: 'parallel'
+//     }]
+// });
+import './src/component/parallel';
+
+// `calendar` coordinate system. for example,
+// chart.setOptionp({
+//     calendar: {...},
+//     series: [{
+//         coordinateSystem: 'calendar'
+//     }]
+// );
+import './src/component/calendar';
+
+
+
+// ------------------
+// Other components
+// ------------------
+
+
+
+// `graphic` component, for example:
+// chart.setOption({
+//     graphic: {...}
+// });
+import './src/component/graphic';
+
+// `toolbox` component, for example:
+// chart.setOption({
+//     toolbox: {...}
+// });
+import './src/component/toolbox';
+
+// `tooltip` component, for example:
+// chart.setOption({
+//     tooltip: {...}
+// });
+import './src/component/tooltip';
+
+// `axisPointer` component, for example:
+// chart.setOption({
+//     tooltip: {axisPointer: {...}, ...}
+// });
+// Or
+// chart.setOption({
+//     axisPointer: {...}
+// });
+import './src/component/axisPointer';
+
+// `brush` component, for example:
+// chart.setOption({
+//     brush: {...}
+// });
+// Or
+// chart.setOption({
+//     tooltip: {feature: {brush: {...}}
+// })
+import './src/component/brush';
+
+// `title` component, for example:
+// chart.setOption({
+//     title: {...}
+// });
+import './src/component/title';
+
+// `timeline` component, for example:
+// chart.setOption({
+//     timeline: {...}
+// });
+import './src/component/timeline';
+
+// `markPoint` component, for example:
+// chart.setOption({
+//     series: [{markPoint: {...}}]
+// });
+import './src/component/markPoint';
+
+// `markLine` component, for example:
+// chart.setOption({
+//     series: [{markLine: {...}}]
+// });
+import './src/component/markLine';
+
+// `markArea` component, for example:
+// chart.setOption({
+//     series: [{markArea: {...}}]
+// });
+import './src/component/markArea';
+
+// `legend` component scrollable, for example:
+// chart.setOption({
+//     legend: {type: 'scroll'}
+// });
+import './src/component/legendScroll';
+
+// `legend` component not scrollable. for example:
+// chart.setOption({
+//     legend: {...}
+// });
+import './src/component/legend';
+
+// `dataZoom` component including both `dataZoomInside` and `dataZoomSlider`.
+import './src/component/dataZoom';
+
+// `dataZoom` component providing drag, pinch, wheel behaviors
+// inside coodinate system, for example:
+// chart.setOption({
+//     dataZoom: {type: 'inside'}
+// });
+import './src/component/dataZoomInside';
+
+// `dataZoom` component providing a slider bar, for example:
+// chart.setOption({
+//     dataZoom: {type: 'slider'}
+// });
+import './src/component/dataZoomSlider';
+
+// `dataZoom` component including both `visualMapContinuous` and `visualMapPiecewise`.
+import './src/component/visualMap';
+
+// `visualMap` component providing continuous bar, for example:
+// chart.setOption({
+//     visualMap: {type: 'continuous'}
+// });
+import './src/component/visualMapContinuous';
+
+// `visualMap` component providing pieces bar, for example:
+// chart.setOption({
+//     visualMap: {type: 'piecewise'}
+// });
+import './src/component/visualMapPiecewise';
+
+
+
+// -----------------
+// Render engines
+// -----------------
+
+
+
+// Provide IE 6,7,8 compatibility.
+import 'zrender/src/vml/vml';
+
+// Render via SVG rather than canvas.
+import 'zrender/src/svg/svg';

+ 23 - 0
node_modules/echarts/echarts.blank.js

@@ -0,0 +1,23 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+export * from './src/echarts';
+export * from './src/export';
+
+import './src/component/dataset';

+ 44 - 0
node_modules/echarts/echarts.common.js

@@ -0,0 +1,44 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+export * from './src/echarts';
+export * from './src/export';
+
+import './src/component/dataset';
+
+import './src/chart/line';
+import './src/chart/bar';
+import './src/chart/pie';
+import './src/chart/scatter';
+import './src/component/graphic';
+import './src/component/tooltip';
+import './src/component/axisPointer';
+import './src/component/legendScroll';
+
+import './src/component/grid';
+import './src/component/title';
+
+import './src/component/markPoint';
+import './src/component/markLine';
+import './src/component/markArea';
+import './src/component/dataZoom';
+import './src/component/toolbox';
+
+import 'zrender/src/vml/vml';
+import 'zrender/src/svg/svg';

+ 27 - 0
node_modules/echarts/echarts.simple.js

@@ -0,0 +1,27 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+export * from './src/echarts';
+
+import './src/component/dataset';
+
+import './src/chart/line';
+import './src/chart/bar';
+import './src/chart/pie';
+import './src/component/gridSimple';

+ 189 - 0
node_modules/echarts/extension-src/.eslintrc.yaml

@@ -0,0 +1,189 @@
+parserOptions:
+    # If using ES Module, ecmaVersion have to be set as `2015`.
+    ecmaVersion: 2015
+    sourceType: "module"
+env:
+    browser: true
+    node: true
+    es6: false
+globals:
+    jQuery: true
+    Promise: true
+rules:
+    no-console:
+        - 2
+        -
+            allow:
+                - "warn"
+                - "error"
+    no-constant-condition: 0
+    comma-dangle: 2
+    no-debugger: 2
+    no-dupe-keys: 2
+    no-empty-character-class: 2
+    no-ex-assign: 2
+    no-extra-boolean-cast: 0
+    no-func-assign: 2
+    no-inner-declarations: 2
+    no-invalid-regexp: 2
+    no-negated-in-lhs: 2
+    no-obj-calls: 2
+    no-sparse-arrays: 2
+    no-unreachable: 2
+    use-isnan: 2
+    valid-typeof: 2
+    block-scoped-var: 0
+    curly:
+        - 2
+        - "all"
+    eqeqeq:
+        - 2
+        - "allow-null"
+    guard-for-in: 2
+    no-else-return: 0
+    no-labels:
+        - 2
+        -
+            allowLoop: true
+    no-eval: 2
+    no-extend-native: 2
+    no-extra-bind: 0
+    no-implied-eval: 2
+    no-iterator: 2
+    no-irregular-whitespace: 2
+    no-lone-blocks: 2
+    no-loop-func: 2
+    no-multi-str: 2
+    no-native-reassign: 2
+    no-new-wrappers: 2
+    no-octal: 2
+    no-octal-escape: 2
+    no-proto: 2
+    no-redeclare: 0
+    no-self-compare: 2
+    no-unneeded-ternary: 2
+    no-with: 2
+    radix: 2
+    wrap-iife:
+        - 2
+        - "any"
+    no-delete-var: 2
+    no-dupe-args: 2
+    no-duplicate-case: 2
+    no-label-var: 2
+    no-shadow-restricted-names: 2
+    no-undef: 2
+    no-undef-init: 2
+    no-unused-vars:
+        - 2
+        -
+            vars: "local"
+            args: "none"
+    no-use-before-define: 0
+    brace-style:
+        - 2
+        - "stroustrup"
+        - {}
+    comma-spacing:
+        - 2
+        -
+            before: false
+            after: true
+    comma-style:
+        - 2
+        - "last"
+    new-parens: 2
+    no-array-constructor: 2
+    no-multi-spaces:
+        - 2
+        -
+            ignoreEOLComments: true
+            exceptions:
+                Property: true
+    no-new-object: 2
+    no-spaced-func: 2
+    no-trailing-spaces: 2
+    no-extra-parens:
+        - 2
+        - "functions"
+    no-mixed-spaces-and-tabs: 2
+    one-var:
+        - 2
+        - "never"
+    operator-linebreak:
+        - 2
+        - "before"
+        -
+            overrides:
+                "=": "after"
+    quotes:
+        - 2
+        - "single"
+    semi:
+        - 2
+        - "always"
+    semi-spacing: 2
+    keyword-spacing: 2
+    key-spacing:
+        - 2
+        -
+            beforeColon: false
+            afterColon: true
+    space-before-function-paren:
+        - 2
+        -
+            anonymous: "always"
+            named: "never"
+    space-before-blocks:
+        - 2
+        - "always"
+    computed-property-spacing:
+        - 2
+        - "never"
+    space-in-parens:
+        - 2
+        - "never"
+    space-unary-ops: 2
+    spaced-comment: 0
+
+    max-nested-callbacks:
+        - 1
+        - 5
+    max-depth:
+        - 1
+        - 6
+    max-len:
+        - 2
+        - 120
+        - 4
+        -
+            ignoreUrls: true
+            ignoreComments: true
+    max-params:
+        - 1
+        - 15
+
+    space-infix-ops: 2
+    dot-notation:
+        - 2
+        -
+            allowKeywords: true
+            allowPattern: "^catch$"
+
+    arrow-spacing: 2
+    constructor-super: 2
+    no-confusing-arrow:
+        - 2
+        -
+            allowParens: true
+    no-class-assign: 2
+    no-const-assign: 2
+    no-dupe-class-members: 2
+    no-this-before-super: 0
+    no-var: 0
+    no-duplicate-imports: 2
+    prefer-rest-params: 0
+    unicode-bom: 2
+    max-statements-per-line: 2
+
+    no-useless-constructor: 0

+ 228 - 0
node_modules/echarts/extension-src/bmap/BMapCoordSys.js

@@ -0,0 +1,228 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/* global BMap */
+
+import {
+    util as zrUtil,
+    graphic,
+    matrix
+} from 'echarts';
+
+function BMapCoordSys(bmap, api) {
+    this._bmap = bmap;
+    this.dimensions = ['lng', 'lat'];
+    this._mapOffset = [0, 0];
+
+    this._api = api;
+
+    this._projection = new BMap.MercatorProjection();
+}
+
+BMapCoordSys.prototype.dimensions = ['lng', 'lat'];
+
+BMapCoordSys.prototype.setZoom = function (zoom) {
+    this._zoom = zoom;
+};
+
+BMapCoordSys.prototype.setCenter = function (center) {
+    this._center = this._projection.lngLatToPoint(new BMap.Point(center[0], center[1]));
+};
+
+BMapCoordSys.prototype.setMapOffset = function (mapOffset) {
+    this._mapOffset = mapOffset;
+};
+
+BMapCoordSys.prototype.getBMap = function () {
+    return this._bmap;
+};
+
+BMapCoordSys.prototype.dataToPoint = function (data) {
+    var point = new BMap.Point(data[0], data[1]);
+    // TODO mercator projection is toooooooo slow
+    // var mercatorPoint = this._projection.lngLatToPoint(point);
+
+    // var width = this._api.getZr().getWidth();
+    // var height = this._api.getZr().getHeight();
+    // var divider = Math.pow(2, 18 - 10);
+    // return [
+    //     Math.round((mercatorPoint.x - this._center.x) / divider + width / 2),
+    //     Math.round((this._center.y - mercatorPoint.y) / divider + height / 2)
+    // ];
+    var px = this._bmap.pointToOverlayPixel(point);
+    var mapOffset = this._mapOffset;
+    return [px.x - mapOffset[0], px.y - mapOffset[1]];
+};
+
+BMapCoordSys.prototype.pointToData = function (pt) {
+    var mapOffset = this._mapOffset;
+    var pt = this._bmap.overlayPixelToPoint({
+        x: pt[0] + mapOffset[0],
+        y: pt[1] + mapOffset[1]
+    });
+    return [pt.lng, pt.lat];
+};
+
+BMapCoordSys.prototype.getViewRect = function () {
+    var api = this._api;
+    return new graphic.BoundingRect(0, 0, api.getWidth(), api.getHeight());
+};
+
+BMapCoordSys.prototype.getRoamTransform = function () {
+    return matrix.create();
+};
+
+BMapCoordSys.prototype.prepareCustoms = function (data) {
+    var rect = this.getViewRect();
+    return {
+        coordSys: {
+            // The name exposed to user is always 'cartesian2d' but not 'grid'.
+            type: 'bmap',
+            x: rect.x,
+            y: rect.y,
+            width: rect.width,
+            height: rect.height
+        },
+        api: {
+            coord: zrUtil.bind(this.dataToPoint, this),
+            size: zrUtil.bind(dataToCoordSize, this)
+        }
+    };
+};
+
+function dataToCoordSize(dataSize, dataItem) {
+    dataItem = dataItem || [0, 0];
+    return zrUtil.map([0, 1], function (dimIdx) {
+        var val = dataItem[dimIdx];
+        var halfSize = dataSize[dimIdx] / 2;
+        var p1 = [];
+        var p2 = [];
+        p1[dimIdx] = val - halfSize;
+        p2[dimIdx] = val + halfSize;
+        p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx];
+        return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]);
+    }, this);
+}
+
+var Overlay;
+
+// For deciding which dimensions to use when creating list data
+BMapCoordSys.dimensions = BMapCoordSys.prototype.dimensions;
+
+function createOverlayCtor() {
+    function Overlay(root) {
+        this._root = root;
+    }
+
+    Overlay.prototype = new BMap.Overlay();
+    /**
+     * 初始化
+     *
+     * @param {BMap.Map} map
+     * @override
+     */
+    Overlay.prototype.initialize = function (map) {
+        map.getPanes().labelPane.appendChild(this._root);
+        return this._root;
+    };
+    /**
+     * @override
+     */
+    Overlay.prototype.draw = function () {};
+
+    return Overlay;
+}
+
+BMapCoordSys.create = function (ecModel, api) {
+    var bmapCoordSys;
+    var root = api.getDom();
+
+    // TODO Dispose
+    ecModel.eachComponent('bmap', function (bmapModel) {
+        var painter = api.getZr().painter;
+        var viewportRoot = painter.getViewportRoot();
+        if (typeof BMap === 'undefined') {
+            throw new Error('BMap api is not loaded');
+        }
+        Overlay = Overlay || createOverlayCtor();
+        if (bmapCoordSys) {
+            throw new Error('Only one bmap component can exist');
+        }
+        if (!bmapModel.__bmap) {
+            // Not support IE8
+            var bmapRoot = root.querySelector('.ec-extension-bmap');
+            if (bmapRoot) {
+                // Reset viewport left and top, which will be changed
+                // in moving handler in BMapView
+                viewportRoot.style.left = '0px';
+                viewportRoot.style.top = '0px';
+                root.removeChild(bmapRoot);
+            }
+            bmapRoot = document.createElement('div');
+            bmapRoot.style.cssText = 'width:100%;height:100%';
+            // Not support IE8
+            bmapRoot.classList.add('ec-extension-bmap');
+            root.appendChild(bmapRoot);
+
+            // initialize bmap
+            var mapOptions = bmapModel.get('mapOptions') || {};
+            // Not support `mapType`, use `bmap.setMapType(MapType)` instead.
+            delete mapOptions.mapType;
+            var bmap = bmapModel.__bmap = new BMap.Map(bmapRoot, mapOptions);
+
+            var overlay = new Overlay(viewportRoot);
+            bmap.addOverlay(overlay);
+
+            // Override
+            painter.getViewportRootOffset = function () {
+                return {offsetLeft: 0, offsetTop: 0};
+            };
+        }
+        var bmap = bmapModel.__bmap;
+
+        // Set bmap options
+        // centerAndZoom before layout and render
+        var center = bmapModel.get('center');
+        var zoom = bmapModel.get('zoom');
+        if (center && zoom) {
+            var bmapCenter = bmap.getCenter();
+            var bmapZoom = bmap.getZoom();
+            var centerOrZoomChanged = bmapModel.centerOrZoomChanged([bmapCenter.lng, bmapCenter.lat], bmapZoom);
+            if (centerOrZoomChanged) {
+                var pt = new BMap.Point(center[0], center[1]);
+                bmap.centerAndZoom(pt, zoom);
+            }
+        }
+
+        bmapCoordSys = new BMapCoordSys(bmap, api);
+        bmapCoordSys.setMapOffset(bmapModel.__mapOffset || [0, 0]);
+        bmapCoordSys.setZoom(zoom);
+        bmapCoordSys.setCenter(center);
+
+        bmapModel.coordinateSystem = bmapCoordSys;
+    });
+
+    ecModel.eachSeries(function (seriesModel) {
+        if (seriesModel.get('coordinateSystem') === 'bmap') {
+            seriesModel.coordinateSystem = bmapCoordSys;
+        }
+    });
+};
+
+export default BMapCoordSys;

+ 61 - 0
node_modules/echarts/extension-src/bmap/BMapModel.js

@@ -0,0 +1,61 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+import * as echarts from 'echarts';
+
+function v2Equal(a, b) {
+    return a && b && a[0] === b[0] && a[1] === b[1];
+}
+
+export default echarts.extendComponentModel({
+    type: 'bmap',
+
+    getBMap: function () {
+        // __bmap is injected when creating BMapCoordSys
+        return this.__bmap;
+    },
+
+    setCenterAndZoom: function (center, zoom) {
+        this.option.center = center;
+        this.option.zoom = zoom;
+    },
+
+    centerOrZoomChanged: function (center, zoom) {
+        var option = this.option;
+        return !(v2Equal(center, option.center) && zoom === option.zoom);
+    },
+
+    defaultOption: {
+
+        center: [104.114129, 37.550339],
+
+        zoom: 5,
+
+        // 2.0 http://lbsyun.baidu.com/custom/index.htm
+        mapStyle: {},
+
+        // 3.0 http://lbsyun.baidu.com/index.php?title=open/custom
+        mapStyleV2: {},
+
+        // See https://lbsyun.baidu.com/cms/jsapi/reference/jsapi_reference.html#a0b1
+        mapOptions: {},
+
+        roam: false
+    }
+});

+ 127 - 0
node_modules/echarts/extension-src/bmap/BMapView.js

@@ -0,0 +1,127 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+import * as echarts from 'echarts';
+
+function isEmptyObject(obj) {
+    for (var key in obj) {
+        if (obj.hasOwnProperty(key)) {
+            return false;
+        }
+    }
+    return true;
+}
+
+export default echarts.extendComponentView({
+    type: 'bmap',
+
+    render: function (bMapModel, ecModel, api) {
+        var rendering = true;
+
+        var bmap = bMapModel.getBMap();
+        var viewportRoot = api.getZr().painter.getViewportRoot();
+        var coordSys = bMapModel.coordinateSystem;
+        var moveHandler = function (type, target) {
+            if (rendering) {
+                return;
+            }
+            var offsetEl = viewportRoot.parentNode.parentNode.parentNode;
+            var mapOffset = [
+                -parseInt(offsetEl.style.left, 10) || 0,
+                -parseInt(offsetEl.style.top, 10) || 0
+            ];
+            viewportRoot.style.left = mapOffset[0] + 'px';
+            viewportRoot.style.top = mapOffset[1] + 'px';
+
+            coordSys.setMapOffset(mapOffset);
+            bMapModel.__mapOffset = mapOffset;
+
+            api.dispatchAction({
+                type: 'bmapRoam'
+            });
+        };
+
+        function zoomEndHandler() {
+            if (rendering) {
+                return;
+            }
+            api.dispatchAction({
+                type: 'bmapRoam'
+            });
+        }
+
+        bmap.removeEventListener('moving', this._oldMoveHandler);
+        bmap.removeEventListener('moveend', this._oldMoveHandler);
+        bmap.removeEventListener('zoomend', this._oldZoomEndHandler);
+        bmap.addEventListener('moving', moveHandler);
+        bmap.addEventListener('moveend', moveHandler);
+        bmap.addEventListener('zoomend', zoomEndHandler);
+
+        this._oldMoveHandler = moveHandler;
+        this._oldZoomEndHandler = zoomEndHandler;
+
+        var roam = bMapModel.get('roam');
+        if (roam && roam !== 'scale') {
+            bmap.enableDragging();
+        }
+        else {
+            bmap.disableDragging();
+        }
+        if (roam && roam !== 'move') {
+            bmap.enableScrollWheelZoom();
+            bmap.enableDoubleClickZoom();
+            bmap.enablePinchToZoom();
+        }
+        else {
+            bmap.disableScrollWheelZoom();
+            bmap.disableDoubleClickZoom();
+            bmap.disablePinchToZoom();
+        }
+
+        /* map 2.0 */
+        var originalStyle = bMapModel.__mapStyle;
+
+        var newMapStyle = bMapModel.get('mapStyle') || {};
+        // FIXME, Not use JSON methods
+        var mapStyleStr = JSON.stringify(newMapStyle);
+        if (JSON.stringify(originalStyle) !== mapStyleStr) {
+            // FIXME May have blank tile when dragging if setMapStyle
+            if (!isEmptyObject(newMapStyle2)) {
+                bmap.setMapStyle(echarts.util.clone(newMapStyle));
+            }
+            bMapModel.__mapStyle = JSON.parse(mapStyleStr);
+        }
+
+        /* map 3.0 */
+        var originalStyle2 = bMapModel.__mapStyle2;
+
+        var newMapStyle2 = bMapModel.get('mapStyleV2') || {};
+        // FIXME, Not use JSON methods
+        var mapStyleStr2 = JSON.stringify(newMapStyle2);
+        if (JSON.stringify(originalStyle2) !== mapStyleStr2) {
+            // FIXME May have blank tile when dragging if setMapStyle
+            if (!isEmptyObject(newMapStyle2)) {
+                bmap.setMapStyleV2(echarts.util.clone(newMapStyle2));
+            }
+            bMapModel.__mapStyle2 = JSON.parse(mapStyleStr2);
+        }
+
+        rendering = false;
+    }
+});

+ 45 - 0
node_modules/echarts/extension-src/bmap/bmap.js

@@ -0,0 +1,45 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/**
+ * BMap component extension
+ */
+
+import * as echarts from 'echarts';
+import BMapCoordSys from './BMapCoordSys';
+
+import './BMapModel';
+import './BMapView';
+
+echarts.registerCoordinateSystem('bmap', BMapCoordSys);
+
+// Action
+echarts.registerAction({
+    type: 'bmapRoam',
+    event: 'bmapRoam',
+    update: 'updateLayout'
+}, function (payload, ecModel) {
+    ecModel.eachComponent('bmap', function (bMapModel) {
+        var bmap = bMapModel.getBMap();
+        var center = bmap.getCenter();
+        bMapModel.setCenterAndZoom([center.lng, center.lat], bmap.getZoom());
+    });
+});
+
+export var version = '1.0.0';

+ 221 - 0
node_modules/echarts/extension-src/dataTool/gexf.js

@@ -0,0 +1,221 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/**
+ * This is a parse of GEXF.
+ *
+ * The spec of GEXF:
+ * https://gephi.org/gexf/1.2draft/gexf-12draft-primer.pdf
+ */
+
+import * as zrUtil from 'zrender/src/core/util';
+
+export function parse(xml) {
+    var doc;
+    if (typeof xml === 'string') {
+        var parser = new DOMParser();
+        doc = parser.parseFromString(xml, 'text/xml');
+    }
+    else {
+        doc = xml;
+    }
+    if (!doc || doc.getElementsByTagName('parsererror').length) {
+        return null;
+    }
+
+    var gexfRoot = getChildByTagName(doc, 'gexf');
+
+    if (!gexfRoot) {
+        return null;
+    }
+
+    var graphRoot = getChildByTagName(gexfRoot, 'graph');
+
+    var attributes = parseAttributes(getChildByTagName(graphRoot, 'attributes'));
+    var attributesMap = {};
+    for (var i = 0; i < attributes.length; i++) {
+        attributesMap[attributes[i].id] = attributes[i];
+    }
+
+    return {
+        nodes: parseNodes(getChildByTagName(graphRoot, 'nodes'), attributesMap),
+        links: parseEdges(getChildByTagName(graphRoot, 'edges'))
+    };
+}
+
+function parseAttributes(parent) {
+    return parent ? zrUtil.map(getChildrenByTagName(parent, 'attribute'), function (attribDom) {
+        return {
+            id: getAttr(attribDom, 'id'),
+            title: getAttr(attribDom, 'title'),
+            type: getAttr(attribDom, 'type')
+        };
+    }) : [];
+}
+
+function parseNodes(parent, attributesMap) {
+    return parent ? zrUtil.map(getChildrenByTagName(parent, 'node'), function (nodeDom) {
+
+        var id = getAttr(nodeDom, 'id');
+        var label = getAttr(nodeDom, 'label');
+
+        var node = {
+            id: id,
+            name: label,
+            itemStyle: {
+                normal: {}
+            }
+        };
+
+        var vizSizeDom = getChildByTagName(nodeDom, 'viz:size');
+        var vizPosDom = getChildByTagName(nodeDom, 'viz:position');
+        var vizColorDom = getChildByTagName(nodeDom, 'viz:color');
+        // var vizShapeDom = getChildByTagName(nodeDom, 'viz:shape');
+
+        var attvaluesDom = getChildByTagName(nodeDom, 'attvalues');
+
+        if (vizSizeDom) {
+            node.symbolSize = parseFloat(getAttr(vizSizeDom, 'value'));
+        }
+        if (vizPosDom) {
+            node.x = parseFloat(getAttr(vizPosDom, 'x'));
+            node.y = parseFloat(getAttr(vizPosDom, 'y'));
+            // z
+        }
+        if (vizColorDom) {
+            node.itemStyle.normal.color = 'rgb(' + [
+                getAttr(vizColorDom, 'r') | 0,
+                getAttr(vizColorDom, 'g') | 0,
+                getAttr(vizColorDom, 'b') | 0
+            ].join(',') + ')';
+        }
+        // if (vizShapeDom) {
+            // node.shape = getAttr(vizShapeDom, 'shape');
+        // }
+        if (attvaluesDom) {
+            var attvalueDomList = getChildrenByTagName(attvaluesDom, 'attvalue');
+
+            node.attributes = {};
+
+            for (var j = 0; j < attvalueDomList.length; j++) {
+                var attvalueDom = attvalueDomList[j];
+                var attId = getAttr(attvalueDom, 'for');
+                var attValue = getAttr(attvalueDom, 'value');
+                var attribute = attributesMap[attId];
+
+                if (attribute) {
+                    switch (attribute.type) {
+                        case 'integer':
+                        case 'long':
+                            attValue = parseInt(attValue, 10);
+                            break;
+                        case 'float':
+                        case 'double':
+                            attValue = parseFloat(attValue);
+                            break;
+                        case 'boolean':
+                            attValue = attValue.toLowerCase() === 'true';
+                            break;
+                        default:
+                    }
+                    node.attributes[attId] = attValue;
+                }
+            }
+        }
+
+        return node;
+    }) : [];
+}
+
+function parseEdges(parent) {
+    return parent ? zrUtil.map(getChildrenByTagName(parent, 'edge'), function (edgeDom) {
+        var id = getAttr(edgeDom, 'id');
+        var label = getAttr(edgeDom, 'label');
+
+        var sourceId = getAttr(edgeDom, 'source');
+        var targetId = getAttr(edgeDom, 'target');
+
+        var edge = {
+            id: id,
+            name: label,
+            source: sourceId,
+            target: targetId,
+            lineStyle: {
+                normal: {}
+            }
+        };
+
+        var lineStyle = edge.lineStyle.normal;
+
+        var vizThicknessDom = getChildByTagName(edgeDom, 'viz:thickness');
+        var vizColorDom = getChildByTagName(edgeDom, 'viz:color');
+        // var vizShapeDom = getChildByTagName(edgeDom, 'viz:shape');
+
+        if (vizThicknessDom) {
+            lineStyle.width = parseFloat(vizThicknessDom.getAttribute('value'));
+        }
+        if (vizColorDom) {
+            lineStyle.color = 'rgb(' + [
+                getAttr(vizColorDom, 'r') | 0,
+                getAttr(vizColorDom, 'g') | 0,
+                getAttr(vizColorDom, 'b') | 0
+            ].join(',') + ')';
+        }
+        // if (vizShapeDom) {
+        //     edge.shape = vizShapeDom.getAttribute('shape');
+        // }
+
+        return edge;
+    }) : [];
+}
+
+function getAttr(el, attrName) {
+    return el.getAttribute(attrName);
+}
+
+function getChildByTagName(parent, tagName) {
+    var node = parent.firstChild;
+
+    while (node) {
+        if (
+            node.nodeType !== 1
+            || node.nodeName.toLowerCase() !== tagName.toLowerCase()
+        ) {
+            node = node.nextSibling;
+        }
+        else {
+            return node;
+        }
+    }
+
+    return null;
+}
+
+function getChildrenByTagName(parent, tagName) {
+    var node = parent.firstChild;
+    var children = [];
+    while (node) {
+        if (node.nodeName.toLowerCase() === tagName.toLowerCase()) {
+            children.push(node);
+        }
+        node = node.nextSibling;
+    }
+
+    return children;
+}

+ 38 - 0
node_modules/echarts/extension-src/dataTool/index.js

@@ -0,0 +1,38 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+import * as echarts from 'echarts';
+import * as gexf from './gexf';
+import prepareBoxplotData from './prepareBoxplotData';
+
+export var version = '1.0.0';
+
+export {gexf};
+
+export {prepareBoxplotData};
+
+// For backward compatibility, where the namespace `dataTool` will
+// be mounted on `echarts` is the extension `dataTool` is imported.
+// But the old version of echarts do not have `dataTool` namespace,
+// so check it before mounting.
+if (echarts.dataTool) {
+    echarts.dataTool.version = version;
+    echarts.dataTool.gexf = gexf;
+    echarts.dataTool.prepareBoxplotData = prepareBoxplotData;
+}

+ 91 - 0
node_modules/echarts/extension-src/dataTool/prepareBoxplotData.js

@@ -0,0 +1,91 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+import * as numberUtil from '../../src/util/number';
+
+/**
+ * See:
+ *  <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2>
+ *  <http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html>
+ *
+ * Helper method for preparing data.
+ *
+ * @param {Array.<number>} rawData like
+ *        [
+ *            [12,232,443], (raw data set for the first box)
+ *            [3843,5545,1232], (raw datat set for the second box)
+ *            ...
+ *        ]
+ * @param {Object} [opt]
+ *
+ * @param {(number|string)} [opt.boundIQR=1.5] Data less than min bound is outlier.
+ *      default 1.5, means Q1 - 1.5 * (Q3 - Q1).
+ *      If 'none'/0 passed, min bound will not be used.
+ * @param {(number|string)} [opt.layout='horizontal']
+ *      Box plot layout, can be 'horizontal' or 'vertical'
+ * @return {Object} {
+ *      boxData: Array.<Array.<number>>
+ *      outliers: Array.<Array.<number>>
+ *      axisData: Array.<string>
+ * }
+ */
+export default function (rawData, opt) {
+    opt = opt || [];
+    var boxData = [];
+    var outliers = [];
+    var axisData = [];
+    var boundIQR = opt.boundIQR;
+    var useExtreme = boundIQR === 'none' || boundIQR === 0;
+
+    for (var i = 0; i < rawData.length; i++) {
+        axisData.push(i + '');
+        var ascList = numberUtil.asc(rawData[i].slice());
+
+        var Q1 = numberUtil.quantile(ascList, 0.25);
+        var Q2 = numberUtil.quantile(ascList, 0.5);
+        var Q3 = numberUtil.quantile(ascList, 0.75);
+        var min = ascList[0];
+        var max = ascList[ascList.length - 1];
+
+        var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1);
+
+        var low = useExtreme
+            ? min
+            : Math.max(min, Q1 - bound);
+        var high = useExtreme
+            ? max
+            : Math.min(max, Q3 + bound);
+
+        boxData.push([low, Q1, Q2, Q3, high]);
+
+        for (var j = 0; j < ascList.length; j++) {
+            var dataItem = ascList[j];
+            if (dataItem < low || dataItem > high) {
+                var outlier = [i, dataItem];
+                opt.layout === 'vertical' && outlier.reverse();
+                outliers.push(outlier);
+            }
+        }
+    }
+    return {
+        boxData: boxData,
+        outliers: outliers,
+        axisData: axisData
+    };
+}

BIN
node_modules/echarts/extension/.DS_Store


+ 255 - 0
node_modules/echarts/extension/bmap/BMapCoordSys.js

@@ -0,0 +1,255 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var _echarts = require("echarts");
+
+var zrUtil = _echarts.util;
+var graphic = _echarts.graphic;
+var matrix = _echarts.matrix;
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/* global BMap */
+function BMapCoordSys(bmap, api) {
+  this._bmap = bmap;
+  this.dimensions = ['lng', 'lat'];
+  this._mapOffset = [0, 0];
+  this._api = api;
+  this._projection = new BMap.MercatorProjection();
+}
+
+BMapCoordSys.prototype.dimensions = ['lng', 'lat'];
+
+BMapCoordSys.prototype.setZoom = function (zoom) {
+  this._zoom = zoom;
+};
+
+BMapCoordSys.prototype.setCenter = function (center) {
+  this._center = this._projection.lngLatToPoint(new BMap.Point(center[0], center[1]));
+};
+
+BMapCoordSys.prototype.setMapOffset = function (mapOffset) {
+  this._mapOffset = mapOffset;
+};
+
+BMapCoordSys.prototype.getBMap = function () {
+  return this._bmap;
+};
+
+BMapCoordSys.prototype.dataToPoint = function (data) {
+  var point = new BMap.Point(data[0], data[1]); // TODO mercator projection is toooooooo slow
+  // var mercatorPoint = this._projection.lngLatToPoint(point);
+  // var width = this._api.getZr().getWidth();
+  // var height = this._api.getZr().getHeight();
+  // var divider = Math.pow(2, 18 - 10);
+  // return [
+  //     Math.round((mercatorPoint.x - this._center.x) / divider + width / 2),
+  //     Math.round((this._center.y - mercatorPoint.y) / divider + height / 2)
+  // ];
+
+  var px = this._bmap.pointToOverlayPixel(point);
+
+  var mapOffset = this._mapOffset;
+  return [px.x - mapOffset[0], px.y - mapOffset[1]];
+};
+
+BMapCoordSys.prototype.pointToData = function (pt) {
+  var mapOffset = this._mapOffset;
+
+  var pt = this._bmap.overlayPixelToPoint({
+    x: pt[0] + mapOffset[0],
+    y: pt[1] + mapOffset[1]
+  });
+
+  return [pt.lng, pt.lat];
+};
+
+BMapCoordSys.prototype.getViewRect = function () {
+  var api = this._api;
+  return new graphic.BoundingRect(0, 0, api.getWidth(), api.getHeight());
+};
+
+BMapCoordSys.prototype.getRoamTransform = function () {
+  return matrix.create();
+};
+
+BMapCoordSys.prototype.prepareCustoms = function (data) {
+  var rect = this.getViewRect();
+  return {
+    coordSys: {
+      // The name exposed to user is always 'cartesian2d' but not 'grid'.
+      type: 'bmap',
+      x: rect.x,
+      y: rect.y,
+      width: rect.width,
+      height: rect.height
+    },
+    api: {
+      coord: zrUtil.bind(this.dataToPoint, this),
+      size: zrUtil.bind(dataToCoordSize, this)
+    }
+  };
+};
+
+function dataToCoordSize(dataSize, dataItem) {
+  dataItem = dataItem || [0, 0];
+  return zrUtil.map([0, 1], function (dimIdx) {
+    var val = dataItem[dimIdx];
+    var halfSize = dataSize[dimIdx] / 2;
+    var p1 = [];
+    var p2 = [];
+    p1[dimIdx] = val - halfSize;
+    p2[dimIdx] = val + halfSize;
+    p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx];
+    return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]);
+  }, this);
+}
+
+var Overlay; // For deciding which dimensions to use when creating list data
+
+BMapCoordSys.dimensions = BMapCoordSys.prototype.dimensions;
+
+function createOverlayCtor() {
+  function Overlay(root) {
+    this._root = root;
+  }
+
+  Overlay.prototype = new BMap.Overlay();
+  /**
+   * 初始化
+   *
+   * @param {BMap.Map} map
+   * @override
+   */
+
+  Overlay.prototype.initialize = function (map) {
+    map.getPanes().labelPane.appendChild(this._root);
+    return this._root;
+  };
+  /**
+   * @override
+   */
+
+
+  Overlay.prototype.draw = function () {};
+
+  return Overlay;
+}
+
+BMapCoordSys.create = function (ecModel, api) {
+  var bmapCoordSys;
+  var root = api.getDom(); // TODO Dispose
+
+  ecModel.eachComponent('bmap', function (bmapModel) {
+    var painter = api.getZr().painter;
+    var viewportRoot = painter.getViewportRoot();
+
+    if (typeof BMap === 'undefined') {
+      throw new Error('BMap api is not loaded');
+    }
+
+    Overlay = Overlay || createOverlayCtor();
+
+    if (bmapCoordSys) {
+      throw new Error('Only one bmap component can exist');
+    }
+
+    if (!bmapModel.__bmap) {
+      // Not support IE8
+      var bmapRoot = root.querySelector('.ec-extension-bmap');
+
+      if (bmapRoot) {
+        // Reset viewport left and top, which will be changed
+        // in moving handler in BMapView
+        viewportRoot.style.left = '0px';
+        viewportRoot.style.top = '0px';
+        root.removeChild(bmapRoot);
+      }
+
+      bmapRoot = document.createElement('div');
+      bmapRoot.style.cssText = 'width:100%;height:100%'; // Not support IE8
+
+      bmapRoot.classList.add('ec-extension-bmap');
+      root.appendChild(bmapRoot); // initialize bmap
+
+      var mapOptions = bmapModel.get('mapOptions') || {}; // Not support `mapType`, use `bmap.setMapType(MapType)` instead.
+
+      delete mapOptions.mapType;
+      var bmap = bmapModel.__bmap = new BMap.Map(bmapRoot, mapOptions);
+      var overlay = new Overlay(viewportRoot);
+      bmap.addOverlay(overlay); // Override
+
+      painter.getViewportRootOffset = function () {
+        return {
+          offsetLeft: 0,
+          offsetTop: 0
+        };
+      };
+    }
+
+    var bmap = bmapModel.__bmap; // Set bmap options
+    // centerAndZoom before layout and render
+
+    var center = bmapModel.get('center');
+    var zoom = bmapModel.get('zoom');
+
+    if (center && zoom) {
+      var bmapCenter = bmap.getCenter();
+      var bmapZoom = bmap.getZoom();
+      var centerOrZoomChanged = bmapModel.centerOrZoomChanged([bmapCenter.lng, bmapCenter.lat], bmapZoom);
+
+      if (centerOrZoomChanged) {
+        var pt = new BMap.Point(center[0], center[1]);
+        bmap.centerAndZoom(pt, zoom);
+      }
+    }
+
+    bmapCoordSys = new BMapCoordSys(bmap, api);
+    bmapCoordSys.setMapOffset(bmapModel.__mapOffset || [0, 0]);
+    bmapCoordSys.setZoom(zoom);
+    bmapCoordSys.setCenter(center);
+    bmapModel.coordinateSystem = bmapCoordSys;
+  });
+  ecModel.eachSeries(function (seriesModel) {
+    if (seriesModel.get('coordinateSystem') === 'bmap') {
+      seriesModel.coordinateSystem = bmapCoordSys;
+    }
+  });
+};
+
+var _default = BMapCoordSys;
+module.exports = _default;

+ 72 - 0
node_modules/echarts/extension/bmap/BMapModel.js

@@ -0,0 +1,72 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var echarts = require("echarts");
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+function v2Equal(a, b) {
+  return a && b && a[0] === b[0] && a[1] === b[1];
+}
+
+var _default = echarts.extendComponentModel({
+  type: 'bmap',
+  getBMap: function () {
+    // __bmap is injected when creating BMapCoordSys
+    return this.__bmap;
+  },
+  setCenterAndZoom: function (center, zoom) {
+    this.option.center = center;
+    this.option.zoom = zoom;
+  },
+  centerOrZoomChanged: function (center, zoom) {
+    var option = this.option;
+    return !(v2Equal(center, option.center) && zoom === option.zoom);
+  },
+  defaultOption: {
+    center: [104.114129, 37.550339],
+    zoom: 5,
+    // 2.0 http://lbsyun.baidu.com/custom/index.htm
+    mapStyle: {},
+    // 3.0 http://lbsyun.baidu.com/index.php?title=open/custom
+    mapStyleV2: {},
+    // See https://lbsyun.baidu.com/cms/jsapi/reference/jsapi_reference.html#a0b1
+    mapOptions: {},
+    roam: false
+  }
+});
+
+module.exports = _default;

+ 147 - 0
node_modules/echarts/extension/bmap/BMapView.js

@@ -0,0 +1,147 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var echarts = require("echarts");
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+function isEmptyObject(obj) {
+  for (var key in obj) {
+    if (obj.hasOwnProperty(key)) {
+      return false;
+    }
+  }
+
+  return true;
+}
+
+var _default = echarts.extendComponentView({
+  type: 'bmap',
+  render: function (bMapModel, ecModel, api) {
+    var rendering = true;
+    var bmap = bMapModel.getBMap();
+    var viewportRoot = api.getZr().painter.getViewportRoot();
+    var coordSys = bMapModel.coordinateSystem;
+
+    var moveHandler = function (type, target) {
+      if (rendering) {
+        return;
+      }
+
+      var offsetEl = viewportRoot.parentNode.parentNode.parentNode;
+      var mapOffset = [-parseInt(offsetEl.style.left, 10) || 0, -parseInt(offsetEl.style.top, 10) || 0];
+      viewportRoot.style.left = mapOffset[0] + 'px';
+      viewportRoot.style.top = mapOffset[1] + 'px';
+      coordSys.setMapOffset(mapOffset);
+      bMapModel.__mapOffset = mapOffset;
+      api.dispatchAction({
+        type: 'bmapRoam'
+      });
+    };
+
+    function zoomEndHandler() {
+      if (rendering) {
+        return;
+      }
+
+      api.dispatchAction({
+        type: 'bmapRoam'
+      });
+    }
+
+    bmap.removeEventListener('moving', this._oldMoveHandler);
+    bmap.removeEventListener('moveend', this._oldMoveHandler);
+    bmap.removeEventListener('zoomend', this._oldZoomEndHandler);
+    bmap.addEventListener('moving', moveHandler);
+    bmap.addEventListener('moveend', moveHandler);
+    bmap.addEventListener('zoomend', zoomEndHandler);
+    this._oldMoveHandler = moveHandler;
+    this._oldZoomEndHandler = zoomEndHandler;
+    var roam = bMapModel.get('roam');
+
+    if (roam && roam !== 'scale') {
+      bmap.enableDragging();
+    } else {
+      bmap.disableDragging();
+    }
+
+    if (roam && roam !== 'move') {
+      bmap.enableScrollWheelZoom();
+      bmap.enableDoubleClickZoom();
+      bmap.enablePinchToZoom();
+    } else {
+      bmap.disableScrollWheelZoom();
+      bmap.disableDoubleClickZoom();
+      bmap.disablePinchToZoom();
+    }
+    /* map 2.0 */
+
+
+    var originalStyle = bMapModel.__mapStyle;
+    var newMapStyle = bMapModel.get('mapStyle') || {}; // FIXME, Not use JSON methods
+
+    var mapStyleStr = JSON.stringify(newMapStyle);
+
+    if (JSON.stringify(originalStyle) !== mapStyleStr) {
+      // FIXME May have blank tile when dragging if setMapStyle
+      if (!isEmptyObject(newMapStyle2)) {
+        bmap.setMapStyle(echarts.util.clone(newMapStyle));
+      }
+
+      bMapModel.__mapStyle = JSON.parse(mapStyleStr);
+    }
+    /* map 3.0 */
+
+
+    var originalStyle2 = bMapModel.__mapStyle2;
+    var newMapStyle2 = bMapModel.get('mapStyleV2') || {}; // FIXME, Not use JSON methods
+
+    var mapStyleStr2 = JSON.stringify(newMapStyle2);
+
+    if (JSON.stringify(originalStyle2) !== mapStyleStr2) {
+      // FIXME May have blank tile when dragging if setMapStyle
+      if (!isEmptyObject(newMapStyle2)) {
+        bmap.setMapStyleV2(echarts.util.clone(newMapStyle2));
+      }
+
+      bMapModel.__mapStyle2 = JSON.parse(mapStyleStr2);
+    }
+
+    rendering = false;
+  }
+});
+
+module.exports = _default;

+ 72 - 0
node_modules/echarts/extension/bmap/README.md

@@ -0,0 +1,72 @@
+## 百度地图扩展
+
+ECharts 百度地图扩展,可以在百度地图上展现 [点图](http://echarts.baidu.com/option.html#series-scatter),[线图](http://echarts.baidu.com/option.html#series-line),[热力图](http://echarts.baidu.com/option.html#series-heatmap) 等可视化。
+
+
+### 示例
+
+[全国主要城市空气质量](http://echarts.baidu.com/demo.html#effectScatter-bmap)
+
+[北京公交路线](http://echarts.baidu.com/demo.html#lines-bmap-bus)
+
+[北京公交路线特效](http://echarts.baidu.com/demo.html#lines-bmap-effect)
+
+[北京公交路线特效](http://echarts.baidu.com/demo.html#lines-bmap-effect)
+
+[杭州热门步行路线](http://echarts.baidu.com/demo.html#heatmap-bmap)
+
+
+### 引入
+
+可以直接引入打包好的扩展文件和百度地图的 jssdk
+
+```html
+<!--引入百度地图的jssdk,这里需要使用你在百度地图开发者平台申请的 ak-->
+<script src="http://api.map.baidu.com/api?v=2.0&ak="></script>
+<!-- 引入 ECharts -->
+<script src="dist/echarts.min.js"></script>
+<!-- 引入百度地图扩展 -->
+<script src="dist/extension/bmap.min.js"></script>
+```
+
+如果是 webpack 打包,也可以 require 引入
+
+```js
+require('echarts');
+require('echarts/extension/bmap/bmap');
+```
+
+插件会自动注册相应的组件。
+
+### 使用
+
+扩展主要提供了跟 geo 一样的坐标系和底图的绘制,因此配置方式非常简单,如下
+
+```js
+option = {
+    // 加载 bmap 组件
+    bmap: {
+        // 百度地图中心经纬度
+        center: [120.13066322374, 30.240018034923],
+        // 百度地图缩放
+        zoom: 14,
+        // 是否开启拖拽缩放,可以只设置 'scale' 或者 'move'
+        roam: true,
+        // 百度地图的自定义样式,见 http://developer.baidu.com/map/jsdevelop-11.htm
+        mapStyle: {}
+    },
+    series: [{
+        type: 'scatter',
+        // 使用百度地图坐标系
+        coordinateSystem: 'bmap',
+        // 数据格式跟在 geo 坐标系上一样,每一项都是 [经度,纬度,数值大小,其它维度...]
+        data: [ [120, 30, 1] ]
+    }]
+}
+
+// 获取百度地图实例,使用百度地图自带的控件
+var bmap = chart.getModel().getComponent('bmap').getBMap();
+bmap.addControl(new BMap.MapTypeControl());
+```
+
+

+ 65 - 0
node_modules/echarts/extension/bmap/bmap.js

@@ -0,0 +1,65 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var echarts = require("echarts");
+
+var BMapCoordSys = require("./BMapCoordSys");
+
+require("./BMapModel");
+
+require("./BMapView");
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/**
+ * BMap component extension
+ */
+echarts.registerCoordinateSystem('bmap', BMapCoordSys); // Action
+
+echarts.registerAction({
+  type: 'bmapRoam',
+  event: 'bmapRoam',
+  update: 'updateLayout'
+}, function (payload, ecModel) {
+  ecModel.eachComponent('bmap', function (bMapModel) {
+    var bmap = bMapModel.getBMap();
+    var center = bmap.getCenter();
+    bMapModel.setCenterAndZoom([center.lng, center.lat], bmap.getZoom());
+  });
+});
+var version = '1.0.0';
+exports.version = version;

+ 230 - 0
node_modules/echarts/extension/dataTool/gexf.js

@@ -0,0 +1,230 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var zrUtil = require("zrender/lib/core/util");
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/**
+ * This is a parse of GEXF.
+ *
+ * The spec of GEXF:
+ * https://gephi.org/gexf/1.2draft/gexf-12draft-primer.pdf
+ */
+function parse(xml) {
+  var doc;
+
+  if (typeof xml === 'string') {
+    var parser = new DOMParser();
+    doc = parser.parseFromString(xml, 'text/xml');
+  } else {
+    doc = xml;
+  }
+
+  if (!doc || doc.getElementsByTagName('parsererror').length) {
+    return null;
+  }
+
+  var gexfRoot = getChildByTagName(doc, 'gexf');
+
+  if (!gexfRoot) {
+    return null;
+  }
+
+  var graphRoot = getChildByTagName(gexfRoot, 'graph');
+  var attributes = parseAttributes(getChildByTagName(graphRoot, 'attributes'));
+  var attributesMap = {};
+
+  for (var i = 0; i < attributes.length; i++) {
+    attributesMap[attributes[i].id] = attributes[i];
+  }
+
+  return {
+    nodes: parseNodes(getChildByTagName(graphRoot, 'nodes'), attributesMap),
+    links: parseEdges(getChildByTagName(graphRoot, 'edges'))
+  };
+}
+
+function parseAttributes(parent) {
+  return parent ? zrUtil.map(getChildrenByTagName(parent, 'attribute'), function (attribDom) {
+    return {
+      id: getAttr(attribDom, 'id'),
+      title: getAttr(attribDom, 'title'),
+      type: getAttr(attribDom, 'type')
+    };
+  }) : [];
+}
+
+function parseNodes(parent, attributesMap) {
+  return parent ? zrUtil.map(getChildrenByTagName(parent, 'node'), function (nodeDom) {
+    var id = getAttr(nodeDom, 'id');
+    var label = getAttr(nodeDom, 'label');
+    var node = {
+      id: id,
+      name: label,
+      itemStyle: {
+        normal: {}
+      }
+    };
+    var vizSizeDom = getChildByTagName(nodeDom, 'viz:size');
+    var vizPosDom = getChildByTagName(nodeDom, 'viz:position');
+    var vizColorDom = getChildByTagName(nodeDom, 'viz:color'); // var vizShapeDom = getChildByTagName(nodeDom, 'viz:shape');
+
+    var attvaluesDom = getChildByTagName(nodeDom, 'attvalues');
+
+    if (vizSizeDom) {
+      node.symbolSize = parseFloat(getAttr(vizSizeDom, 'value'));
+    }
+
+    if (vizPosDom) {
+      node.x = parseFloat(getAttr(vizPosDom, 'x'));
+      node.y = parseFloat(getAttr(vizPosDom, 'y')); // z
+    }
+
+    if (vizColorDom) {
+      node.itemStyle.normal.color = 'rgb(' + [getAttr(vizColorDom, 'r') | 0, getAttr(vizColorDom, 'g') | 0, getAttr(vizColorDom, 'b') | 0].join(',') + ')';
+    } // if (vizShapeDom) {
+    // node.shape = getAttr(vizShapeDom, 'shape');
+    // }
+
+
+    if (attvaluesDom) {
+      var attvalueDomList = getChildrenByTagName(attvaluesDom, 'attvalue');
+      node.attributes = {};
+
+      for (var j = 0; j < attvalueDomList.length; j++) {
+        var attvalueDom = attvalueDomList[j];
+        var attId = getAttr(attvalueDom, 'for');
+        var attValue = getAttr(attvalueDom, 'value');
+        var attribute = attributesMap[attId];
+
+        if (attribute) {
+          switch (attribute.type) {
+            case 'integer':
+            case 'long':
+              attValue = parseInt(attValue, 10);
+              break;
+
+            case 'float':
+            case 'double':
+              attValue = parseFloat(attValue);
+              break;
+
+            case 'boolean':
+              attValue = attValue.toLowerCase() === 'true';
+              break;
+
+            default:
+          }
+
+          node.attributes[attId] = attValue;
+        }
+      }
+    }
+
+    return node;
+  }) : [];
+}
+
+function parseEdges(parent) {
+  return parent ? zrUtil.map(getChildrenByTagName(parent, 'edge'), function (edgeDom) {
+    var id = getAttr(edgeDom, 'id');
+    var label = getAttr(edgeDom, 'label');
+    var sourceId = getAttr(edgeDom, 'source');
+    var targetId = getAttr(edgeDom, 'target');
+    var edge = {
+      id: id,
+      name: label,
+      source: sourceId,
+      target: targetId,
+      lineStyle: {
+        normal: {}
+      }
+    };
+    var lineStyle = edge.lineStyle.normal;
+    var vizThicknessDom = getChildByTagName(edgeDom, 'viz:thickness');
+    var vizColorDom = getChildByTagName(edgeDom, 'viz:color'); // var vizShapeDom = getChildByTagName(edgeDom, 'viz:shape');
+
+    if (vizThicknessDom) {
+      lineStyle.width = parseFloat(vizThicknessDom.getAttribute('value'));
+    }
+
+    if (vizColorDom) {
+      lineStyle.color = 'rgb(' + [getAttr(vizColorDom, 'r') | 0, getAttr(vizColorDom, 'g') | 0, getAttr(vizColorDom, 'b') | 0].join(',') + ')';
+    } // if (vizShapeDom) {
+    //     edge.shape = vizShapeDom.getAttribute('shape');
+    // }
+
+
+    return edge;
+  }) : [];
+}
+
+function getAttr(el, attrName) {
+  return el.getAttribute(attrName);
+}
+
+function getChildByTagName(parent, tagName) {
+  var node = parent.firstChild;
+
+  while (node) {
+    if (node.nodeType !== 1 || node.nodeName.toLowerCase() !== tagName.toLowerCase()) {
+      node = node.nextSibling;
+    } else {
+      return node;
+    }
+  }
+
+  return null;
+}
+
+function getChildrenByTagName(parent, tagName) {
+  var node = parent.firstChild;
+  var children = [];
+
+  while (node) {
+    if (node.nodeName.toLowerCase() === tagName.toLowerCase()) {
+      children.push(node);
+    }
+
+    node = node.nextSibling;
+  }
+
+  return children;
+}
+
+exports.parse = parse;

+ 61 - 0
node_modules/echarts/extension/dataTool/index.js

@@ -0,0 +1,61 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var echarts = require("echarts");
+
+var gexf = require("./gexf");
+
+exports.gexf = gexf;
+
+var prepareBoxplotData = require("./prepareBoxplotData");
+
+exports.prepareBoxplotData = prepareBoxplotData;
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+var version = '1.0.0';
+
+// For backward compatibility, where the namespace `dataTool` will
+// be mounted on `echarts` is the extension `dataTool` is imported.
+// But the old version of echarts do not have `dataTool` namespace,
+// so check it before mounting.
+if (echarts.dataTool) {
+  echarts.dataTool.version = version;
+  echarts.dataTool.gexf = gexf;
+  echarts.dataTool.prepareBoxplotData = prepareBoxplotData;
+}
+
+exports.version = version;

+ 107 - 0
node_modules/echarts/extension/dataTool/prepareBoxplotData.js

@@ -0,0 +1,107 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var numberUtil = require("../../lib/util/number");
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/**
+ * See:
+ *  <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2>
+ *  <http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html>
+ *
+ * Helper method for preparing data.
+ *
+ * @param {Array.<number>} rawData like
+ *        [
+ *            [12,232,443], (raw data set for the first box)
+ *            [3843,5545,1232], (raw datat set for the second box)
+ *            ...
+ *        ]
+ * @param {Object} [opt]
+ *
+ * @param {(number|string)} [opt.boundIQR=1.5] Data less than min bound is outlier.
+ *      default 1.5, means Q1 - 1.5 * (Q3 - Q1).
+ *      If 'none'/0 passed, min bound will not be used.
+ * @param {(number|string)} [opt.layout='horizontal']
+ *      Box plot layout, can be 'horizontal' or 'vertical'
+ * @return {Object} {
+ *      boxData: Array.<Array.<number>>
+ *      outliers: Array.<Array.<number>>
+ *      axisData: Array.<string>
+ * }
+ */
+function _default(rawData, opt) {
+  opt = opt || [];
+  var boxData = [];
+  var outliers = [];
+  var axisData = [];
+  var boundIQR = opt.boundIQR;
+  var useExtreme = boundIQR === 'none' || boundIQR === 0;
+
+  for (var i = 0; i < rawData.length; i++) {
+    axisData.push(i + '');
+    var ascList = numberUtil.asc(rawData[i].slice());
+    var Q1 = numberUtil.quantile(ascList, 0.25);
+    var Q2 = numberUtil.quantile(ascList, 0.5);
+    var Q3 = numberUtil.quantile(ascList, 0.75);
+    var min = ascList[0];
+    var max = ascList[ascList.length - 1];
+    var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1);
+    var low = useExtreme ? min : Math.max(min, Q1 - bound);
+    var high = useExtreme ? max : Math.min(max, Q3 + bound);
+    boxData.push([low, Q1, Q2, Q3, high]);
+
+    for (var j = 0; j < ascList.length; j++) {
+      var dataItem = ascList[j];
+
+      if (dataItem < low || dataItem > high) {
+        var outlier = [i, dataItem];
+        opt.layout === 'vertical' && outlier.reverse();
+        outliers.push(outlier);
+      }
+    }
+  }
+
+  return {
+    boxData: boxData,
+    outliers: outliers,
+    axisData: axisData
+  };
+}
+
+module.exports = _default;

+ 20 - 0
node_modules/echarts/extension/echarts.js

@@ -0,0 +1,20 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+define('echarts', [], function () {return echarts;});

+ 36 - 0
node_modules/echarts/extension/webpack.config.js

@@ -0,0 +1,36 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var PROD = process.argv.indexOf('-p') >= 0;
+
+module.exports = {
+    entry: {
+        'bmap': __dirname + '/../extension/bmap/bmap.js',
+        'dataTool': __dirname + '/../extension/dataTool'
+    },
+    output: {
+        libraryTarget: 'umd',
+        library: ['echarts', '[name]'],
+        path: __dirname + '/../dist/extension',
+        filename: PROD ? '[name].min.js' : '[name].js'
+    },
+    externals: {
+        'echarts': 'echarts'
+    }
+};

+ 73 - 0
node_modules/echarts/index.common.js

@@ -0,0 +1,73 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var _echarts = require("./lib/echarts");
+
+(function () {
+  for (var key in _echarts) {
+    if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
+    exports[key] = _echarts[key];
+  }
+})();
+
+var _export = require("./lib/export");
+
+(function () {
+  for (var key in _export) {
+    if (_export == null || !_export.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
+    exports[key] = _export[key];
+  }
+})();
+
+require("./lib/component/dataset");
+
+require("./lib/chart/line");
+
+require("./lib/chart/bar");
+
+require("./lib/chart/pie");
+
+require("./lib/chart/scatter");
+
+require("./lib/component/graphic");
+
+require("./lib/component/tooltip");
+
+require("./lib/component/axisPointer");
+
+require("./lib/component/legendScroll");
+
+require("./lib/component/grid");
+
+require("./lib/component/title");
+
+require("./lib/component/markPoint");
+
+require("./lib/component/markLine");
+
+require("./lib/component/markArea");
+
+require("./lib/component/dataZoom");
+
+require("./lib/component/toolbox");
+
+require("zrender/lib/vml/vml");
+
+require("zrender/lib/svg/svg");

+ 135 - 0
node_modules/echarts/index.js

@@ -0,0 +1,135 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var _echarts = require("./lib/echarts");
+
+(function () {
+  for (var key in _echarts) {
+    if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
+    exports[key] = _echarts[key];
+  }
+})();
+
+var _export = require("./lib/export");
+
+(function () {
+  for (var key in _export) {
+    if (_export == null || !_export.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
+    exports[key] = _export[key];
+  }
+})();
+
+require("./lib/component/dataset");
+
+require("./lib/chart/line");
+
+require("./lib/chart/bar");
+
+require("./lib/chart/pie");
+
+require("./lib/chart/scatter");
+
+require("./lib/chart/radar");
+
+require("./lib/chart/map");
+
+require("./lib/chart/tree");
+
+require("./lib/chart/treemap");
+
+require("./lib/chart/graph");
+
+require("./lib/chart/gauge");
+
+require("./lib/chart/funnel");
+
+require("./lib/chart/parallel");
+
+require("./lib/chart/sankey");
+
+require("./lib/chart/boxplot");
+
+require("./lib/chart/candlestick");
+
+require("./lib/chart/effectScatter");
+
+require("./lib/chart/lines");
+
+require("./lib/chart/heatmap");
+
+require("./lib/chart/pictorialBar");
+
+require("./lib/chart/themeRiver");
+
+require("./lib/chart/sunburst");
+
+require("./lib/chart/custom");
+
+require("./lib/component/grid");
+
+require("./lib/component/polar");
+
+require("./lib/component/geo");
+
+require("./lib/component/singleAxis");
+
+require("./lib/component/parallel");
+
+require("./lib/component/calendar");
+
+require("./lib/component/graphic");
+
+require("./lib/component/toolbox");
+
+require("./lib/component/tooltip");
+
+require("./lib/component/axisPointer");
+
+require("./lib/component/brush");
+
+require("./lib/component/title");
+
+require("./lib/component/timeline");
+
+require("./lib/component/markPoint");
+
+require("./lib/component/markLine");
+
+require("./lib/component/markArea");
+
+require("./lib/component/legendScroll");
+
+require("./lib/component/legend");
+
+require("./lib/component/dataZoom");
+
+require("./lib/component/dataZoomInside");
+
+require("./lib/component/dataZoomSlider");
+
+require("./lib/component/visualMap");
+
+require("./lib/component/visualMapContinuous");
+
+require("./lib/component/visualMapPiecewise");
+
+require("zrender/lib/vml/vml");
+
+require("zrender/lib/svg/svg");

+ 38 - 0
node_modules/echarts/index.simple.js

@@ -0,0 +1,38 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var _echarts = require("./lib/echarts");
+
+(function () {
+  for (var key in _echarts) {
+    if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
+    exports[key] = _echarts[key];
+  }
+})();
+
+require("./lib/component/dataset");
+
+require("./lib/chart/line");
+
+require("./lib/chart/bar");
+
+require("./lib/chart/pie");
+
+require("./lib/component/gridSimple");

+ 76 - 0
node_modules/echarts/lib/CoordinateSystem.js

@@ -0,0 +1,76 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var zrUtil = require("zrender/lib/core/util");
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+var coordinateSystemCreators = {};
+
+function CoordinateSystemManager() {
+  this._coordinateSystems = [];
+}
+
+CoordinateSystemManager.prototype = {
+  constructor: CoordinateSystemManager,
+  create: function (ecModel, api) {
+    var coordinateSystems = [];
+    zrUtil.each(coordinateSystemCreators, function (creater, type) {
+      var list = creater.create(ecModel, api);
+      coordinateSystems = coordinateSystems.concat(list || []);
+    });
+    this._coordinateSystems = coordinateSystems;
+  },
+  update: function (ecModel, api) {
+    zrUtil.each(this._coordinateSystems, function (coordSys) {
+      coordSys.update && coordSys.update(ecModel, api);
+    });
+  },
+  getCoordinateSystems: function () {
+    return this._coordinateSystems.slice();
+  }
+};
+
+CoordinateSystemManager.register = function (type, coordinateSystemCreator) {
+  coordinateSystemCreators[type] = coordinateSystemCreator;
+};
+
+CoordinateSystemManager.get = function (type) {
+  return coordinateSystemCreators[type];
+};
+
+var _default = CoordinateSystemManager;
+module.exports = _default;

+ 50 - 0
node_modules/echarts/lib/ExtensionAPI.js

@@ -0,0 +1,50 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var zrUtil = require("zrender/lib/core/util");
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+var echartsAPIList = ['getDom', 'getZr', 'getWidth', 'getHeight', 'getDevicePixelRatio', 'dispatchAction', 'isDisposed', 'on', 'off', 'getDataURL', 'getConnectedDataURL', 'getModel', 'getOption', 'getViewOfComponentModel', 'getViewOfSeriesModel']; // And `getCoordinateSystems` and `getComponentByElement` will be injected in echarts.js
+
+function ExtensionAPI(chartInstance) {
+  zrUtil.each(echartsAPIList, function (name) {
+    this[name] = zrUtil.bind(chartInstance[name], chartInstance);
+  }, this);
+}
+
+var _default = ExtensionAPI;
+module.exports = _default;

+ 79 - 0
node_modules/echarts/lib/action/createDataSelectAction.js

@@ -0,0 +1,79 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var echarts = require("../echarts");
+
+var zrUtil = require("zrender/lib/core/util");
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+function _default(seriesType, actionInfos) {
+  zrUtil.each(actionInfos, function (actionInfo) {
+    actionInfo.update = 'updateView';
+    /**
+     * @payload
+     * @property {string} seriesName
+     * @property {string} name
+     */
+
+    echarts.registerAction(actionInfo, function (payload, ecModel) {
+      var selected = {};
+      ecModel.eachComponent({
+        mainType: 'series',
+        subType: seriesType,
+        query: payload
+      }, function (seriesModel) {
+        if (seriesModel[actionInfo.method]) {
+          seriesModel[actionInfo.method](payload.name, payload.dataIndex);
+        }
+
+        var data = seriesModel.getData(); // Create selected map
+
+        data.each(function (idx) {
+          var name = data.getName(idx);
+          selected[name] = seriesModel.isSelected(name) || false;
+        });
+      });
+      return {
+        name: payload.name,
+        selected: selected,
+        seriesId: payload.seriesId
+      };
+    });
+  });
+}
+
+module.exports = _default;

+ 85 - 0
node_modules/echarts/lib/action/geoRoam.js

@@ -0,0 +1,85 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var echarts = require("../echarts");
+
+var zrUtil = require("zrender/lib/core/util");
+
+var _roamHelper = require("./roamHelper");
+
+var updateCenterAndZoom = _roamHelper.updateCenterAndZoom;
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/**
+ * @payload
+ * @property {string} [componentType=series]
+ * @property {number} [dx]
+ * @property {number} [dy]
+ * @property {number} [zoom]
+ * @property {number} [originX]
+ * @property {number} [originY]
+ */
+echarts.registerAction({
+  type: 'geoRoam',
+  event: 'geoRoam',
+  update: 'updateTransform'
+}, function (payload, ecModel) {
+  var componentType = payload.componentType || 'series';
+  ecModel.eachComponent({
+    mainType: componentType,
+    query: payload
+  }, function (componentModel) {
+    var geo = componentModel.coordinateSystem;
+
+    if (geo.type !== 'geo') {
+      return;
+    }
+
+    var res = updateCenterAndZoom(geo, payload, componentModel.get('scaleLimit'));
+    componentModel.setCenter && componentModel.setCenter(res.center);
+    componentModel.setZoom && componentModel.setZoom(res.zoom); // All map series with same `map` use the same geo coordinate system
+    // So the center and zoom must be in sync. Include the series not selected by legend
+
+    if (componentType === 'series') {
+      zrUtil.each(componentModel.seriesGroup, function (seriesModel) {
+        seriesModel.setCenter(res.center);
+        seriesModel.setZoom(res.zoom);
+      });
+    }
+  });
+});

+ 86 - 0
node_modules/echarts/lib/action/roamHelper.js

@@ -0,0 +1,86 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/**
+ * @param {module:echarts/coord/View} view
+ * @param {Object} payload
+ * @param {Object} [zoomLimit]
+ */
+function updateCenterAndZoom(view, payload, zoomLimit) {
+  var previousZoom = view.getZoom();
+  var center = view.getCenter();
+  var zoom = payload.zoom;
+  var point = view.dataToPoint(center);
+
+  if (payload.dx != null && payload.dy != null) {
+    point[0] -= payload.dx;
+    point[1] -= payload.dy;
+    var center = view.pointToData(point);
+    view.setCenter(center);
+  }
+
+  if (zoom != null) {
+    if (zoomLimit) {
+      var zoomMin = zoomLimit.min || 0;
+      var zoomMax = zoomLimit.max || Infinity;
+      zoom = Math.max(Math.min(previousZoom * zoom, zoomMax), zoomMin) / previousZoom;
+    } // Zoom on given point(originX, originY)
+
+
+    view.scale[0] *= zoom;
+    view.scale[1] *= zoom;
+    var position = view.position;
+    var fixX = (payload.originX - position[0]) * (zoom - 1);
+    var fixY = (payload.originY - position[1]) * (zoom - 1);
+    position[0] -= fixX;
+    position[1] -= fixY;
+    view.updateTransform(); // Get the new center
+
+    var center = view.pointToData(point);
+    view.setCenter(center);
+    view.setZoom(zoom * previousZoom);
+  }
+
+  return {
+    center: view.getCenter(),
+    zoom: view.getZoom()
+  };
+}
+
+exports.updateCenterAndZoom = updateCenterAndZoom;

+ 67 - 0
node_modules/echarts/lib/chart/bar.js

@@ -0,0 +1,67 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var echarts = require("../echarts");
+
+var zrUtil = require("zrender/lib/core/util");
+
+var _barGrid = require("../layout/barGrid");
+
+var layout = _barGrid.layout;
+var largeLayout = _barGrid.largeLayout;
+
+require("../coord/cartesian/Grid");
+
+require("./bar/BarSeries");
+
+require("./bar/BarView");
+
+require("../component/gridSimple");
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+// In case developer forget to include grid component
+echarts.registerLayout(echarts.PRIORITY.VISUAL.LAYOUT, zrUtil.curry(layout, 'bar')); // Use higher prority to avoid to be blocked by other overall layout, which do not
+// only exist in this module, but probably also exist in other modules, like `barPolar`.
+
+echarts.registerLayout(echarts.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, largeLayout);
+echarts.registerVisual({
+  seriesType: 'bar',
+  reset: function (seriesModel) {
+    // Visual coding for legend
+    seriesModel.getData().setVisual('legendSymbol', 'roundRect');
+  }
+});

+ 91 - 0
node_modules/echarts/lib/chart/bar/BarSeries.js

@@ -0,0 +1,91 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var BaseBarSeries = require("./BaseBarSeries");
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+var _default = BaseBarSeries.extend({
+  type: 'series.bar',
+  dependencies: ['grid', 'polar'],
+  brushSelector: 'rect',
+
+  /**
+   * @override
+   */
+  getProgressive: function () {
+    // Do not support progressive in normal mode.
+    return this.get('large') ? this.get('progressive') : false;
+  },
+
+  /**
+   * @override
+   */
+  getProgressiveThreshold: function () {
+    // Do not support progressive in normal mode.
+    var progressiveThreshold = this.get('progressiveThreshold');
+    var largeThreshold = this.get('largeThreshold');
+
+    if (largeThreshold > progressiveThreshold) {
+      progressiveThreshold = largeThreshold;
+    }
+
+    return progressiveThreshold;
+  },
+  defaultOption: {
+    // If clipped
+    // Only available on cartesian2d
+    clip: true,
+    // If use caps on two sides of bars
+    // Only available on tangential polar bar
+    roundCap: false,
+    showBackground: false,
+    backgroundStyle: {
+      color: 'rgba(180, 180, 180, 0.2)',
+      borderColor: null,
+      borderWidth: 0,
+      borderType: 'solid',
+      borderRadius: 0,
+      shadowBlur: 0,
+      shadowColor: null,
+      shadowOffsetX: 0,
+      shadowOffsetY: 0,
+      opacity: 1
+    }
+  }
+});
+
+module.exports = _default;

+ 698 - 0
node_modules/echarts/lib/chart/bar/BarView.js

@@ -0,0 +1,698 @@
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+var _config = require("../../config");
+
+var __DEV__ = _config.__DEV__;
+
+var echarts = require("../../echarts");
+
+var zrUtil = require("zrender/lib/core/util");
+
+var graphic = require("../../util/graphic");
+
+var _helper = require("./helper");
+
+var setLabel = _helper.setLabel;
+
+var Model = require("../../model/Model");
+
+var barItemStyle = require("./barItemStyle");
+
+var Path = require("zrender/lib/graphic/Path");
+
+var Group = require("zrender/lib/container/Group");
+
+var _throttle = require("../../util/throttle");
+
+var throttle = _throttle.throttle;
+
+var _createClipPathFromCoordSys = require("../helper/createClipPathFromCoordSys");
+
+var createClipPath = _createClipPathFromCoordSys.createClipPath;
+
+var Sausage = require("../../util/shape/sausage");
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+var BAR_BORDER_WIDTH_QUERY = ['itemStyle', 'barBorderWidth'];
+var _eventPos = [0, 0]; // FIXME
+// Just for compatible with ec2.
+
+zrUtil.extend(Model.prototype, barItemStyle);
+
+function getClipArea(coord, data) {
+  var coordSysClipArea = coord.getArea && coord.getArea();
+
+  if (coord.type === 'cartesian2d') {
+    var baseAxis = coord.getBaseAxis(); // When boundaryGap is false or using time axis. bar may exceed the grid.
+    // We should not clip this part.
+    // See test/bar2.html
+
+    if (baseAxis.type !== 'category' || !baseAxis.onBand) {
+      var expandWidth = data.getLayout('bandWidth');
+
+      if (baseAxis.isHorizontal()) {
+        coordSysClipArea.x -= expandWidth;
+        coordSysClipArea.width += expandWidth * 2;
+      } else {
+        coordSysClipArea.y -= expandWidth;
+        coordSysClipArea.height += expandWidth * 2;
+      }
+    }
+  }
+
+  return coordSysClipArea;
+}
+
+var _default = echarts.extendChartView({
+  type: 'bar',
+  render: function (seriesModel, ecModel, api) {
+    this._updateDrawMode(seriesModel);
+
+    var coordinateSystemType = seriesModel.get('coordinateSystem');
+
+    if (coordinateSystemType === 'cartesian2d' || coordinateSystemType === 'polar') {
+      this._isLargeDraw ? this._renderLarge(seriesModel, ecModel, api) : this._renderNormal(seriesModel, ecModel, api);
+    } else {}
+
+    return this.group;
+  },
+  incrementalPrepareRender: function (seriesModel, ecModel, api) {
+    this._clear();
+
+    this._updateDrawMode(seriesModel);
+  },
+  incrementalRender: function (params, seriesModel, ecModel, api) {
+    // Do not support progressive in normal mode.
+    this._incrementalRenderLarge(params, seriesModel);
+  },
+  _updateDrawMode: function (seriesModel) {
+    var isLargeDraw = seriesModel.pipelineContext.large;
+
+    if (this._isLargeDraw == null || isLargeDraw ^ this._isLargeDraw) {
+      this._isLargeDraw = isLargeDraw;
+
+      this._clear();
+    }
+  },
+  _renderNormal: function (seriesModel, ecModel, api) {
+    var group = this.group;
+    var data = seriesModel.getData();
+    var oldData = this._data;
+    var coord = seriesModel.coordinateSystem;
+    var baseAxis = coord.getBaseAxis();
+    var isHorizontalOrRadial;
+
+    if (coord.type === 'cartesian2d') {
+      isHorizontalOrRadial = baseAxis.isHorizontal();
+    } else if (coord.type === 'polar') {
+      isHorizontalOrRadial = baseAxis.dim === 'angle';
+    }
+
+    var animationModel = seriesModel.isAnimationEnabled() ? seriesModel : null;
+    var needsClip = seriesModel.get('clip', true);
+    var coordSysClipArea = getClipArea(coord, data); // If there is clipPath created in large mode. Remove it.
+
+    group.removeClipPath(); // We don't use clipPath in normal mode because we needs a perfect animation
+    // And don't want the label are clipped.
+
+    var roundCap = seriesModel.get('roundCap', true);
+    var drawBackground = seriesModel.get('showBackground', true);
+    var backgroundModel = seriesModel.getModel('backgroundStyle');
+    var barBorderRadius = backgroundModel.get('barBorderRadius') || 0;
+    var bgEls = [];
+    var oldBgEls = this._backgroundEls || [];
+
+    var createBackground = function (dataIndex) {
+      var bgLayout = getLayout[coord.type](data, dataIndex);
+      var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);
+      bgEl.useStyle(backgroundModel.getBarItemStyle()); // Only cartesian2d support borderRadius.
+
+      if (coord.type === 'cartesian2d') {
+        bgEl.setShape('r', barBorderRadius);
+      }
+
+      bgEls[dataIndex] = bgEl;
+      return bgEl;
+    };
+
+    data.diff(oldData).add(function (dataIndex) {
+      var itemModel = data.getItemModel(dataIndex);
+      var layout = getLayout[coord.type](data, dataIndex, itemModel);
+
+      if (drawBackground) {
+        createBackground(dataIndex);
+      } // If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in "axisProxy".
+
+
+      if (!data.hasValue(dataIndex)) {
+        return;
+      }
+
+      if (needsClip) {
+        // Clip will modify the layout params.
+        // And return a boolean to determine if the shape are fully clipped.
+        var isClipped = clip[coord.type](coordSysClipArea, layout);
+
+        if (isClipped) {
+          group.remove(el);
+          return;
+        }
+      }
+
+      var el = elementCreator[coord.type](dataIndex, layout, isHorizontalOrRadial, animationModel, false, roundCap);
+      data.setItemGraphicEl(dataIndex, el);
+      group.add(el);
+      updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar');
+    }).update(function (newIndex, oldIndex) {
+      var itemModel = data.getItemModel(newIndex);
+      var layout = getLayout[coord.type](data, newIndex, itemModel);
+
+      if (drawBackground) {
+        var bgEl;
+
+        if (oldBgEls.length === 0) {
+          bgEl = createBackground(oldIndex);
+        } else {
+          bgEl = oldBgEls[oldIndex];
+          bgEl.useStyle(backgroundModel.getBarItemStyle()); // Only cartesian2d support borderRadius.
+
+          if (coord.type === 'cartesian2d') {
+            bgEl.setShape('r', barBorderRadius);
+          }
+
+          bgEls[newIndex] = bgEl;
+        }
+
+        var bgLayout = getLayout[coord.type](data, newIndex);
+        var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);
+        graphic.updateProps(bgEl, {
+          shape: shape
+        }, animationModel, newIndex);
+      }
+
+      var el = oldData.getItemGraphicEl(oldIndex);
+
+      if (!data.hasValue(newIndex)) {
+        group.remove(el);
+        return;
+      }
+
+      if (needsClip) {
+        var isClipped = clip[coord.type](coordSysClipArea, layout);
+
+        if (isClipped) {
+          group.remove(el);
+          return;
+        }
+      }
+
+      if (el) {
+        graphic.updateProps(el, {
+          shape: layout
+        }, animationModel, newIndex);
+      } else {
+        el = elementCreator[coord.type](newIndex, layout, isHorizontalOrRadial, animationModel, true, roundCap);
+      }
+
+      data.setItemGraphicEl(newIndex, el); // Add back
+
+      group.add(el);
+      updateStyle(el, data, newIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar');
+    }).remove(function (dataIndex) {
+      var el = oldData.getItemGraphicEl(dataIndex);
+
+      if (coord.type === 'cartesian2d') {
+        el && removeRect(dataIndex, animationModel, el);
+      } else {
+        el && removeSector(dataIndex, animationModel, el);
+      }
+    }).execute();
+    var bgGroup = this._backgroundGroup || (this._backgroundGroup = new Group());
+    bgGroup.removeAll();
+
+    for (var i = 0; i < bgEls.length; ++i) {
+      bgGroup.add(bgEls[i]);
+    }
+
+    group.add(bgGroup);
+    this._backgroundEls = bgEls;
+    this._data = data;
+  },
+  _renderLarge: function (seriesModel, ecModel, api) {
+    this._clear();
+
+    createLarge(seriesModel, this.group); // Use clipPath in large mode.
+
+    var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null;
+
+    if (clipPath) {
+      this.group.setClipPath(clipPath);
+    } else {
+      this.group.removeClipPath();
+    }
+  },
+  _incrementalRenderLarge: function (params, seriesModel) {
+    this._removeBackground();
+
+    createLarge(seriesModel, this.group, true);
+  },
+  dispose: zrUtil.noop,
+  remove: function (ecModel) {
+    this._clear(ecModel);
+  },
+  _clear: function (ecModel) {
+    var group = this.group;
+    var data = this._data;
+
+    if (ecModel && ecModel.get('animation') && data && !this._isLargeDraw) {
+      this._removeBackground();
+
+      this._backgroundEls = [];
+      data.eachItemGraphicEl(function (el) {
+        if (el.type === 'sector') {
+          removeSector(el.dataIndex, ecModel, el);
+        } else {
+          removeRect(el.dataIndex, ecModel, el);
+        }
+      });
+    } else {
+      group.removeAll();
+    }
+
+    this._data = null;
+  },
+  _removeBackground: function () {
+    this.group.remove(this._backgroundGroup);
+    this._backgroundGroup = null;
+  }
+});
+
+var mathMax = Math.max;
+var mathMin = Math.min;
+var clip = {
+  cartesian2d: function (coordSysBoundingRect, layout) {
+    var signWidth = layout.width < 0 ? -1 : 1;
+    var signHeight = layout.height < 0 ? -1 : 1; // Needs positive width and height
+
+    if (signWidth < 0) {
+      layout.x += layout.width;
+      layout.width = -layout.width;
+    }
+
+    if (signHeight < 0) {
+      layout.y += layout.height;
+      layout.height = -layout.height;
+    }
+
+    var x = mathMax(layout.x, coordSysBoundingRect.x);
+    var x2 = mathMin(layout.x + layout.width, coordSysBoundingRect.x + coordSysBoundingRect.width);
+    var y = mathMax(layout.y, coordSysBoundingRect.y);
+    var y2 = mathMin(layout.y + layout.height, coordSysBoundingRect.y + coordSysBoundingRect.height);
+    layout.x = x;
+    layout.y = y;
+    layout.width = x2 - x;
+    layout.height = y2 - y;
+    var clipped = layout.width < 0 || layout.height < 0; // Reverse back
+
+    if (signWidth < 0) {
+      layout.x += layout.width;
+      layout.width = -layout.width;
+    }
+
+    if (signHeight < 0) {
+      layout.y += layout.height;
+      layout.height = -layout.height;
+    }
+
+    return clipped;
+  },
+  polar: function (coordSysClipArea, layout) {
+    var signR = layout.r0 <= layout.r ? 1 : -1; // Make sure r is larger than r0
+
+    if (signR < 0) {
+      var r = layout.r;
+      layout.r = layout.r0;
+      layout.r0 = r;
+    }
+
+    var r = mathMin(layout.r, coordSysClipArea.r);
+    var r0 = mathMax(layout.r0, coordSysClipArea.r0);
+    layout.r = r;
+    layout.r0 = r0;
+    var clipped = r - r0 < 0; // Reverse back
+
+    if (signR < 0) {
+      var r = layout.r;
+      layout.r = layout.r0;
+      layout.r0 = r;
+    }
+
+    return clipped;
+  }
+};
+var elementCreator = {
+  cartesian2d: function (dataIndex, layout, isHorizontal, animationModel, isUpdate) {
+    var rect = new graphic.Rect({
+      shape: zrUtil.extend({}, layout),
+      z2: 1
+    });
+    rect.name = 'item'; // Animation
+
+    if (animationModel) {
+      var rectShape = rect.shape;
+      var animateProperty = isHorizontal ? 'height' : 'width';
+      var animateTarget = {};
+      rectShape[animateProperty] = 0;
+      animateTarget[animateProperty] = layout[animateProperty];
+      graphic[isUpdate ? 'updateProps' : 'initProps'](rect, {
+        shape: animateTarget
+      }, animationModel, dataIndex);
+    }
+
+    return rect;
+  },
+  polar: function (dataIndex, layout, isRadial, animationModel, isUpdate, roundCap) {
+    // Keep the same logic with bar in catesion: use end value to control
+    // direction. Notice that if clockwise is true (by default), the sector
+    // will always draw clockwisely, no matter whether endAngle is greater
+    // or less than startAngle.
+    var clockwise = layout.startAngle < layout.endAngle;
+    var ShapeClass = !isRadial && roundCap ? Sausage : graphic.Sector;
+    var sector = new ShapeClass({
+      shape: zrUtil.defaults({
+        clockwise: clockwise
+      }, layout),
+      z2: 1
+    });
+    sector.name = 'item'; // Animation
+
+    if (animationModel) {
+      var sectorShape = sector.shape;
+      var animateProperty = isRadial ? 'r' : 'endAngle';
+      var animateTarget = {};
+      sectorShape[animateProperty] = isRadial ? 0 : layout.startAngle;
+      animateTarget[animateProperty] = layout[animateProperty];
+      graphic[isUpdate ? 'updateProps' : 'initProps'](sector, {
+        shape: animateTarget
+      }, animationModel, dataIndex);
+    }
+
+    return sector;
+  }
+};
+
+function removeRect(dataIndex, animationModel, el) {
+  // Not show text when animating
+  el.style.text = null;
+  graphic.updateProps(el, {
+    shape: {
+      width: 0
+    }
+  }, animationModel, dataIndex, function () {
+    el.parent && el.parent.remove(el);
+  });
+}
+
+function removeSector(dataIndex, animationModel, el) {
+  // Not show text when animating
+  el.style.text = null;
+  graphic.updateProps(el, {
+    shape: {
+      r: el.shape.r0
+    }
+  }, animationModel, dataIndex, function () {
+    el.parent && el.parent.remove(el);
+  });
+}
+
+var getLayout = {
+  // itemModel is only used to get borderWidth, which is not needed
+  // when calculating bar background layout.
+  cartesian2d: function (data, dataIndex, itemModel) {
+    var layout = data.getItemLayout(dataIndex);
+    var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0; // fix layout with lineWidth
+
+    var signX = layout.width > 0 ? 1 : -1;
+    var signY = layout.height > 0 ? 1 : -1;
+    return {
+      x: layout.x + signX * fixedLineWidth / 2,
+      y: layout.y + signY * fixedLineWidth / 2,
+      width: layout.width - signX * fixedLineWidth,
+      height: layout.height - signY * fixedLineWidth
+    };
+  },
+  polar: function (data, dataIndex, itemModel) {
+    var layout = data.getItemLayout(dataIndex);
+    return {
+      cx: layout.cx,
+      cy: layout.cy,
+      r0: layout.r0,
+      r: layout.r,
+      startAngle: layout.startAngle,
+      endAngle: layout.endAngle
+    };
+  }
+};
+
+function isZeroOnPolar(layout) {
+  return layout.startAngle != null && layout.endAngle != null && layout.startAngle === layout.endAngle;
+}
+
+function updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontal, isPolar) {
+  var color = data.getItemVisual(dataIndex, 'color');
+  var opacity = data.getItemVisual(dataIndex, 'opacity');
+  var stroke = data.getVisual('borderColor');
+  var itemStyleModel = itemModel.getModel('itemStyle');
+  var hoverStyle = itemModel.getModel('emphasis.itemStyle').getBarItemStyle();
+
+  if (!isPolar) {
+    el.setShape('r', itemStyleModel.get('barBorderRadius') || 0);
+  }
+
+  el.useStyle(zrUtil.defaults({
+    stroke: isZeroOnPolar(layout) ? 'none' : stroke,
+    fill: isZeroOnPolar(layout) ? 'none' : color,
+    opacity: opacity
+  }, itemStyleModel.getBarItemStyle()));
+  var cursorStyle = itemModel.getShallow('cursor');
+  cursorStyle && el.attr('cursor', cursorStyle);
+  var labelPositionOutside = isHorizontal ? layout.height > 0 ? 'bottom' : 'top' : layout.width > 0 ? 'left' : 'right';
+
+  if (!isPolar) {
+    setLabel(el.style, hoverStyle, itemModel, color, seriesModel, dataIndex, labelPositionOutside);
+  }
+
+  if (isZeroOnPolar(layout)) {
+    hoverStyle.fill = hoverStyle.stroke = 'none';
+  }
+
+  graphic.setHoverStyle(el, hoverStyle);
+} // In case width or height are too small.
+
+
+function getLineWidth(itemModel, rawLayout) {
+  var lineWidth = itemModel.get(BAR_BORDER_WIDTH_QUERY) || 0; // width or height may be NaN for empty data
+
+  var width = isNaN(rawLayout.width) ? Number.MAX_VALUE : Math.abs(rawLayout.width);
+  var height = isNaN(rawLayout.height) ? Number.MAX_VALUE : Math.abs(rawLayout.height);
+  return Math.min(lineWidth, width, height);
+}
+
+var LargePath = Path.extend({
+  type: 'largeBar',
+  shape: {
+    points: []
+  },
+  buildPath: function (ctx, shape) {
+    // Drawing lines is more efficient than drawing
+    // a whole line or drawing rects.
+    var points = shape.points;
+    var startPoint = this.__startPoint;
+    var baseDimIdx = this.__baseDimIdx;
+
+    for (var i = 0; i < points.length; i += 2) {
+      startPoint[baseDimIdx] = points[i + baseDimIdx];
+      ctx.moveTo(startPoint[0], startPoint[1]);
+      ctx.lineTo(points[i], points[i + 1]);
+    }
+  }
+});
+
+function createLarge(seriesModel, group, incremental) {
+  // TODO support polar
+  var data = seriesModel.getData();
+  var startPoint = [];
+  var baseDimIdx = data.getLayout('valueAxisHorizontal') ? 1 : 0;
+  startPoint[1 - baseDimIdx] = data.getLayout('valueAxisStart');
+  var largeDataIndices = data.getLayout('largeDataIndices');
+  var barWidth = data.getLayout('barWidth');
+  var backgroundModel = seriesModel.getModel('backgroundStyle');
+  var drawBackground = seriesModel.get('showBackground', true);
+
+  if (drawBackground) {
+    var points = data.getLayout('largeBackgroundPoints');
+    var backgroundStartPoint = [];
+    backgroundStartPoint[1 - baseDimIdx] = data.getLayout('backgroundStart');
+    var bgEl = new LargePath({
+      shape: {
+        points: points
+      },
+      incremental: !!incremental,
+      __startPoint: backgroundStartPoint,
+      __baseDimIdx: baseDimIdx,
+      __largeDataIndices: largeDataIndices,
+      __barWidth: barWidth,
+      silent: true,
+      z2: 0
+    });
+    setLargeBackgroundStyle(bgEl, backgroundModel, data);
+    group.add(bgEl);
+  }
+
+  var el = new LargePath({
+    shape: {
+      points: data.getLayout('largePoints')
+    },
+    incremental: !!incremental,
+    __startPoint: startPoint,
+    __baseDimIdx: baseDimIdx,
+    __largeDataIndices: largeDataIndices,
+    __barWidth: barWidth
+  });
+  group.add(el);
+  setLargeStyle(el, seriesModel, data); // Enable tooltip and user mouse/touch event handlers.
+
+  el.seriesIndex = seriesModel.seriesIndex;
+
+  if (!seriesModel.get('silent')) {
+    el.on('mousedown', largePathUpdateDataIndex);
+    el.on('mousemove', largePathUpdateDataIndex);
+  }
+} // Use throttle to avoid frequently traverse to find dataIndex.
+
+
+var largePathUpdateDataIndex = throttle(function (event) {
+  var largePath = this;
+  var dataIndex = largePathFindDataIndex(largePath, event.offsetX, event.offsetY);
+  largePath.dataIndex = dataIndex >= 0 ? dataIndex : null;
+}, 30, false);
+
+function largePathFindDataIndex(largePath, x, y) {
+  var baseDimIdx = largePath.__baseDimIdx;
+  var valueDimIdx = 1 - baseDimIdx;
+  var points = largePath.shape.points;
+  var largeDataIndices = largePath.__largeDataIndices;
+  var barWidthHalf = Math.abs(largePath.__barWidth / 2);
+  var startValueVal = largePath.__startPoint[valueDimIdx];
+  _eventPos[0] = x;
+  _eventPos[1] = y;
+  var pointerBaseVal = _eventPos[baseDimIdx];
+  var pointerValueVal = _eventPos[1 - baseDimIdx];
+  var baseLowerBound = pointerBaseVal - barWidthHalf;
+  var baseUpperBound = pointerBaseVal + barWidthHalf;
+
+  for (var i = 0, len = points.length / 2; i < len; i++) {
+    var ii = i * 2;
+    var barBaseVal = points[ii + baseDimIdx];
+    var barValueVal = points[ii + valueDimIdx];
+
+    if (barBaseVal >= baseLowerBound && barBaseVal <= baseUpperBound && (startValueVal <= barValueVal ? pointerValueVal >= startValueVal && pointerValueVal <= barValueVal : pointerValueVal >= barValueVal && pointerValueVal <= startValueVal)) {
+      return largeDataIndices[i];
+    }
+  }
+
+  return -1;
+}
+
+function setLargeStyle(el, seriesModel, data) {
+  var borderColor = data.getVisual('borderColor') || data.getVisual('color');
+  var itemStyle = seriesModel.getModel('itemStyle').getItemStyle(['color', 'borderColor']);
+  el.useStyle(itemStyle);
+  el.style.fill = null;
+  el.style.stroke = borderColor;
+  el.style.lineWidth = data.getLayout('barWidth');
+}
+
+function setLargeBackgroundStyle(el, backgroundModel, data) {
+  var borderColor = backgroundModel.get('borderColor') || backgroundModel.get('color');
+  var itemStyle = backgroundModel.getItemStyle(['color', 'borderColor']);
+  el.useStyle(itemStyle);
+  el.style.fill = null;
+  el.style.stroke = borderColor;
+  el.style.lineWidth = data.getLayout('barWidth');
+}
+
+function createBackgroundShape(isHorizontalOrRadial, layout, coord) {
+  var coordLayout;
+  var isPolar = coord.type === 'polar';
+
+  if (isPolar) {
+    coordLayout = coord.getArea();
+  } else {
+    coordLayout = coord.grid.getRect();
+  }
+
+  if (isPolar) {
+    return {
+      cx: coordLayout.cx,
+      cy: coordLayout.cy,
+      r0: isHorizontalOrRadial ? coordLayout.r0 : layout.r0,
+      r: isHorizontalOrRadial ? coordLayout.r : layout.r,
+      startAngle: isHorizontalOrRadial ? layout.startAngle : 0,
+      endAngle: isHorizontalOrRadial ? layout.endAngle : Math.PI * 2
+    };
+  } else {
+    return {
+      x: isHorizontalOrRadial ? layout.x : coordLayout.x,
+      y: isHorizontalOrRadial ? coordLayout.y : layout.y,
+      width: isHorizontalOrRadial ? layout.width : coordLayout.width,
+      height: isHorizontalOrRadial ? coordLayout.height : layout.height
+    };
+  }
+}
+
+function createBackgroundEl(coord, isHorizontalOrRadial, layout) {
+  var ElementClz = coord.type === 'polar' ? graphic.Sector : graphic.Rect;
+  return new ElementClz({
+    shape: createBackgroundShape(isHorizontalOrRadial, layout, coord),
+    silent: true,
+    z2: 0
+  });
+}
+
+module.exports = _default;

+ 0 - 0
node_modules/echarts/lib/chart/bar/BaseBarSeries.js


Some files were not shown because too many files changed in this diff