From c410e02761a3500bdf4f22802edeff6057399792 Mon Sep 17 00:00:00 2001 From: xiaoluoboding Date: Fri, 3 Jan 2020 18:45:41 +0800 Subject: [PATCH 01/20] chore: upgrade vue-cli to 4.1.1 --- .babelrc | 12 - .editorconfig | 8 +- .eslintignore | 2 - .eslintrc.js | 33 - .gitignore | 13 +- .postcssrc.js | 10 - .travis.yml | 4 - LICENSE | 21 - app/components/CodeBlock.vue | 4 +- app/constant/chinaProvince.js | 204 +- app/data/line.js | 17 + app/data/liquidfill.js | 2 +- app/data/scatter.js | 2 +- app/data/sunburst.js | 324 +- app/main.js | 13 +- app/plugins/ve-charts.js | 2 +- app/router/index.js | 78 +- app/views/TestEvent.vue | 10 +- app/views/TestLayout.vue | 6 +- app/views/TestPage.vue | 8 +- babel.config.js | 5 + build/build.js | 41 - build/bundle.js | 37 - build/check-versions.js | 54 - build/utils.js | 101 - build/vue-loader.conf.js | 22 - build/webpack.base.conf.js | 97 - build/webpack.bundle.conf.js | 96 - build/webpack.dev.conf.js | 95 - build/webpack.prod.conf.js | 145 - build/webpack.test.conf.js | 32 - config/dev.env.js | 7 - config/index.js | 87 - config/prod.env.js | 4 - config/test.env.js | 7 - index.html | 11 - lib/VeBarChart.js | 1 - lib/VeDonutChart.js | 1 - lib/VeFunnelChart.js | 1 - lib/VeGaugeChart.js | 1 - lib/VeGeoChart.js | 1 - lib/VeLineChart.js | 1 - lib/VeLiquidfillChart.js | 1 - lib/VePieChart.js | 1 - lib/VeRadarChart.js | 1 - lib/VeScatterChart.js | 1 - lib/VeSunburstChart.js | 1 - lib/VeTreeChart.js | 1 - lib/VeTreemapChart.js | 1 - lib/VeWordcloudChart.js | 1 - lib/common.js | 8 - lib/ve-charts.min.css | 2 - lib/ve-charts.min.css.map | 1 - lib/ve-charts.min.js | 8 - package.json | 139 +- public/favicon.ico | Bin 0 -> 4286 bytes public/index.html | 17 + src/components/BaseEcharts.vue | 2 +- src/components/LoadingChart.vue | 2 +- src/index.js | 2 +- src/mixins/core.js | 8 +- src/packages/bar/chartHandler.js | 42 +- src/packages/bar/index.vue | 2 +- src/packages/donut/index.vue | 3 +- src/packages/funnel/chartHandler.js | 6 +- src/packages/funnel/index.vue | 2 +- src/packages/gauge/chartHandler.js | 4 +- src/packages/gauge/index.vue | 2 +- src/packages/geo/chartHandler.js | 45 +- src/packages/geo/index.vue | 2 +- src/packages/line/chartHandler.js | 29 +- src/packages/line/index.js | 2 +- src/packages/line/index.vue | 2 +- src/packages/liquidfill/chartHandler.js | 10 +- src/packages/liquidfill/index.vue | 10 +- src/packages/pie/chartHandler.js | 6 +- src/packages/pie/index.vue | 2 +- src/packages/radar/chartHandler.js | 8 +- src/packages/radar/index.vue | 2 +- src/packages/scatter/chartHandler.js | 14 +- src/packages/scatter/index.vue | 2 +- src/packages/sunburst/chartHandler.js | 19 +- src/packages/sunburst/index.vue | 2 +- src/packages/tree/chartHandler.js | 9 +- src/packages/tree/index.vue | 2 +- src/packages/treemap/chartHandler.js | 2 +- src/packages/treemap/index.js | 1 - src/packages/treemap/index.vue | 4 +- src/packages/wordcloud/chartHandler.js | 10 +- src/packages/wordcloud/index.vue | 10 +- src/utils/formatZhNumber.js | 8 +- src/utils/index.js | 8 +- static/.gitkeep | 0 static/favicon.ico | Bin 69694 -> 0 bytes test/unit/.eslintrc | 9 - test/unit/index.js | 13 - test/unit/karma.conf.js | 33 - test/unit/specs/Hello.spec.js | 11 - tests/unit/example.spec.js | 12 + vue.config.js | 62 + yarn.lock | 10083 ++++++++++++++++++++++ 101 files changed, 10838 insertions(+), 1472 deletions(-) delete mode 100644 .babelrc delete mode 100644 .eslintignore delete mode 100644 .eslintrc.js delete mode 100644 .postcssrc.js delete mode 100644 .travis.yml delete mode 100644 LICENSE create mode 100644 babel.config.js delete mode 100644 build/build.js delete mode 100644 build/bundle.js delete mode 100644 build/check-versions.js delete mode 100644 build/utils.js delete mode 100644 build/vue-loader.conf.js delete mode 100644 build/webpack.base.conf.js delete mode 100644 build/webpack.bundle.conf.js delete mode 100644 build/webpack.dev.conf.js delete mode 100644 build/webpack.prod.conf.js delete mode 100644 build/webpack.test.conf.js delete mode 100644 config/dev.env.js delete mode 100644 config/index.js delete mode 100644 config/prod.env.js delete mode 100644 config/test.env.js delete mode 100644 index.html delete mode 100644 lib/VeBarChart.js delete mode 100644 lib/VeDonutChart.js delete mode 100644 lib/VeFunnelChart.js delete mode 100644 lib/VeGaugeChart.js delete mode 100644 lib/VeGeoChart.js delete mode 100644 lib/VeLineChart.js delete mode 100644 lib/VeLiquidfillChart.js delete mode 100644 lib/VePieChart.js delete mode 100644 lib/VeRadarChart.js delete mode 100644 lib/VeScatterChart.js delete mode 100644 lib/VeSunburstChart.js delete mode 100644 lib/VeTreeChart.js delete mode 100644 lib/VeTreemapChart.js delete mode 100644 lib/VeWordcloudChart.js delete mode 100644 lib/common.js delete mode 100644 lib/ve-charts.min.css delete mode 100644 lib/ve-charts.min.css.map delete mode 100644 lib/ve-charts.min.js create mode 100644 public/favicon.ico create mode 100644 public/index.html delete mode 100644 static/.gitkeep delete mode 100644 static/favicon.ico delete mode 100644 test/unit/.eslintrc delete mode 100644 test/unit/index.js delete mode 100644 test/unit/karma.conf.js delete mode 100644 test/unit/specs/Hello.spec.js create mode 100644 tests/unit/example.spec.js create mode 100644 vue.config.js create mode 100644 yarn.lock diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 9446efa..0000000 --- a/.babelrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "presets": [ - ["env", { - "modules": false, - "targets": { - "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] - } - }], - "stage-2" - ], - "plugins": ["transform-vue-jsx", "transform-runtime", "lodash"] -} diff --git a/.editorconfig b/.editorconfig index 9d08a1a..7053c49 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,9 +1,5 @@ -root = true - -[*] -charset = utf-8 +[*.{js,jsx,ts,tsx,vue}] indent_style = space indent_size = 2 -end_of_line = lf -insert_final_newline = true trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 34af377..0000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -build/*.js -config/*.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index c0529c8..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,33 +0,0 @@ -// https://eslint.org/docs/user-guide/configuring - -module.exports = { - root: true, - parserOptions: { - parser: 'babel-eslint' - }, - env: { - browser: true, - }, - extends: [ - // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention - // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. - 'plugin:vue/essential', - // https://github.com/standard/standard/blob/master/docs/RULES-en.md - 'standard' - ], - // required to lint *.vue files - plugins: [ - 'vue' - ], - // add your custom rules here - 'rules': { - // allow paren-less arrow functions - 'arrow-parens': 0, - // allow async-await - 'generator-star-spacing': 0, - // allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // @off 函数定义时括号前的空格规则 - 'space-before-function-paren': 0, - } -} diff --git a/.gitignore b/.gitignore index be88224..a0dddc6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,15 @@ .DS_Store -node_modules/ -dist/ +node_modules +/dist + +# local env files +.env.local +.env.*.local + +# Log files npm-debug.log* yarn-debug.log* yarn-error.log* -package-lock.json -test/unit/coverage # Editor directories and files .idea @@ -14,3 +18,4 @@ test/unit/coverage *.ntvs* *.njsproj *.sln +*.sw? diff --git a/.postcssrc.js b/.postcssrc.js deleted file mode 100644 index eee3e92..0000000 --- a/.postcssrc.js +++ /dev/null @@ -1,10 +0,0 @@ -// https://github.com/michael-ciniawsky/postcss-load-config - -module.exports = { - "plugins": { - "postcss-import": {}, - "postcss-url": {}, - // to edit target browsers: use "browserslist" field in package.json - "autoprefixer": {} - } -} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0b8ba30..0000000 --- a/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "8" - - "6" \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index f2999b2..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Yunwei Xiao - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/app/components/CodeBlock.vue b/app/components/CodeBlock.vue index 1c1abf0..6d42390 100644 --- a/app/components/CodeBlock.vue +++ b/app/components/CodeBlock.vue @@ -11,7 +11,7 @@ import 'highlight.js/styles/github.css' Vue.directive('hljs', { deep: true, - bind: function(el, binding) { + bind: function (el, binding) { // on first bind, highlight all targets let targets = el.querySelectorAll('code') targets.forEach((target) => { @@ -23,7 +23,7 @@ Vue.directive('hljs', { hljs.highlightBlock(target) }) }, - componentUpdated: function(el, binding) { + componentUpdated: function (el, binding) { // after an update, re-fill the content and then highlight let targets = el.querySelectorAll('code') targets.forEach((target) => { diff --git a/app/constant/chinaProvince.js b/app/constant/chinaProvince.js index 463dc34..e59dd85 100644 --- a/app/constant/chinaProvince.js +++ b/app/constant/chinaProvince.js @@ -1,38 +1,174 @@ export const chinaProvince = [ - {'id': '1', 'name': '北京', 'pinyin': 'beijing'}, - {'id': '2', 'name': '上海', 'pinyin': 'shanghai'}, - {'id': '3', 'name': '天津', 'pinyin': 'tianjin'}, - {'id': '4', 'name': '重庆', 'pinyin': 'chongqing'}, - {'id': '5', 'name': '河北', 'pinyin': 'hebei'}, - {'id': '6', 'name': '山西', 'pinyin': 'shanxi'}, - {'id': '7', 'name': '河南', 'pinyin': 'henan'}, - {'id': '8', 'name': '辽宁', 'pinyin': 'liaoning'}, - {'id': '9', 'name': '吉林', 'pinyin': 'jilin'}, - {'id': '10', 'name': '黑龙江', 'pinyin': 'heilongjiang'}, - {'id': '11', 'name': '内蒙古', 'pinyin': 'neimenggu'}, - {'id': '12', 'name': '江苏', 'pinyin': 'jiangsu'}, - {'id': '13', 'name': '山东', 'pinyin': 'shandong'}, - {'id': '14', 'name': '安徽', 'pinyin': 'anhui'}, - {'id': '15', 'name': '浙江', 'pinyin': 'zejiang'}, - {'id': '16', 'name': '福建', 'pinyin': 'fujian'}, - {'id': '17', 'name': '湖北', 'pinyin': 'hubei'}, - {'id': '18', 'name': '湖南', 'pinyin': 'hunan'}, - {'id': '19', 'name': '广东', 'pinyin': 'guangdong'}, - {'id': '20', 'name': '广西', 'pinyin': 'guangxi'}, - {'id': '21', 'name': '江西', 'pinyin': 'jiangxi'}, - {'id': '22', 'name': '四川', 'pinyin': 'sichuan'}, - {'id': '23', 'name': '海南', 'pinyin': 'hainan'}, - {'id': '24', 'name': '贵州', 'pinyin': 'guizhou'}, - {'id': '25', 'name': '云南', 'pinyin': 'yunnan'}, - {'id': '26', 'name': '西藏', 'pinyin': 'xizang'}, - {'id': '27', 'name': '陕西', 'pinyin': 'shanxi'}, - {'id': '28', 'name': '甘肃', 'pinyin': 'gansu'}, - {'id': '29', 'name': '青海', 'pinyin': 'qinghai'}, - {'id': '30', 'name': '宁夏', 'pinyin': 'ningxia'}, - {'id': '31', 'name': '新疆', 'pinyin': 'xinjiang'}, - {'id': '32', 'name': '台湾', 'pinyin': 'taiwan'}, - {'id': '33', 'name': '香港', 'pinyin': 'xianggang'}, - {'id': '34', 'name': '澳门', 'pinyin': 'aomen'} + { + 'id': '1', + 'name': '北京', + 'pinyin': 'beijing' + }, + { + 'id': '2', + 'name': '上海', + 'pinyin': 'shanghai' + }, + { + 'id': '3', + 'name': '天津', + 'pinyin': 'tianjin' + }, + { + 'id': '4', + 'name': '重庆', + 'pinyin': 'chongqing' + }, + { + 'id': '5', + 'name': '河北', + 'pinyin': 'hebei' + }, + { + 'id': '6', + 'name': '山西', + 'pinyin': 'shanxi' + }, + { + 'id': '7', + 'name': '河南', + 'pinyin': 'henan' + }, + { + 'id': '8', + 'name': '辽宁', + 'pinyin': 'liaoning' + }, + { + 'id': '9', + 'name': '吉林', + 'pinyin': 'jilin' + }, + { + 'id': '10', + 'name': '黑龙江', + 'pinyin': 'heilongjiang' + }, + { + 'id': '11', + 'name': '内蒙古', + 'pinyin': 'neimenggu' + }, + { + 'id': '12', + 'name': '江苏', + 'pinyin': 'jiangsu' + }, + { + 'id': '13', + 'name': '山东', + 'pinyin': 'shandong' + }, + { + 'id': '14', + 'name': '安徽', + 'pinyin': 'anhui' + }, + { + 'id': '15', + 'name': '浙江', + 'pinyin': 'zejiang' + }, + { + 'id': '16', + 'name': '福建', + 'pinyin': 'fujian' + }, + { + 'id': '17', + 'name': '湖北', + 'pinyin': 'hubei' + }, + { + 'id': '18', + 'name': '湖南', + 'pinyin': 'hunan' + }, + { + 'id': '19', + 'name': '广东', + 'pinyin': 'guangdong' + }, + { + 'id': '20', + 'name': '广西', + 'pinyin': 'guangxi' + }, + { + 'id': '21', + 'name': '江西', + 'pinyin': 'jiangxi' + }, + { + 'id': '22', + 'name': '四川', + 'pinyin': 'sichuan' + }, + { + 'id': '23', + 'name': '海南', + 'pinyin': 'hainan' + }, + { + 'id': '24', + 'name': '贵州', + 'pinyin': 'guizhou' + }, + { + 'id': '25', + 'name': '云南', + 'pinyin': 'yunnan' + }, + { + 'id': '26', + 'name': '西藏', + 'pinyin': 'xizang' + }, + { + 'id': '27', + 'name': '陕西', + 'pinyin': 'shanxi' + }, + { + 'id': '28', + 'name': '甘肃', + 'pinyin': 'gansu' + }, + { + 'id': '29', + 'name': '青海', + 'pinyin': 'qinghai' + }, + { + 'id': '30', + 'name': '宁夏', + 'pinyin': 'ningxia' + }, + { + 'id': '31', + 'name': '新疆', + 'pinyin': 'xinjiang' + }, + { + 'id': '32', + 'name': '台湾', + 'pinyin': 'taiwan' + }, + { + 'id': '33', + 'name': '香港', + 'pinyin': 'xianggang' + }, + { + 'id': '34', + 'name': '澳门', + 'pinyin': 'aomen' + } ] export const findProvince = province => chinaProvince.findIndex(v => v.name === province) diff --git a/app/data/line.js b/app/data/line.js index afe11f8..d42cda9 100644 --- a/app/data/line.js +++ b/app/data/line.js @@ -66,6 +66,23 @@ export default { data: baseData, settings: { smooth: true, + areaStyle: {}, + stack: { + repo: [ + 'React', + 'Angular' + ] + } + } + }, + { + title: '百分比堆叠折线图', + data: baseData, + settings: { + smooth: true, + areaStyle: {}, + yAxisLabelType: ['percentage'], + percentage: true, stack: { repo: [ 'React', diff --git a/app/data/liquidfill.js b/app/data/liquidfill.js index 9f95c16..3458d8c 100644 --- a/app/data/liquidfill.js +++ b/app/data/liquidfill.js @@ -129,7 +129,7 @@ export default { }, tooltip: { show: true, - formatter: function ({marker, name, value}) { + formatter: function ({ marker, name, value }) { return marker + name + ': ' + parseInt(value * 100) + '%' } } diff --git a/app/data/scatter.js b/app/data/scatter.js index 2377874..16037ca 100644 --- a/app/data/scatter.js +++ b/app/data/scatter.js @@ -166,7 +166,7 @@ export default { opacity: 0.8 } }, - symbolSize: function(val) { + symbolSize: function (val) { const [a, b] = val return Math.abs(a - b) / 2 } diff --git a/app/data/sunburst.js b/app/data/sunburst.js index af6ce9c..e71ed83 100644 --- a/app/data/sunburst.js +++ b/app/data/sunburst.js @@ -62,64 +62,90 @@ const monochromeData = { value: 5, children: [{ value: 1, - itemStyle: {color: '#F54F4A'} + itemStyle: { + color: '#F54F4A' + } }, { value: 2, children: [{ value: 1, - itemStyle: {color: '#FF8C75'} + itemStyle: { + color: '#FF8C75' + } }] }, { children: [{ value: 1 }] }], - itemStyle: {color: '#F54F4A'} + itemStyle: { + color: '#F54F4A' + } }, { value: 10, children: [{ value: 6, children: [{ value: 1, - itemStyle: {color: '#F54F4A'} + itemStyle: { + color: '#F54F4A' + } }, { value: 1 }, { value: 1, - itemStyle: {color: '#FF8C75'} + itemStyle: { + color: '#FF8C75' + } }, { value: 1 }], - itemStyle: {color: '#FFB499'} + itemStyle: { + color: '#FFB499' + } }, { value: 2, children: [{ value: 1 }], - itemStyle: {color: '#FFB499'} + itemStyle: { + color: '#FFB499' + } }, { children: [{ value: 1, - itemStyle: {color: '#FF8C75'} + itemStyle: { + color: '#FF8C75' + } }] }], - itemStyle: {color: '#F54F4A'} + itemStyle: { + color: '#F54F4A' + } }], - itemStyle: {color: '#F54F4A'} + itemStyle: { + color: '#F54F4A' + } }, { value: 9, children: [{ value: 4, children: [{ value: 2, - itemStyle: {color: '#FF8C75'} + itemStyle: { + color: '#FF8C75' + } }, { children: [{ value: 1, - itemStyle: {color: '#F54F4A'} + itemStyle: { + color: '#F54F4A' + } }] }], - itemStyle: {color: '#F54F4A'} + itemStyle: { + color: '#F54F4A' + } }, { children: [{ value: 3, @@ -127,58 +153,88 @@ const monochromeData = { value: 1 }, { value: 1, - itemStyle: {color: '#FF8C75'} + itemStyle: { + color: '#FF8C75' + } }] }], - itemStyle: {color: '#FFB499'} + itemStyle: { + color: '#FFB499' + } }], - itemStyle: {color: '#FF8C75'} + itemStyle: { + color: '#FF8C75' + } }, { value: 7, children: [{ children: [{ value: 1, - itemStyle: {color: '#FFB499'} + itemStyle: { + color: '#FFB499' + } }, { value: 3, children: [{ value: 1, - itemStyle: {color: '#FF8C75'} + itemStyle: { + color: '#FF8C75' + } }, { value: 1 }], - itemStyle: {color: '#FF8C75'} + itemStyle: { + color: '#FF8C75' + } }, { value: 2, children: [{ value: 1 }, { value: 1, - itemStyle: {color: '#F54F4A'} + itemStyle: { + color: '#F54F4A' + } }], - itemStyle: {color: '#F54F4A'} + itemStyle: { + color: '#F54F4A' + } }], - itemStyle: {color: '#FFB499'} + itemStyle: { + color: '#FFB499' + } }], - itemStyle: {color: '#F54F4A'} + itemStyle: { + color: '#F54F4A' + } }, { children: [{ value: 6, children: [{ value: 1, - itemStyle: {color: '#FF8C75'} + itemStyle: { + color: '#FF8C75' + } }, { value: 2, children: [{ value: 2, - itemStyle: {color: '#FF8C75'} + itemStyle: { + color: '#FF8C75' + } }], - itemStyle: {color: '#F54F4A'} + itemStyle: { + color: '#F54F4A' + } }, { value: 1, - itemStyle: {color: '#FFB499'} + itemStyle: { + color: '#FFB499' + } }], - itemStyle: {color: '#FFB499'} + itemStyle: { + color: '#FFB499' + } }, { value: 3, children: [{ @@ -186,14 +242,20 @@ const monochromeData = { }, { children: [{ value: 1, - itemStyle: {color: '#FF8C75'} + itemStyle: { + color: '#FF8C75' + } }] }, { value: 1 }], - itemStyle: {color: '#FFB499'} + itemStyle: { + color: '#FFB499' + } }], - itemStyle: {color: '#F54F4A'} + itemStyle: { + color: '#F54F4A' + } }] }] } @@ -920,114 +982,112 @@ const drinkData = { export default { name: '旭日图', type: 'sunburst', - chartData: [ - { - title: 'Basic Sunburst', - data: baseData, - settings: { - radius: [0, '80%'], + chartData: [{ + title: 'Basic Sunburst', + data: baseData, + settings: { + radius: [0, '80%'], + label: { + rotate: 0 + }, + tooltip: { + show: true + } + } + }, { + title: 'Monochrome Sunburst', + data: monochromeData, + settings: { + radius: ['15%', '80%'], + sort: null, + highlightPolicy: 'ancestor', + itemStyle: { + color: '#ddd', + borderWidth: 2 + } + } + }, { + title: 'Sunburst Label Rotate', + data: rotateData, + settings: { + silent: true, + radius: ['15%', '80%'], + sort: null, + highlightPolicy: 'ancestor', + label: { + color: '#fff', + textBorderColor: '#666', + textBorderWidth: 2, + borderColor: '#999', + borderWidth: 1, + formatter: function (param) { + let depth = param.treePathInfo.length + if (depth === 2) { + return 'radial' + } else if (depth === 3) { + return 'tangential' + } else if (depth === 4) { + return '0' + } + } + }, + levels: [{}, { + itemStyle: { + color: 'red' + }, label: { - rotate: 0 + rotate: 'radial' + } + }, { + itemStyle: { + color: 'orange' }, - tooltip: { - show: true + label: { + rotate: 'tangential' } - } - }, { - title: 'Monochrome Sunburst', - data: monochromeData, - settings: { - radius: ['15%', '80%'], - sort: null, - highlightPolicy: 'ancestor', + }, { + itemStyle: { + color: 'yellow' + }, + label: { + rotate: 0 + } + }] + } + }, { + title: 'Drink Flavors', + data: drinkData, + settings: { + highlightPolicy: 'ancestor', + radius: [0, '100%'], + sort: null, + levels: [{}, { + r0: '15%', + r: '35%', itemStyle: { - color: '#ddd', borderWidth: 2 + }, + label: { + rotate: 'tangential' } - } - }, { - title: 'Sunburst Label Rotate', - data: rotateData, - settings: { - silent: true, - radius: ['15%', '80%'], - sort: null, - highlightPolicy: 'ancestor', + }, { + r0: '35%', + r: '70%', label: { - color: '#fff', - textBorderColor: '#666', - textBorderWidth: 2, - borderColor: '#999', - borderWidth: 1, - formatter: function (param) { - let depth = param.treePathInfo.length - if (depth === 2) { - return 'radial' - } else if (depth === 3) { - return 'tangential' - } else if (depth === 4) { - return '0' - } - } + align: 'right' + } + }, { + r0: '70%', + r: '72%', + label: { + position: 'outside', + padding: 3, + silent: false }, - levels: [{}, { - itemStyle: { - color: 'red' - }, - label: { - rotate: 'radial' - } - }, { - itemStyle: { - color: 'orange' - }, - label: { - rotate: 'tangential' - } - }, { - itemStyle: { - color: 'yellow' - }, - label: { - rotate: 0 - } - }] - } - }, { - title: 'Drink Flavors', - data: drinkData, - settings: { - highlightPolicy: 'ancestor', - radius: [0, '100%'], - sort: null, - levels: [{}, { - r0: '15%', - r: '35%', - itemStyle: { - borderWidth: 2 - }, - label: { - rotate: 'tangential' - } - }, { - r0: '35%', - r: '70%', - label: { - align: 'right' - } - }, { - r0: '70%', - r: '72%', - label: { - position: 'outside', - padding: 3, - silent: false - }, - itemStyle: { - borderWidth: 3 - } - }] - } + itemStyle: { + borderWidth: 3 + } + }] } - ] + }] } diff --git a/app/main.js b/app/main.js index 0b33257..4221b07 100644 --- a/app/main.js +++ b/app/main.js @@ -1,20 +1,15 @@ -// The Vue build version to load with the `import` command -// (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' -import router from './router' import 'normalize.css' import '@/plugins/element-ui' import '@/plugins/ve-charts' -import App from './App' +import App from './App.vue' +import router from './router' Vue.config.productionTip = false -/* eslint-disable no-new */ new Vue({ - el: '#app', router, - template: '', - components: { App } -}) + render: h => h(App) +}).$mount('#app') diff --git a/app/plugins/ve-charts.js b/app/plugins/ve-charts.js index 4ec233f..6343310 100644 --- a/app/plugins/ve-charts.js +++ b/app/plugins/ve-charts.js @@ -4,7 +4,7 @@ import VeCharts from '../../src/index' // 调试开发 // import '../lib/common' // 按需引入 // import VeBarChart from '../lib/VeBarChart' // 按需引入 // import VeCharts from '../lib/ve-charts.min' // 调试生产 -import '../../lib/ve-charts.min.css' +// import '../../lib/ve-charts.min.css' Vue.use(VeCharts) // Vue.component('VeBarChart', VeBarChart) diff --git a/app/router/index.js b/app/router/index.js index a3c2551..5169f2a 100644 --- a/app/router/index.js +++ b/app/router/index.js @@ -1,43 +1,43 @@ import Vue from 'vue' -import Router from 'vue-router' -import Chart from '@/views/Chart' -import TestPage from '@/views/TestPage' -import TestEvent from '@/views/TestEvent' -import TestLayout from '@/views/TestLayout' +import VueRouter from 'vue-router' -Vue.use(Router) +Vue.use(VueRouter) -export default new Router({ - routes: [ - { - path: '/', - name: '首页', - component: Chart, - redirect: '/chart/bar' - }, - { - path: '/chart/:type', - name: '图表示例', - component: Chart, - props: true - }, - { - path: '/test-page', - name: '测试页面', - component: TestPage, - props: true - }, - { - path: '/test-event', - name: '测试事件', - component: TestEvent, - props: true - }, - { - path: '/test-layout', - name: '测试布局', - component: TestLayout, - props: true - } - ] +const routes = [ + { + path: '/', + name: '首页', + // component: Chart, + redirect: '/chart/bar' + }, + { + path: '/chart/:type', + name: '图表示例', + component: () => import(/* webpackChunkName: "chart" */ '../views/Chart.vue'), + props: true + }, + { + path: '/test-page', + name: '测试页面', + component: () => import(/* webpackChunkName: "test-page" */ '../views/TestPage.vue'), + props: true + }, + { + path: '/test-event', + name: '测试事件', + component: () => import(/* webpackChunkName: "test-event" */ '../views/TestEvent.vue'), + props: true + }, + { + path: '/test-layout', + name: '测试布局', + component: () => import(/* webpackChunkName: "test-layout" */ '../views/TestLayout.vue'), + props: true + } +] + +const router = new VueRouter({ + routes }) + +export default router diff --git a/app/views/TestEvent.vue b/app/views/TestEvent.vue index a51c73f..ec4b41e 100644 --- a/app/views/TestEvent.vue +++ b/app/views/TestEvent.vue @@ -23,7 +23,7 @@ import { chinaProvince, findProvince } from '@/constant/chinaProvince' export default { name: 'TestEvent', - data() { + data () { return { isLoadingLine: false, chartData: {}, @@ -34,7 +34,7 @@ export default { } }, methods: { - loadLineData() { + loadLineData () { const randomData = () => { return Math.round(Math.random() * 1000) } @@ -123,7 +123,7 @@ export default { zoom: 1.2 } }, - onClick(e) { + onClick (e) { this.title = { text: `选中省份:${e.name}`, textStyle: { @@ -137,11 +137,11 @@ export default { this.chartSettings.mapName = `province/${province}` } }, - onClickBlank(e) { + onClickBlank (e) { this.chartSettings.mapName = 'china' } }, - created() { + created () { this.loadLineData() } } diff --git a/app/views/TestLayout.vue b/app/views/TestLayout.vue index 4ba700a..c2927d7 100644 --- a/app/views/TestLayout.vue +++ b/app/views/TestLayout.vue @@ -58,7 +58,7 @@ import lineOptions from '@/constant/lineOptions' export default { name: 'TestLayout', - data() { + data () { return { isLoadingLine: false, lineData: {}, @@ -71,7 +71,7 @@ export default { } }, methods: { - loadLineData() { + loadLineData () { this.isLoadingLine = true setTimeout(() => { this.lineData = { @@ -95,7 +95,7 @@ export default { this.isLoadingLine = false }, 2000) }, - handleChangeData() { + handleChangeData () { _.isEmpty(this.lineData) ? this.loadLineData() : (this.lineData = {}) } }, diff --git a/app/views/TestPage.vue b/app/views/TestPage.vue index c9ef5ea..d05e686 100644 --- a/app/views/TestPage.vue +++ b/app/views/TestPage.vue @@ -32,7 +32,7 @@ import VeRadarChart from '../../src/packages/radar/index' export default { components: { VeRadarChart }, name: 'TestPage', - data() { + data () { return { isLoadingLine: false, lineData: {}, @@ -47,7 +47,7 @@ export default { } }, methods: { - loadLineData() { + loadLineData () { this.isLoadingLine = true setTimeout(() => { this.lineData = { @@ -71,11 +71,11 @@ export default { this.isLoadingLine = false }, 2000) }, - handleChangeData() { + handleChangeData () { _.isEmpty(this.lineData) ? this.loadLineData() : (this.lineData = {}) } }, - created() { + created () { this.loadLineData() } } diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..e955840 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,5 @@ +module.exports = { + presets: [ + '@vue/cli-plugin-babel/preset' + ] +} diff --git a/build/build.js b/build/build.js deleted file mode 100644 index 8f2ad8a..0000000 --- a/build/build.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict' -require('./check-versions')() - -process.env.NODE_ENV = 'production' - -const ora = require('ora') -const rm = require('rimraf') -const path = require('path') -const chalk = require('chalk') -const webpack = require('webpack') -const config = require('../config') -const webpackConfig = require('./webpack.prod.conf') - -const spinner = ora('building for production...') -spinner.start() - -rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { - if (err) throw err - webpack(webpackConfig, (err, stats) => { - spinner.stop() - if (err) throw err - process.stdout.write(stats.toString({ - colors: true, - modules: false, - children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. - chunks: false, - chunkModules: false - }) + '\n\n') - - if (stats.hasErrors()) { - console.log(chalk.red(' Build failed with errors.\n')) - process.exit(1) - } - - console.log(chalk.cyan(' Build complete.\n')) - console.log(chalk.yellow( - ' Tip: built files are meant to be served over an HTTP server.\n' + - ' Opening index.html over file:// won\'t work.\n' - )) - }) -}) diff --git a/build/bundle.js b/build/bundle.js deleted file mode 100644 index 6577303..0000000 --- a/build/bundle.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict' -require('./check-versions')() - -process.env.NODE_ENV = 'production' - -const ora = require('ora') -const rm = require('rimraf') -const path = require('path') -const chalk = require('chalk') -const webpack = require('webpack') -const config = require('../config') -const webpackConfig = require('./webpack.bundle.conf') - -const spinner = ora('building bundle...') -spinner.start() - -rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { - if (err) throw err - webpack(webpackConfig, function (err, stats) { - spinner.stop() - if (err) throw err - process.stdout.write(stats.toString({ - colors: true, - modules: false, - children: false, - chunks: false, - chunkModules: false - }) + '\n\n') - - if (stats.hasErrors()) { - console.log(chalk.red(' Build failed with errors.\n')) - process.exit(1) - } - - console.log(chalk.cyan(' Build complete.\n')) - }) -}) diff --git a/build/check-versions.js b/build/check-versions.js deleted file mode 100644 index 3ef972a..0000000 --- a/build/check-versions.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict' -const chalk = require('chalk') -const semver = require('semver') -const packageConfig = require('../package.json') -const shell = require('shelljs') - -function exec (cmd) { - return require('child_process').execSync(cmd).toString().trim() -} - -const versionRequirements = [ - { - name: 'node', - currentVersion: semver.clean(process.version), - versionRequirement: packageConfig.engines.node - } -] - -if (shell.which('npm')) { - versionRequirements.push({ - name: 'npm', - currentVersion: exec('npm --version'), - versionRequirement: packageConfig.engines.npm - }) -} - -module.exports = function () { - const warnings = [] - - for (let i = 0; i < versionRequirements.length; i++) { - const mod = versionRequirements[i] - - if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { - warnings.push(mod.name + ': ' + - chalk.red(mod.currentVersion) + ' should be ' + - chalk.green(mod.versionRequirement) - ) - } - } - - if (warnings.length) { - console.log('') - console.log(chalk.yellow('To use this template, you must update following to modules:')) - console.log() - - for (let i = 0; i < warnings.length; i++) { - const warning = warnings[i] - console.log(' ' + warning) - } - - console.log() - process.exit(1) - } -} diff --git a/build/utils.js b/build/utils.js deleted file mode 100644 index 4266abc..0000000 --- a/build/utils.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict' -const path = require('path') -const config = require('../config') -const ExtractTextPlugin = require('extract-text-webpack-plugin') -const packageConfig = require('../package.json') - -exports.assetsPath = function (_path) { - const assetsSubDirectory = process.env.NODE_ENV === 'production' - ? config.build.assetsSubDirectory - : config.dev.assetsSubDirectory - - return path.posix.join(assetsSubDirectory, _path) -} - -exports.cssLoaders = function (options) { - options = options || {} - - const cssLoader = { - loader: 'css-loader', - options: { - sourceMap: options.sourceMap - } - } - - const postcssLoader = { - loader: 'postcss-loader', - options: { - sourceMap: options.sourceMap - } - } - - // generate loader string to be used with extract text plugin - function generateLoaders(loader, loaderOptions) { - const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] - - if (loader) { - loaders.push({ - loader: loader + '-loader', - options: Object.assign({}, loaderOptions, { - sourceMap: options.sourceMap - }) - }) - } - - // Extract CSS when that option is specified - // (which is the case during production build) - if (options.extract) { - return ExtractTextPlugin.extract({ - use: loaders, - fallback: 'vue-style-loader' - }) - } else { - return ['vue-style-loader'].concat(loaders) - } - } - - // https://vue-loader.vuejs.org/en/configurations/extract-css.html - return { - css: generateLoaders(), - postcss: generateLoaders(), - less: generateLoaders('less'), - sass: generateLoaders('sass', { indentedSyntax: true }), - scss: generateLoaders('sass'), - stylus: generateLoaders('stylus'), - styl: generateLoaders('stylus') - } -} - -// Generate loaders for standalone style files (outside of .vue) -exports.styleLoaders = function (options) { - const output = [] - const loaders = exports.cssLoaders(options) - - for (const extension in loaders) { - const loader = loaders[extension] - output.push({ - test: new RegExp('\\.' + extension + '$'), - use: loader - }) - } - - return output -} - -exports.createNotifierCallback = () => { - const notifier = require('node-notifier') - - return (severity, errors) => { - if (severity !== 'error') return - - const error = errors[0] - const filename = error.file && error.file.split('!').pop() - - notifier.notify({ - title: packageConfig.name, - message: severity + ': ' + error.name, - subtitle: filename || '', - icon: path.join(__dirname, 'logo.png') - }) - } -} diff --git a/build/vue-loader.conf.js b/build/vue-loader.conf.js deleted file mode 100644 index 33ed58b..0000000 --- a/build/vue-loader.conf.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict' -const utils = require('./utils') -const config = require('../config') -const isProduction = process.env.NODE_ENV === 'production' -const sourceMapEnabled = isProduction - ? config.build.productionSourceMap - : config.dev.cssSourceMap - -module.exports = { - loaders: utils.cssLoaders({ - sourceMap: sourceMapEnabled, - extract: isProduction - }), - cssSourceMap: sourceMapEnabled, - cacheBusting: config.dev.cacheBusting, - transformToRequire: { - video: ['src', 'poster'], - source: 'src', - img: 'src', - image: 'xlink:href' - } -} diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js deleted file mode 100644 index 77dde03..0000000 --- a/build/webpack.base.conf.js +++ /dev/null @@ -1,97 +0,0 @@ -'use strict' -const path = require('path') -const utils = require('./utils') -const config = require('../config') -const vueLoaderConfig = require('./vue-loader.conf') - -function resolve (dir) { - return path.join(__dirname, '..', dir) -} - -const createLintingRule = () => ({ - test: /\.(js|vue)$/, - loader: 'eslint-loader', - enforce: 'pre', - include: [resolve('app')], - options: { - formatter: require('eslint-friendly-formatter'), - emitWarning: !config.dev.showEslintErrorsInOverlay - } -}) - -module.exports = { - context: path.resolve(__dirname, '../'), - entry: { - app: './app/main.js' - }, - output: { - path: config.build.assetsRoot, - filename: '[name].js', - publicPath: process.env.NODE_ENV === 'production' - ? config.build.assetsPublicPath - : config.dev.assetsPublicPath - }, - resolve: { - extensions: ['.js', '.vue', '.json'], - alias: { - 'vue$': 'vue/dist/vue.esm.js', - '@': resolve('app') - } - }, - module: { - rules: [ - ...(config.dev.useEslint ? [createLintingRule()] : []), - { - test: /\.vue$/, - loader: 'vue-loader', - options: vueLoaderConfig - }, - { - test: /\.js$/, - loader: 'babel-loader', - include: [ - resolve('src'), - resolve('app'), - resolve('node_modules/webpack-dev-server/client'), - resolve('node_modules/resize-detector') - ] - }, - { - test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, - loader: 'url-loader', - options: { - limit: 10000, - name: utils.assetsPath('img/[name].[hash:7].[ext]') - } - }, - { - test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, - loader: 'url-loader', - options: { - limit: 10000, - name: utils.assetsPath('media/[name].[hash:7].[ext]') - } - }, - { - test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, - loader: 'url-loader', - options: { - limit: 10000, - name: utils.assetsPath('fonts/[name].[hash:7].[ext]') - } - } - ] - }, - node: { - // prevent webpack from injecting useless setImmediate polyfill because Vue - // source contains it (although only uses it if it's native). - setImmediate: false, - // prevent webpack from injecting mocks to Node native modules - // that does not make sense for the client - dgram: 'empty', - fs: 'empty', - net: 'empty', - tls: 'empty', - child_process: 'empty' - } -} diff --git a/build/webpack.bundle.conf.js b/build/webpack.bundle.conf.js deleted file mode 100644 index f6c2118..0000000 --- a/build/webpack.bundle.conf.js +++ /dev/null @@ -1,96 +0,0 @@ -'use strict' -const path = require('path') -const utils = require('./utils') -const webpack = require('webpack') -const config = require('../config') -const merge = require('webpack-merge') -const baseWebpackConfig = require('./webpack.base.conf') -const ExtractTextPlugin = require('extract-text-webpack-plugin') -const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') -const UglifyJsPlugin = require('uglifyjs-webpack-plugin') -const LodashModuleReplacementPlugin = require('lodash-webpack-plugin') -const components = require('../src/components') - -const env = require('../config/prod.env') - -const isFully = process.env.PACK_MODE === 'fully' - -const webpackEntry = isFully - ? { 've-charts.min': './src/index.js' } // 权量引入 - : { ...components } // 按需引入 - -baseWebpackConfig.entry = webpackEntry - -const webpackConfig = merge(baseWebpackConfig, { - module: { - rules: utils.styleLoaders({ - sourceMap: config.bundle.productionSourceMap, - extract: true - }) - }, - devtool: config.bundle.productionSourceMap ? config.build.devtool : false, - output: { - path: config.bundle.assetsRoot, - publicPath: config.bundle.assetsPublicRoot, - filename: '[name].js', - library: 've-charts', - libraryTarget: 'umd', - }, - externals: [ - { - vue: 'vue', - }, - function (context, request, callback) { - if (/^echarts|^zrender/.test(request)) { - if (isFully) { - // console.log(request) - return callback(null, 'echarts') - } else { - return callback(null, request) - } - } - callback() - } - ], - plugins: [ - new LodashModuleReplacementPlugin(), - // http://vuejs.github.io/vue-loader/en/workflow/production.html - new webpack.DefinePlugin({ - 'process.env': env - }), - new UglifyJsPlugin({ - uglifyOptions: { - compress: { - warnings: false, - drop_console: true - } - }, - sourceMap: config.bundle.productionSourceMap, - parallel: true - }), - // extract css into its own file - new ExtractTextPlugin({ - filename: 've-charts.min.css' - }), - // Compress extracted CSS. We are using this plugin so that possible - // duplicated CSS from different components can be deduped. - new OptimizeCSSPlugin({ - cssProcessorOptions: config.build.productionSourceMap - ? { safe: true, map: { inline: false } } - : { safe: true } - }), - new webpack.optimize.CommonsChunkPlugin({ - name: 'common', - filename: "common.js", - minChunks: Object.keys(components).length, - chunks: Object.keys(components) - }) - ] -}) - -if (config.build.bundleAnalyzerReport) { - const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin - webpackConfig.plugins.push(new BundleAnalyzerPlugin()) -} - -module.exports = webpackConfig diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js deleted file mode 100644 index e4866f9..0000000 --- a/build/webpack.dev.conf.js +++ /dev/null @@ -1,95 +0,0 @@ -'use strict' -const utils = require('./utils') -const webpack = require('webpack') -const config = require('../config') -const merge = require('webpack-merge') -const path = require('path') -const baseWebpackConfig = require('./webpack.base.conf') -const CopyWebpackPlugin = require('copy-webpack-plugin') -const HtmlWebpackPlugin = require('html-webpack-plugin') -const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') -const portfinder = require('portfinder') - -const HOST = process.env.HOST -const PORT = process.env.PORT && Number(process.env.PORT) - -const devWebpackConfig = merge(baseWebpackConfig, { - module: { - rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) - }, - // cheap-module-eval-source-map is faster for development - devtool: config.dev.devtool, - - // these devServer options should be customized in /config/index.js - devServer: { - clientLogLevel: 'warning', - historyApiFallback: { - rewrites: [ - { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }, - ], - }, - hot: true, - contentBase: false, // since we use CopyWebpackPlugin. - compress: true, - host: HOST || config.dev.host, - port: PORT || config.dev.port, - open: config.dev.autoOpenBrowser, - overlay: config.dev.errorOverlay - ? { warnings: false, errors: true } - : false, - publicPath: config.dev.assetsPublicPath, - proxy: config.dev.proxyTable, - quiet: true, // necessary for FriendlyErrorsPlugin - watchOptions: { - poll: config.dev.poll, - } - }, - plugins: [ - new webpack.DefinePlugin({ - 'process.env': require('../config/dev.env') - }), - new webpack.HotModuleReplacementPlugin(), - new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. - new webpack.NoEmitOnErrorsPlugin(), - // https://github.com/ampedandwired/html-webpack-plugin - new HtmlWebpackPlugin({ - filename: 'index.html', - template: 'index.html', - inject: true - }), - // copy custom static assets - new CopyWebpackPlugin([ - { - from: path.resolve(__dirname, '../static'), - to: config.dev.assetsSubDirectory, - ignore: ['.*'] - } - ]) - ] -}) - -module.exports = new Promise((resolve, reject) => { - portfinder.basePort = process.env.PORT || config.dev.port - portfinder.getPort((err, port) => { - if (err) { - reject(err) - } else { - // publish the new Port, necessary for e2e tests - process.env.PORT = port - // add port to devServer config - devWebpackConfig.devServer.port = port - - // Add FriendlyErrorsPlugin - devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ - compilationSuccessInfo: { - messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], - }, - onErrors: config.dev.notifyOnErrors - ? utils.createNotifierCallback() - : undefined - })) - - resolve(devWebpackConfig) - } - }) -}) diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js deleted file mode 100644 index a17391b..0000000 --- a/build/webpack.prod.conf.js +++ /dev/null @@ -1,145 +0,0 @@ -'use strict' -const path = require('path') -const utils = require('./utils') -const webpack = require('webpack') -const config = require('../config') -const merge = require('webpack-merge') -const baseWebpackConfig = require('./webpack.base.conf') -const CopyWebpackPlugin = require('copy-webpack-plugin') -const HtmlWebpackPlugin = require('html-webpack-plugin') -const ExtractTextPlugin = require('extract-text-webpack-plugin') -const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') -const UglifyJsPlugin = require('uglifyjs-webpack-plugin') - -const env = require('../config/prod.env') - -const webpackConfig = merge(baseWebpackConfig, { - module: { - rules: utils.styleLoaders({ - sourceMap: config.build.productionSourceMap, - extract: true, - usePostCSS: true - }) - }, - devtool: config.build.productionSourceMap ? config.build.devtool : false, - output: { - path: config.build.assetsRoot, - filename: utils.assetsPath('js/[name].[chunkhash].js'), - chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') - }, - plugins: [ - // http://vuejs.github.io/vue-loader/en/workflow/production.html - new webpack.DefinePlugin({ - 'process.env': env - }), - new UglifyJsPlugin({ - uglifyOptions: { - compress: { - warnings: false - } - }, - sourceMap: config.build.productionSourceMap, - parallel: true - }), - // extract css into its own file - new ExtractTextPlugin({ - filename: utils.assetsPath('css/[name].[contenthash].css'), - // Setting the following option to `false` will not extract CSS from codesplit chunks. - // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. - // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, - // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 - allChunks: true, - }), - // Compress extracted CSS. We are using this plugin so that possible - // duplicated CSS from different components can be deduped. - new OptimizeCSSPlugin({ - cssProcessorOptions: config.build.productionSourceMap - ? { safe: true, map: { inline: false } } - : { safe: true } - }), - // generate dist index.html with correct asset hash for caching. - // you can customize output by editing /index.html - // see https://github.com/ampedandwired/html-webpack-plugin - new HtmlWebpackPlugin({ - filename: config.build.index, - template: 'index.html', - inject: true, - minify: { - removeComments: true, - collapseWhitespace: true, - removeAttributeQuotes: true - // more options: - // https://github.com/kangax/html-minifier#options-quick-reference - }, - // necessary to consistently work with multiple chunks via CommonsChunkPlugin - chunksSortMode: 'dependency' - }), - // keep module.id stable when vendor modules does not change - new webpack.HashedModuleIdsPlugin(), - // enable scope hoisting - new webpack.optimize.ModuleConcatenationPlugin(), - // split vendor js into its own file - new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', - minChunks(module) { - // any required modules inside node_modules are extracted to vendor - return ( - module.resource && - /\.js$/.test(module.resource) && - module.resource.indexOf( - path.join(__dirname, '../node_modules') - ) === 0 - ) - } - }), - // extract webpack runtime and module manifest to its own file in order to - // prevent vendor hash from being updated whenever app bundle is updated - new webpack.optimize.CommonsChunkPlugin({ - name: 'manifest', - minChunks: Infinity - }), - // This instance extracts shared chunks from code splitted chunks and bundles them - // in a separate chunk, similar to the vendor chunk - // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk - new webpack.optimize.CommonsChunkPlugin({ - name: 'app', - async: 'vendor-async', - children: true, - minChunks: 3 - }), - - // copy custom static assets - new CopyWebpackPlugin([ - { - from: path.resolve(__dirname, '../static'), - to: config.build.assetsSubDirectory, - ignore: ['.*'] - } - ]) - ] -}) - -if (config.build.productionGzip) { - const CompressionWebpackPlugin = require('compression-webpack-plugin') - - webpackConfig.plugins.push( - new CompressionWebpackPlugin({ - asset: '[path].gz[query]', - algorithm: 'gzip', - test: new RegExp( - '\\.(' + - config.build.productionGzipExtensions.join('|') + - ')$' - ), - threshold: 10240, - minRatio: 0.8 - }) - ) -} - -if (config.build.bundleAnalyzerReport) { - const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin - webpackConfig.plugins.push(new BundleAnalyzerPlugin()) -} - -module.exports = webpackConfig diff --git a/build/webpack.test.conf.js b/build/webpack.test.conf.js deleted file mode 100644 index 0d658d9..0000000 --- a/build/webpack.test.conf.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict' -// This is the webpack config used for unit tests. - -const utils = require('./utils') -const webpack = require('webpack') -const merge = require('webpack-merge') -const baseWebpackConfig = require('./webpack.base.conf') - -const webpackConfig = merge(baseWebpackConfig, { - // use inline sourcemap for karma-sourcemap-loader - module: { - rules: utils.styleLoaders() - }, - devtool: '#inline-source-map', - resolveLoader: { - alias: { - // necessary to to make lang="scss" work in test when using vue-loader's ?inject option - // see discussion at https://github.com/vuejs/vue-loader/issues/724 - 'scss-loader': 'sass-loader' - } - }, - plugins: [ - new webpack.DefinePlugin({ - 'process.env': require('../config/test.env') - }) - ] -}) - -// no need for app entry during tests -delete webpackConfig.entry - -module.exports = webpackConfig diff --git a/config/dev.env.js b/config/dev.env.js deleted file mode 100644 index 1e22973..0000000 --- a/config/dev.env.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' -const merge = require('webpack-merge') -const prodEnv = require('./prod.env') - -module.exports = merge(prodEnv, { - NODE_ENV: '"development"' -}) diff --git a/config/index.js b/config/index.js deleted file mode 100644 index c251ab2..0000000 --- a/config/index.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict' -// Template version: 1.3.1 -// see http://vuejs-templates.github.io/webpack for documentation. - -const path = require('path') - -module.exports = { - dev: { - // Paths - assetsSubDirectory: 'static', - assetsPublicPath: '/', - proxyTable: {}, - - // Various Dev Server settings - host: 'localhost', // can be overwritten by process.env.HOST - port: process.env.PORT || 6066, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined - autoOpenBrowser: false, - errorOverlay: true, - notifyOnErrors: true, - poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- - - // Use Eslint Loader? - // If true, your code will be linted during bundling and - // linting errors and warnings will be shown in the console. - useEslint: true, - // If true, eslint errors and warnings will also be shown in the error overlay - // in the browser. - showEslintErrorsInOverlay: false, - - /** - * Source Maps - */ - - // https://webpack.js.org/configuration/devtool/#development - devtool: 'cheap-module-eval-source-map', - - // If you have problems debugging vue-files in devtools, - // set this to false - it *may* help - // https://vue-loader.vuejs.org/en/options.html#cachebusting - cacheBusting: true, - - cssSourceMap: true - }, - - build: { - // Template for index.html - index: path.resolve(__dirname, '../dist/index.html'), - - // Paths - assetsRoot: path.resolve(__dirname, '../dist'), - assetsSubDirectory: 'static', - assetsPublicPath: '/', - - /** - * Source Maps - */ - - productionSourceMap: true, - // https://webpack.js.org/configuration/devtool/#production - devtool: '#source-map', - - // Gzip off by default as many popular static hosts such as - // Surge or Netlify already gzip all static assets for you. - // Before setting to `true`, make sure to: - // npm install --save-dev compression-webpack-plugin - productionGzip: false, - productionGzipExtensions: ['js', 'css'], - - // Run the build command with an extra argument to - // View the bundle analyzer report after build finishes: - // `npm run build --report` - // Set to `true` or `false` to always turn it on or off - bundleAnalyzerReport: process.env.npm_config_report - }, - - bundle: { - env: require('./prod.env'), - assetsRoot: path.resolve(__dirname, '../lib'), - assetsSubDirectory: '/', - assetsPublicPath: '/', - devtool: '#source-map', - productionSourceMap: false, - productionGzip: false, - productionGzipExtensions: ['js', 'css'], - bundleAnalyzerReport: process.env.npm_config_report - } -} diff --git a/config/prod.env.js b/config/prod.env.js deleted file mode 100644 index a6f9976..0000000 --- a/config/prod.env.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict' -module.exports = { - NODE_ENV: '"production"' -} diff --git a/config/test.env.js b/config/test.env.js deleted file mode 100644 index c2824a3..0000000 --- a/config/test.env.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' -const merge = require('webpack-merge') -const devEnv = require('./dev.env') - -module.exports = merge(devEnv, { - NODE_ENV: '"testing"' -}) diff --git a/index.html b/index.html deleted file mode 100644 index 70574f5..0000000 --- a/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - ve-charts - - -
- - - diff --git a/lib/VeBarChart.js b/lib/VeBarChart.js deleted file mode 100644 index c99d659..0000000 --- a/lib/VeBarChart.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/bar")):"function"==typeof define&&define.amd?define(["vue","echarts/lib/echarts","zrender/lib/svg/svg","echarts/lib/component/title","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/component/dataset","echarts/lib/chart/bar"],t):"object"==typeof exports?exports["ve-charts"]=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/bar")):e["ve-charts"]=t(e.vue,e["echarts/lib/echarts"],e["zrender/lib/svg/svg"],e["echarts/lib/component/title"],e["echarts/lib/component/tooltip"],e["echarts/lib/component/legend"],e["echarts/lib/component/dataset"],e["echarts/lib/chart/bar"])}("undefined"!=typeof self?self:this,function(e,t,i,r,n,a,o,s){return webpackJsonpve_charts([10],{0:function(e,t,i){"use strict";t.__esModule=!0;var r,n=i(4),a=(r=n)&&r.__esModule?r:{default:r};t.default=a.default||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i}},10:function(e,t){e.exports=r},109:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(110);t.default=r.a},11:function(e,t){e.exports=n},110:function(e,t,i){"use strict";var r=i(61),n=i(225),a=i(3)(r.a,n.a,!1,null,null,null);t.a=a.exports},12:function(e,t){e.exports=a},13:function(e,t){e.exports=o},223:function(e,t,i){"use strict";i.d(t,"a",function(){return b});var r=i(44),n=i.n(r),a=i(1),o=i.n(a),s=i(0),c=i.n(s),l=i(66),u=i.n(l),p=i(39),d=i.n(p),f=i(2),m=i(18);function h(e){var t={type:e.dimAxisType,axisTick:{show:!1},axisLabel:{margin:10,fontWeight:400}},i=[];return i.push(t),i}function v(e,t){var i=t.meaAxisType,r=t.meaAxisDigits,n=t.yAxisScale,a=void 0!==n&&n,o=t.percentage,s=void 0!==o&&o,l=t.yAxisName,p=t.yAxisInterval,f=t.yAxisMax,h=t.yAxisMin,v={type:"value",scale:a,axisTick:{show:!1},min:s?0:null,max:s?1:null},x=[];return i.forEach(function(e,t){var i={margin:10,fontWeight:400};if("normal"!==e)if(d()(r)){var n=u()(r[t])?0:r[t];i.formatter=function(t){return Object(m.a)(e,t,n)}}else i.formatter=function(t){return Object(m.a)(e,t,r)};var a=c()({},v,{axisLabel:i});l&&l.length&&(a.name=l[t]),p&&p.length&&p[t]&&(a.interval=Number(p[t])),!1===s&&f&&f.length&&(a.max=f[t]),!1===s&&h&&h.length&&(a.min=h[t]),x.push(a)}),x}function x(e,t,i){e.dimensions;var r=e.measures,a=t.label,s=void 0===a?{}:a,l=t.showLine,u=void 0===l?[]:l,p=t.stack,d=void 0===p?null:p,h=t.secondMeaAxis,v=void 0===h?[]:h,x=t.itemStyle,b=void 0===x?{}:x,y=t.waterfall,g=o()(t,["label","showLine","stack","secondMeaAxis","itemStyle","waterfall"]),A=i?"xAxisIndex":"yAxisIndex",_=[],q=d&&Object(m.d)(d);return r.forEach(function(e){var t,r=e.name,a={};s instanceof Array?void 0===(a=s.filter(function(e){return e.name===r})[0])&&(a={}):a=s;var l=u.includes(r)?"line":"bar",p=c()((t={type:l,name:r,label:function(e,t){var i=e.position,r=void 0===i?t?"right":"top":i,n=e.formatType,a=void 0===n?"currency":n,s=e.formatDigits,l=void 0===s?0:s,u=o()(e,["position","formatType","formatDigits"]);return c()({position:r,formatter:function(e){var t=e.value,i=e.seriesIndex;return t.shift(),Object(m.a)(a,t[i],l)}},u)}(a,i),stack:d&&q[r]},n()(t,A,v.includes(r)?"1":"0"),n()(t,"itemStyle",b[r]?b[r]:{}),t),g);y&&!0===y&&"secondaryMeasure"===r&&(p.itemStyle=f.e[r]),_.push(p)}),_}var b=function(e,t,i){var r=i.tooltipVisible,n=i.legendVisible,a=i.isEmptyData,o=t.direction,s=void 0===o?"column":o,c=t.secondMeaAxis,l=void 0===c?null:c,u=t.yAxisLabelType,p=t.yAxisLabelDigits,d=void 0===p?0:p,b=t.yAxisName,y=t.xAxisLabelType,g=t.xAxisLabelDigits,A=void 0===g?0:g,_=t.xAxisName,q="column"!==s&&"row"===s,T=null!==l?["normal","normal"]:["normal"];t.meaAxisType=(q?y:u)||T,t.meaAxisDigits=q?A:d,t.meaAxisName=(q?_:b)||[],t.dimAxisType=(q?u:y)||"category",t.dimAxisDigits=q?d:A,t.dimAxisName=(q?b:_)||"",T.length>t.meaAxisType.length&&(t.meaAxisType=T.fill(t.meaAxisType[0])),i.chartType="bar";var w=!a&&Object(m.b)(e,t,i),O=r&&function(e){return{trigger:"axis",axisPointer:{type:"shadow"},formatter:e.tooltipFormatter}}(t),j=n&&function(e,t){var i=e.measures,r=t.legendType,n=t.legendPadding,a=t.waterfall,o={type:r||"plain",padding:n||5};return a&&!0===a&&(o.data=i.filter(function(e){var t=e.name;if("secondaryMeasure"!==t)return t})),o}(e,t);return{grid:function(e){return e?{right:30,bottom:10,left:30,containLabel:!0}:f.c.grid}(q),dataset:w,tooltip:O,legend:j,xAxis:q?v(0,t):h(t),yAxis:q?h(t):v(0,t),series:x(e,t,q)}}},224:function(e,t){e.exports=s},225:function(e,t,i){"use strict";var r={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"ve-charts-parent",style:e.parentStyle},[e.isHasData?i("base-echarts",e._g({attrs:{"init-options":e.initOptions,options:e.options,autoResize:!0,theme:e.theme,"chart-height":e.height,ec:e.ec},on:{"update:ec":function(t){e.ec=t}}},e.$listeners)):e._e(),e._v(" "),e.isHasData||e.loading?e._e():e._t("default",[i("empty-data",{attrs:{"empty-text":e.emptyText}})]),e._v(" "),e.loading?i("loading-chart"):e._e()],2)},staticRenderFns:[]};t.a=r},6:function(t,i){t.exports=e},61:function(e,t,i){"use strict";var r=i(8),n=i(2),a=i(223),o=i(224);i.n(o);t.a={name:"VeBarChart",mixins:[r.a],data:function(){return{options:n.c}},created:function(){this.chartHandler=a.a}}},7:function(e,i){e.exports=t},9:function(e,t){e.exports=i}},[109])}); \ No newline at end of file diff --git a/lib/VeDonutChart.js b/lib/VeDonutChart.js deleted file mode 100644 index 5d39dc2..0000000 --- a/lib/VeDonutChart.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/pie")):"function"==typeof define&&define.amd?define(["vue","echarts/lib/echarts","zrender/lib/svg/svg","echarts/lib/component/title","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/component/dataset","echarts/lib/chart/pie"],t):"object"==typeof exports?exports["ve-charts"]=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/pie")):e["ve-charts"]=t(e.vue,e["echarts/lib/echarts"],e["zrender/lib/svg/svg"],e["echarts/lib/component/title"],e["echarts/lib/component/tooltip"],e["echarts/lib/component/legend"],e["echarts/lib/component/dataset"],e["echarts/lib/chart/pie"])}("undefined"!=typeof self?self:this,function(e,t,n,r,i,o,a,s){return webpackJsonpve_charts([3],{0:function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(4),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},10:function(e,t){e.exports=r},11:function(e,t){e.exports=i},12:function(e,t){e.exports=o},13:function(e,t){e.exports=a},226:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(227);t.default=r.a},227:function(e,t,n){"use strict";var r=n(95),i=n(228),o=n(3)(r.a,i.a,!1,null,null,null);t.a=o.exports},228:function(e,t,n){"use strict";var r={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ve-charts-parent",style:e.parentStyle},[e.isHasData?n("base-echarts",e._g({attrs:{"init-options":e.initOptions,options:e.options,autoResize:!0,theme:e.theme,"chart-height":e.height,ec:e.ec},on:{"update:ec":function(t){e.ec=t}}},e.$listeners)):e._e(),e._v(" "),e.isHasData||e.loading?e._e():e._t("default",[n("empty-data",{attrs:{"empty-text":e.emptyText}})]),e._v(" "),e.loading?n("loading-chart"):e._e()],2)},staticRenderFns:[]};t.a=r},29:function(e,t,n){e.exports={default:n(30),__esModule:!0}},30:function(e,t,n){n(28),n(22),e.exports=n(31)},31:function(e,t,n){var r=n(16),i=n(26);e.exports=n(5).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},58:function(e,t,n){"use strict";n.d(t,"b",function(){return f}),n.d(t,"a",function(){return d});var r=n(27),i=(n.n(r),n(0)),o=n.n(i),a=n(1),s=n.n(a),c=n(29),u=n.n(c),l=n(18);function p(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=[],a=e.measures,c=t.offsetY,u=t.radius,l=void 0===u?n?["50%","70%"]:[0,"75%"]:u,p=t.selectedMode,f=void 0!==p&&p,d=s()(t,["offsetY","radius","selectedMode"]);return a.forEach(function(e,t){var n=e.name;e.data;i.push(o()({type:"pie",name:n,selectedMode:f,center:c?["50%",c]:["50%","50%"],radius:l,datasetIndex:r},d))}),i}var f=function(e,t,n,r){var i=n.tooltipVisible,o=n.legendVisible,a={dataset:function(e,t,n){var r=[];if(n.chartType="pie",e.length&&1!==e.length){if(e.length>1){var i=!0,o=!1,a=void 0;try{for(var s,c=u()(e);!(i=(s=c.next()).done);i=!0){var p=s.value;r.push(Object(l.b)(p,t,n))}}catch(e){o=!0,a=e}finally{try{!i&&c.return&&c.return()}finally{if(o)throw a}}}}else r.push(Object(l.b)(e,t,n));return r}(e,t,n),tooltip:i&&{trigger:"item"},legend:o&&function(e){var t=e.settings,n=t.legendType,r=void 0===n?"plain":n,i=t.legendPadding;return{type:r,padding:void 0===i?5:i}}({settings:t}),series:function(e){var t=e.data,n=e.settings,r=e.isDonut,i=[];if(void 0===t.length)i=p(t,n,r);else if(1===t.length)i=p(t[0],n,r);else if(2===t.length)for(var o in t)i.push(p(t[o],n[o],r,o)[0]);return i}({data:e,settings:t,isDonut:r})};return a},d=function(e,t,n){return f(e,t,n,!0)}},59:function(e,t){e.exports=s},6:function(t,n){t.exports=e},7:function(e,n){e.exports=t},9:function(e,t){e.exports=n},95:function(e,t,n){"use strict";var r=n(8),i=n(2),o=n(58),a=n(59);n.n(a);t.a={name:"VeDonutChart",mixins:[r.a],data:function(){return{options:i.c}},created:function(){this.chartHandler=o.a}}}},[226])}); \ No newline at end of file diff --git a/lib/VeFunnelChart.js b/lib/VeFunnelChart.js deleted file mode 100644 index 78d2e4c..0000000 --- a/lib/VeFunnelChart.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/funnel")):"function"==typeof define&&define.amd?define(["vue","echarts/lib/echarts","zrender/lib/svg/svg","echarts/lib/component/title","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/component/dataset","echarts/lib/chart/funnel"],t):"object"==typeof exports?exports["ve-charts"]=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/funnel")):e["ve-charts"]=t(e.vue,e["echarts/lib/echarts"],e["zrender/lib/svg/svg"],e["echarts/lib/component/title"],e["echarts/lib/component/tooltip"],e["echarts/lib/component/legend"],e["echarts/lib/component/dataset"],e["echarts/lib/chart/funnel"])}("undefined"!=typeof self?self:this,function(e,t,n,r,i,o,a,u){return webpackJsonpve_charts([0],{0:function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(4),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},10:function(e,t){e.exports=r},11:function(e,t){e.exports=i},12:function(e,t){e.exports=o},13:function(e,t){e.exports=a},229:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(230);t.default=r.a},230:function(e,t,n){"use strict";var r=n(96),i=n(242),o=n(3)(r.a,i.a,!1,null,null,null);t.a=o.exports},231:function(e,t,n){"use strict";n.d(t,"a",function(){return y});var r=n(0),i=n.n(r),o=n(232),a=n.n(o),u=n(1),s=n.n(u),c=n(89),l=n.n(c),f=n(236),d=n.n(f),p=n(239),h=n.n(p),v=n(6),m=n.n(v),b=n(18);function g(e){var t=this,n=e.data,r=e.settings,o=n.dimensions,u=n.measures,c=o&&o.name+" ",f=r.funnelSort,p=void 0===f?"desc":f,v=r.funnelAlign,b=void 0===v?"center":v,g=r.contrast,y=void 0!==g&&g,x=r.symmetric,_=void 0!==x&&x,q=r.labelPosition,O=void 0===q?"outside":q,w=r.funnelLabel,M=s()(r,["funnelSort","funnelAlign","contrast","symmetric","labelPosition","funnelLabel"]),j=[];return u.forEach(function(e,n){var r=e.name;e.data;j.push(i()({type:"funnel",name:r,sort:"desc"===p?"descending":"ascending",funnelAlign:function(e,t){return e?0===t?"right":"left":b}(_,n),width:_?"40%":"80%",x:function(e,t){return e?0===t?"10%":"50%":"10%"}(_,n),maxSize:y&&0!==n?function(e){if(!(e.length>2)){var n="";return e.length>1&&(n=100*e.reduce(function(e,t){return l()(d()([h()(e.data),h()(t.data)])/h()([h()(e.data),h()(t.data)]),2)})+"%"),n}m.a.util.warn("data.measures.length is more then 2 in [Contrastive funnel chart]. Please use 2 measures",t)}(u):"100%",label:function(e,t){var n=e.contrast,r=e.symmetric,i=e.funnelLabel;if(i)return Array.isArray(i)?i[t]:i;var o={normal:{position:O}};n&&(o=0===t?o:{normal:{position:"inside",formatter:function(e){var t=u.reduce(function(e,t){return h()([h()(e.data),h()(t.data)])}),n=a()(e.value,3)[2];return Math.round(n/t*100,2)+"%"}},emphasis:{position:"inside",formatter:function(e){var t=u.reduce(function(e,t){return h()([h()(e.data),h()(t.data)])}),n=a()(e.value,3),r=n[0],i=n[2];return r+" "+Math.round(i/t*100,2)+"%"}}});r&&(o=0===t?{normal:{position:"outside"!==O?O:"left"}}:{normal:{position:"outside"!==O?O:"right"}});return o}({contrast:y,symmetric:_,funnelLabel:w},n),encode:function(e,t){return{itemName:e,value:t}}(c,r)},M))}),j}var y=function(e,t,n,r){var i=n.tooltipVisible,o=n.legendVisible;return n.chartType="funnel",{dataset:Object(b.b)(e,t,n),tooltip:i&&{trigger:"item"},legend:o&&function(e){var t=e.settings,n=t.legendType,r=void 0===n?"plain":n,i=t.legendPadding;return{type:r,padding:void 0===i?5:i}}({settings:t}),series:g({data:e,settings:t,isDonut:r})}}},232:function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(233)),i=o(n(29));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(){return function(e,t){if(Array.isArray(e))return e;if((0,r.default)(Object(e)))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var u,s=(0,i.default)(e);!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},233:function(e,t,n){e.exports={default:n(234),__esModule:!0}},234:function(e,t,n){n(28),n(22),e.exports=n(235)},235:function(e,t,n){var r=n(56),i=n(15)("iterator"),o=n(23);e.exports=n(5).isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},236:function(e,t,n){var r=n(97),i=n(238),o=n(45);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},237:function(e,t){e.exports=function(){return!1}},238:function(e,t){e.exports=function(e,t){return et}},241:function(e,t){e.exports=u},242:function(e,t,n){"use strict";var r={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ve-charts-parent",style:e.parentStyle},[e.isHasData?n("base-echarts",e._g({attrs:{"init-options":e.initOptions,options:e.options,autoResize:!0,theme:e.theme,"chart-height":e.height,ec:e.ec},on:{"update:ec":function(t){e.ec=t}}},e.$listeners)):e._e(),e._v(" "),e.isHasData||e.loading?e._e():e._t("default",[n("empty-data",{attrs:{"empty-text":e.emptyText}})]),e._v(" "),e.loading?n("loading-chart"):e._e()],2)},staticRenderFns:[]};t.a=r},29:function(e,t,n){e.exports={default:n(30),__esModule:!0}},30:function(e,t,n){n(28),n(22),e.exports=n(31)},31:function(e,t,n){var r=n(16),i=n(26);e.exports=n(5).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},6:function(t,n){t.exports=e},7:function(e,n){e.exports=t},9:function(e,t){e.exports=n},96:function(e,t,n){"use strict";var r=n(8),i=n(2),o=n(231),a=n(241);n.n(a);t.a={name:"VeFunnelChart",mixins:[r.a],data:function(){return{options:i.c}},created:function(){this.chartHandler=o.a}}},97:function(e,t,n){var r=n(237);e.exports=function(e,t,n){for(var i=-1,o=e.length;++i=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},10:function(e,t){e.exports=n},11:function(e,t){e.exports=i},12:function(e,t){e.exports=a},13:function(e,t){e.exports=o},243:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(244);t.default=n.a},244:function(e,t,r){"use strict";var n=r(98),i=r(247),a=r(3)(n.a,i.a,!1,null,null,null);t.a=a.exports},245:function(e,t,r){"use strict";r.d(t,"a",function(){return c});var n=r(27),i=(r.n(n),r(0)),a=r.n(i),o=r(1),s=r.n(o);var c=function(e,t,r){var n={tooltip:r.tooltipVisible&&{trigger:"item"},series:function(e){var t=e.data,r=e.settings,n=t&&t.measures&&t.measures[0],i=n.name,o=n.data,c=r.min,u=void 0===c?0:c,l=r.max,p=void 0===l?100:l,d=r.offsetY,f=r.radius,h=void 0===f?"75%":f,m=s()(r,["min","max","offsetY","radius"]);return[a()({name:i,type:"gauge",min:u,max:p,center:d?["50%",d]:["50%","50%"],radius:h,data:o},m)]}({data:e,settings:t})};return n}},246:function(e,t){e.exports=s},247:function(e,t,r){"use strict";var n={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"ve-charts-parent",style:e.parentStyle},[e.isHasData?r("base-echarts",e._g({attrs:{"init-options":e.initOptions,options:e.options,autoResize:!0,theme:e.theme,"chart-height":e.height,ec:e.ec},on:{"update:ec":function(t){e.ec=t}}},e.$listeners)):e._e(),e._v(" "),e.isHasData||e.loading?e._e():e._t("default",[r("empty-data",{attrs:{"empty-text":e.emptyText}})]),e._v(" "),e.loading?r("loading-chart"):e._e()],2)},staticRenderFns:[]};t.a=n},6:function(t,r){t.exports=e},7:function(e,r){e.exports=t},9:function(e,t){e.exports=r},98:function(e,t,r){"use strict";var n=r(8),i=r(2),a=r(245),o=r(246);r.n(o);t.a={name:"VeGaugeChart",mixins:[n.a],data:function(){return{options:i.c}},created:function(){this.chartHandler=a.a}}}},[243])}); \ No newline at end of file diff --git a/lib/VeGeoChart.js b/lib/VeGeoChart.js deleted file mode 100644 index c88db4b..0000000 --- a/lib/VeGeoChart.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/scatter"),require("echarts/lib/chart/map"),require("echarts/lib/chart/effectScatter"),require("echarts/lib/chart/heatmap"),require("echarts/lib/component/visualMap"),require("echarts/lib/component/geo")):"function"==typeof define&&define.amd?define(["vue","echarts/lib/echarts","zrender/lib/svg/svg","echarts/lib/component/title","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/component/dataset","echarts/lib/chart/scatter","echarts/lib/chart/map","echarts/lib/chart/effectScatter","echarts/lib/chart/heatmap","echarts/lib/component/visualMap","echarts/lib/component/geo"],e):"object"==typeof exports?exports["ve-charts"]=e(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/scatter"),require("echarts/lib/chart/map"),require("echarts/lib/chart/effectScatter"),require("echarts/lib/chart/heatmap"),require("echarts/lib/component/visualMap"),require("echarts/lib/component/geo")):t["ve-charts"]=e(t.vue,t["echarts/lib/echarts"],t["zrender/lib/svg/svg"],t["echarts/lib/component/title"],t["echarts/lib/component/tooltip"],t["echarts/lib/component/legend"],t["echarts/lib/component/dataset"],t["echarts/lib/chart/scatter"],t["echarts/lib/chart/map"],t["echarts/lib/chart/effectScatter"],t["echarts/lib/chart/heatmap"],t["echarts/lib/component/visualMap"],t["echarts/lib/component/geo"])}("undefined"!=typeof self?self:this,function(t,e,r,n,o,a,i,c,s,u,l,h,f){return webpackJsonpve_charts([1],{0:function(t,e,r){"use strict";e.__esModule=!0;var n,o=r(4),a=(n=o)&&n.__esModule?n:{default:n};e.default=a.default||function(t){for(var e=1;e"+t.marker+r+": "+(Array.isArray(n)?n[2]:n)}}}function k(t){var e=t.legendData,r=t.settings,n=r.legendType,o=void 0===n?"plain":n,a=r.legendPadding;return{type:o,padding:void 0===a?5:a,data:e}}function z(t){var e=t.settings,r=e.labelVisible,n=void 0!==r&&r,o=e.label,a=e.itemStyle,i=e.silent,c=void 0!==i&&i,s=e.zoom,u=void 0===s?1:s,l=e.roam,h=void 0!==l&&l,f=e.mapName,p={map:void 0===f?"china":f,silent:c,roam:h,selectedMode:"single",label:n?o:{normal:{show:!1},emphasis:{show:!1}},zoom:u};return a&&(p.itemStyle=a),p}function R(t){var e=t.max,r=void 0===e?200:e,n=t.settings.visualMap;return d()({min:0,max:r,left:"left",top:"bottom",show:!0,calculable:!0},n)}var G,T=(G=h()(a.a.mark(function t(e,r,n){var o,i,c,s,u,l,h,f,p,m,d,v,g,y,b,x,w,_;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=n.tooltipVisible,i=n.legendVisible,c=n._once,s=r.mode,u=void 0===s?"map":s,l=r.visualMapVisible,h=void 0!==l&&l,f="map"===u,r.isMapMode=f,p=j({data:e,settings:r}),m=p.legendData,d=p.seriesData,v=p.max,g=o&&P(f),y=i&&k({legendData:m,settings:r}),b=!f&&z({data:e,settings:r}),x=h&&R({max:v,settings:r}),w={tooltip:g,legend:y,visualMap:x,geo:b,series:d},_={mapName:r.mapName,specialAreas:r.specialAreas,mapUrlPrefix:r.mapUrlPrefix,_once:c},t.next=13,N(_);case 13:return t.abrupt("return",w);case 14:case"end":return t.stop()}},t,O)})),function(t,e,r){return G.apply(this,arguments)})},288:function(t,e,r){t.exports=r(289)},289:function(t,e,r){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,a=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r(290),o)n.regeneratorRuntime=a;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}},290:function(t,e){!function(e){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag",u="object"==typeof t,l=e.regeneratorRuntime;if(l)u&&(t.exports=l);else{(l=e.regeneratorRuntime=u?t.exports:{}).wrap=x;var h="suspendedStart",f="suspendedYield",p="executing",m="completed",d={},v={};v[i]=function(){return this};var g=Object.getPrototypeOf,y=g&&g(g(P([])));y&&y!==n&&o.call(y,i)&&(v=y);var b=q.prototype=_.prototype=Object.create(v);L.prototype=b.constructor=q,q.constructor=L,q[s]=L.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===L||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,q):(t.__proto__=q,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(b),t},l.awrap=function(t){return{__await:t}},E(M.prototype),M.prototype[c]=function(){return this},l.AsyncIterator=M,l.async=function(t,e,r,n){var o=new M(x(t,e,r,n));return l.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},E(b),b[s]="Generator",b[i]=function(){return this},b.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},l.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(N),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),d}}}function x(t,e,r,n){var o=e&&e.prototype instanceof _?e:_,a=Object.create(o.prototype),i=new j(n||[]);return a._invoke=function(t,e,r){var n=h;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===m){if("throw"===o)throw a;return k()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=S(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=w(t,e,r);if("normal"===s.type){if(n=r.done?m:f,s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=m,r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function w(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function _(){}function L(){}function q(){}function E(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function M(t){var e;this._invoke=function(r,n){function a(){return new Promise(function(e,a){!function e(r,n,a,i){var c=w(t[r],t,n);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,a,i)},function(t){e("throw",t,a,i)}):Promise.resolve(u).then(function(t){s.value=t,a(s)},i)}i(c.arg)}(r,n,e,a)})}return e=e?e.then(a,a):a()}}function S(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,S(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=w(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,d):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n=0||Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n]);return i}},10:function(e,t){e.exports=n},11:function(e,t){e.exports=r},12:function(e,t){e.exports=o},13:function(e,t){e.exports=s},248:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(249);t.default=n.a},249:function(e,t,i){"use strict";var n=i(99),r=i(252),o=i(3)(n.a,r.a,!1,null,null,null);t.a=o.exports},250:function(e,t,i){"use strict";i.d(t,"a",function(){return l});var n=i(0),r=i.n(n),o=i(1),s=i.n(o),a=i(18);function c(e){var t=e.data,i=e.settings,n=t.measures,o=i.label,c=void 0===o?{}:o,l=i.showSymbol,u=void 0===l||l,p=i.smooth,d=void 0!==p&&p,h=i.stack,f=void 0===h?null:h,b=i.step,m=void 0===b?null:b,v=i.symbol,y=void 0===v?"emptyCircle":v,g=i.symbolSize,x=void 0===g?4:g,_=s()(i,["label","showSymbol","smooth","stack","step","symbol","symbolSize"]),q=[];return n.forEach(function(e,t){var i=e.name;e.data;q.push(r()({type:"line",name:i,label:function(e){var t=e.position,i=void 0===t?"top":t,n=e.formatType,o=void 0===n?"currency":n,c=e.formatDigits,l=void 0===c?0:c,u=s()(e,["position","formatType","formatDigits"]);return{normal:r()({position:i,formatter:function(e){var t=e.value,i=e.seriesIndex;return t.shift(),Object(a.a)(o,t[i],l)}},u)}}(c),lineStyle:{normal:{width:2}},showSymbol:u,smooth:d,stack:f,step:m,symbol:y,symbolSize:x},_))}),q}var l=function(e,t,i){var n=i.tooltipVisible,r=i.legendVisible,o=i.isEmptyData;return i.chartType="line",{dataset:!o&&Object(a.b)(e,t,i),tooltip:n&&{trigger:"axis"},legend:r&&function(e){var t=e.settings,i=t.legendType,n=void 0===i?"plain":i,r=t.legendPadding;return{type:n,padding:void 0===r?5:r}}({settings:t}),xAxis:{type:{settings:t}.settings.yAxisType||"category",boundaryGap:!1,axisTick:{show:!1},axisLabel:{margin:10,fontWeight:400}},yAxis:function(e){var t=e.settings,i=t.yAxisScale,n=t.yAxisLabelType,r=t.yAxisLabelDigits,o=t.yAxisName,s=t.yAxisInterval,c=t.yAxisMax,l=t.yAxisMin,u={type:"value",scale:i,axisTick:{show:!1},axisLabel:{margin:10,fontWeight:400,formatter:function(e){return Object(a.a)(n,e,r)}}};return o&&(u.name=o),s&&(u.interval=Number(s)),c&&(u.max=c),l&&(u.min=l),u}({settings:t}),series:!o&&c({data:e,settings:t})}}},251:function(e,t){e.exports=a},252:function(e,t,i){"use strict";var n={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"ve-charts-parent",style:e.parentStyle},[e.isHasData?i("base-echarts",e._g({attrs:{"init-options":e.initOptions,options:e.options,autoResize:!0,theme:e.theme,"chart-height":e.height,ec:e.ec},on:{"update:ec":function(t){e.ec=t}}},e.$listeners)):e._e(),e._v(" "),e.isHasData||e.loading?e._e():e._t("default",[i("empty-data",{attrs:{"empty-text":e.emptyText}})]),e._v(" "),e.loading?i("loading-chart"):e._e()],2)},staticRenderFns:[]};t.a=n},6:function(t,i){t.exports=e},7:function(e,i){e.exports=t},9:function(e,t){e.exports=i},99:function(e,t,i){"use strict";var n=i(8),r=i(2),o=i(250),s=i(251);i.n(s);t.a={name:"VeLineChart",mixins:[n.a],data:function(){return{options:r.c,initOptions:{renderer:"canvas"}}},created:function(){this.chartHandler=o.a}}}},[248])}); \ No newline at end of file diff --git a/lib/VeLiquidfillChart.js b/lib/VeLiquidfillChart.js deleted file mode 100644 index 81eff80..0000000 --- a/lib/VeLiquidfillChart.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts-liquidfill/dist/echarts-liquidfill.min")):"function"==typeof define&&define.amd?define(["vue","echarts/lib/echarts","zrender/lib/svg/svg","echarts/lib/component/title","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/component/dataset","echarts-liquidfill/dist/echarts-liquidfill.min"],t):"object"==typeof exports?exports["ve-charts"]=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts-liquidfill/dist/echarts-liquidfill.min")):e["ve-charts"]=t(e.vue,e["echarts/lib/echarts"],e["zrender/lib/svg/svg"],e["echarts/lib/component/title"],e["echarts/lib/component/tooltip"],e["echarts/lib/component/legend"],e["echarts/lib/component/dataset"],e["echarts-liquidfill/dist/echarts-liquidfill.min"])}("undefined"!=typeof self?self:this,function(e,t,i,r,n,s,a,o){return webpackJsonpve_charts([12],{0:function(e,t,i){"use strict";t.__esModule=!0;var r,n=i(4),s=(r=n)&&r.__esModule?r:{default:r};t.default=s.default||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},10:function(e,t){e.exports=n},100:function(e,t,r){"use strict";var n=r(8),i=r(2),o=r(58),a=r(59);r.n(a);t.a={name:"VePieChart",mixins:[n.a],data:function(){return{options:i.c}},created:function(){this.chartHandler=o.b}}},11:function(e,t){e.exports=i},12:function(e,t){e.exports=o},13:function(e,t){e.exports=a},253:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(254);t.default=n.a},254:function(e,t,r){"use strict";var n=r(100),i=r(255),o=r(3)(n.a,i.a,!1,null,null,null);t.a=o.exports},255:function(e,t,r){"use strict";var n={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"ve-charts-parent",style:e.parentStyle},[e.isHasData?r("base-echarts",e._g({attrs:{"init-options":e.initOptions,options:e.options,autoResize:!0,theme:e.theme,"chart-height":e.height,ec:e.ec},on:{"update:ec":function(t){e.ec=t}}},e.$listeners)):e._e(),e._v(" "),e.isHasData||e.loading?e._e():e._t("default",[r("empty-data",{attrs:{"empty-text":e.emptyText}})]),e._v(" "),e.loading?r("loading-chart"):e._e()],2)},staticRenderFns:[]};t.a=n},29:function(e,t,r){e.exports={default:r(30),__esModule:!0}},30:function(e,t,r){r(28),r(22),e.exports=r(31)},31:function(e,t,r){var n=r(16),i=r(26);e.exports=r(5).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},58:function(e,t,r){"use strict";r.d(t,"b",function(){return f}),r.d(t,"a",function(){return d});var n=r(27),i=(r.n(n),r(0)),o=r.n(i),a=r(1),s=r.n(a),c=r(29),u=r.n(c),l=r(18);function p(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=[],a=e.measures,c=t.offsetY,u=t.radius,l=void 0===u?r?["50%","70%"]:[0,"75%"]:u,p=t.selectedMode,f=void 0!==p&&p,d=s()(t,["offsetY","radius","selectedMode"]);return a.forEach(function(e,t){var r=e.name;e.data;i.push(o()({type:"pie",name:r,selectedMode:f,center:c?["50%",c]:["50%","50%"],radius:l,datasetIndex:n},d))}),i}var f=function(e,t,r,n){var i=r.tooltipVisible,o=r.legendVisible,a={dataset:function(e,t,r){var n=[];if(r.chartType="pie",e.length&&1!==e.length){if(e.length>1){var i=!0,o=!1,a=void 0;try{for(var s,c=u()(e);!(i=(s=c.next()).done);i=!0){var p=s.value;n.push(Object(l.b)(p,t,r))}}catch(e){o=!0,a=e}finally{try{!i&&c.return&&c.return()}finally{if(o)throw a}}}}else n.push(Object(l.b)(e,t,r));return n}(e,t,r),tooltip:i&&{trigger:"item"},legend:o&&function(e){var t=e.settings,r=t.legendType,n=void 0===r?"plain":r,i=t.legendPadding;return{type:n,padding:void 0===i?5:i}}({settings:t}),series:function(e){var t=e.data,r=e.settings,n=e.isDonut,i=[];if(void 0===t.length)i=p(t,r,n);else if(1===t.length)i=p(t[0],r,n);else if(2===t.length)for(var o in t)i.push(p(t[o],r[o],n,o)[0]);return i}({data:e,settings:t,isDonut:n})};return a},d=function(e,t,r){return f(e,t,r,!0)}},59:function(e,t){e.exports=s},6:function(t,r){t.exports=e},7:function(e,r){e.exports=t},9:function(e,t){e.exports=r}},[253])}); \ No newline at end of file diff --git a/lib/VeRadarChart.js b/lib/VeRadarChart.js deleted file mode 100644 index 7507767..0000000 --- a/lib/VeRadarChart.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/radar")):"function"==typeof define&&define.amd?define(["vue","echarts/lib/echarts","zrender/lib/svg/svg","echarts/lib/component/title","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/component/dataset","echarts/lib/chart/radar"],t):"object"==typeof exports?exports["ve-charts"]=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/radar")):e["ve-charts"]=t(e.vue,e["echarts/lib/echarts"],e["zrender/lib/svg/svg"],e["echarts/lib/component/title"],e["echarts/lib/component/tooltip"],e["echarts/lib/component/legend"],e["echarts/lib/component/dataset"],e["echarts/lib/chart/radar"])}("undefined"!=typeof self?self:this,function(e,t,r,n,a,i,s,o){return webpackJsonpve_charts([13],{10:function(e,t){e.exports=n},101:function(e,t,r){"use strict";var n=r(8),a=r(2),i=r(258),s=r(259);r.n(s);t.a={name:"VeRadarChart",mixins:[n.a],data:function(){return{options:a.c}},created:function(){this.chartHandler=i.a}}},11:function(e,t){e.exports=a},12:function(e,t){e.exports=i},13:function(e,t){e.exports=s},256:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(257);t.default=n.a},257:function(e,t,r){"use strict";var n=r(101),a=r(260),i=r(3)(n.a,a.a,!1,null,null,null);t.a=i.exports},258:function(e,t,r){"use strict";r.d(t,"a",function(){return i});var n=r(4),a=r.n(n);var i=function(e,t,r){var n=r.tooltipVisible,i=r.legendVisible,s=r.isEmptyData,o=t.itemStyle;if(s)return{};var c=n&&{trigger:"item"},l=i&&function(e){var t=e.data,r=e.settings,n=r.legendType,a=void 0===n?"plain":n,i=r.legendPadding;return{type:a,padding:void 0===i?5:i,data:t.measures.map(function(e){return e.name})}}({data:e,settings:t}),u=function(e){var t=e.data,r=e.settings,n=r.offsetY,a=void 0===n?"50%":n,i=r.radius,s=void 0===i?"75%":i,o=r.splitNumber,c=void 0===o?5:o,l=r.shape,u=void 0===l?"polygon":l,d=r.splitArea;return{name:{textStyle:{padding:[3,5]}},center:["50%",a],radius:s,splitNumber:c,shape:u,splitArea:void 0===d?{}:d,indicator:t.dimensions}}({data:e,settings:t});return{tooltip:c,legend:l,radar:u,series:function(e){var t=e.itemStyle,r=[];return e.data.measures.forEach(function(e,n){r.push({type:"radar",data:[{name:e.name,value:e.data}],itemStyle:a()({},t)})}),r}({data:e,itemStyle:o})}}},259:function(e,t){e.exports=o},260:function(e,t,r){"use strict";var n={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"ve-charts-parent",style:e.parentStyle},[e.isHasData?r("base-echarts",e._g({attrs:{"init-options":e.initOptions,options:e.options,autoResize:!0,theme:e.theme,"chart-height":e.height,ec:e.ec},on:{"update:ec":function(t){e.ec=t}}},e.$listeners)):e._e(),e._v(" "),e.isHasData||e.loading?e._e():e._t("default",[r("empty-data",{attrs:{"empty-text":e.emptyText}})]),e._v(" "),e.loading?r("loading-chart"):e._e()],2)},staticRenderFns:[]};t.a=n},6:function(t,r){t.exports=e},7:function(e,r){e.exports=t},9:function(e,t){e.exports=r}},[256])}); \ No newline at end of file diff --git a/lib/VeScatterChart.js b/lib/VeScatterChart.js deleted file mode 100644 index db465b7..0000000 --- a/lib/VeScatterChart.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/scatter")):"function"==typeof define&&define.amd?define(["vue","echarts/lib/echarts","zrender/lib/svg/svg","echarts/lib/component/title","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/component/dataset","echarts/lib/chart/scatter"],t):"object"==typeof exports?exports["ve-charts"]=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/scatter")):e["ve-charts"]=t(e.vue,e["echarts/lib/echarts"],e["zrender/lib/svg/svg"],e["echarts/lib/component/title"],e["echarts/lib/component/tooltip"],e["echarts/lib/component/legend"],e["echarts/lib/component/dataset"],e["echarts/lib/chart/scatter"])}("undefined"!=typeof self?self:this,function(e,t,n,r,i,s,a,o){return webpackJsonpve_charts([7],{0:function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(4),s=(r=i)&&r.__esModule?r:{default:r};t.default=s.default||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},10:function(e,t){e.exports=r},102:function(e,t,n){"use strict";var r=n(8),i=n(2),s=n(263),a=n(60);n.n(a);t.a={name:"VeScatterChart",mixins:[r.a],data:function(){return{options:i.c}},created:function(){this.chartHandler=s.a}}},11:function(e,t){e.exports=i},12:function(e,t){e.exports=s},13:function(e,t){e.exports=a},261:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(262);t.default=r.a},262:function(e,t,n){"use strict";var r=n(102),i=n(264),s=n(3)(r.a,i.a,!1,null,null,null);t.a=s.exports},263:function(e,t,n){"use strict";n.d(t,"a",function(){return p});var r=n(0),i=n.n(r),s=n(1),a=n.n(s),o=n(44),c=n.n(o),l=n(39),u=n.n(l);var p=function(e,t,n){var r,s=n.tooltipVisible,o=n.legendVisible,l={dataset:function(e,t,n){var r=[],i=e.measures;if(u()(i))return i.forEach(function(e){r.push(c()({},"source",e.data))}),r}(e),tooltip:s&&{},legend:o&&function(e){var t=e.settings,n=t.legendType,r=void 0===n?"plain":n,i=t.legendPadding;return{type:r,padding:void 0===i?5:i}}({settings:t}),series:function(e){var t=e.data,n=e.settings,r=(n.connect,a()(n,["connect"])),s=[];return t.measures.forEach(function(e,t){var n=e.name;s[t]=i()({type:"scatter",name:n,datasetIndex:t},r)}),s}({data:e,settings:t}),xAxis:{scale:void 0!==(r={settings:t}.settings.xAxisScale)&&r,splitLine:{lineStyle:{type:"dashed"}}},yAxis:function(e){var t=e.settings.yAxisScale;return{scale:void 0!==t&&t,splitLine:{lineStyle:{type:"dashed"}}}}({settings:t})};return l}},264:function(e,t,n){"use strict";var r={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ve-charts-parent",style:e.parentStyle},[e.isHasData?n("base-echarts",e._g({attrs:{"init-options":e.initOptions,options:e.options,autoResize:!0,theme:e.theme,"chart-height":e.height,ec:e.ec},on:{"update:ec":function(t){e.ec=t}}},e.$listeners)):e._e(),e._v(" "),e.isHasData||e.loading?e._e():e._t("default",[n("empty-data",{attrs:{"empty-text":e.emptyText}})]),e._v(" "),e.loading?n("loading-chart"):e._e()],2)},staticRenderFns:[]};t.a=r},6:function(t,n){t.exports=e},60:function(e,t){e.exports=o},7:function(e,n){e.exports=t},9:function(e,t){e.exports=n}},[261])}); \ No newline at end of file diff --git a/lib/VeSunburstChart.js b/lib/VeSunburstChart.js deleted file mode 100644 index 5e5846b..0000000 --- a/lib/VeSunburstChart.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/sunburst")):"function"==typeof define&&define.amd?define(["vue","echarts/lib/echarts","zrender/lib/svg/svg","echarts/lib/component/title","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/component/dataset","echarts/lib/chart/sunburst"],t):"object"==typeof exports?exports["ve-charts"]=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/sunburst")):e["ve-charts"]=t(e.vue,e["echarts/lib/echarts"],e["zrender/lib/svg/svg"],e["echarts/lib/component/title"],e["echarts/lib/component/tooltip"],e["echarts/lib/component/legend"],e["echarts/lib/component/dataset"],e["echarts/lib/chart/sunburst"])}("undefined"!=typeof self?self:this,function(e,t,r,n,i,s,a,o){return webpackJsonpve_charts([6],{0:function(e,t,r){"use strict";t.__esModule=!0;var n,i=r(4),s=(n=i)&&n.__esModule?n:{default:n};t.default=s.default||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},10:function(e,t){e.exports=n},104:function(e,t,r){"use strict";var n=r(8),i=r(2),s=r(272),a=r(273);r.n(a);t.a={name:"VeSunburstChart",mixins:[n.a],data:function(){return{options:i.c}},created:function(){this.chartHandler=s.a}}},11:function(e,t){e.exports=i},12:function(e,t){e.exports=s},13:function(e,t){e.exports=a},270:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(271);t.default=n.a},271:function(e,t,r){"use strict";var n=r(104),i=r(274),s=r(3)(n.a,i.a,!1,null,null,null);t.a=s.exports},272:function(e,t,r){"use strict";r.d(t,"a",function(){return u});var n=r(37),i=r.n(n),s=r(1),a=r.n(s),o=r(0),c=r.n(o);var u=function(e,t,r){var n=function(e){var t=e.settings.tooltip;return c()({},t)}({settings:t}),s={series:function(e){var t=e.data,r=e.settings,n=t.measures,i=r.label,s=void 0===i?{}:i,o=r.itemStyle,u=void 0===o?{}:o,l=a()(r,["label","itemStyle"]),p=[];return n.forEach(function(e,t){var r=e.name,n=e.data,i=c()({type:"sunburst",name:r,data:n,label:s,itemStyle:u},l);p.push(i)}),p}({data:e,settings:t})};return 0!==i()(n).length&&(s.tooltip=n),s}},273:function(e,t){e.exports=o},274:function(e,t,r){"use strict";var n={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"ve-charts-parent",style:e.parentStyle},[e.isHasData?r("base-echarts",e._g({attrs:{"init-options":e.initOptions,options:e.options,autoResize:!0,theme:e.theme,"chart-height":e.height,ec:e.ec},on:{"update:ec":function(t){e.ec=t}}},e.$listeners)):e._e(),e._v(" "),e.isHasData||e.loading?e._e():e._t("default",[r("empty-data",{attrs:{"empty-text":e.emptyText}})]),e._v(" "),e.loading?r("loading-chart"):e._e()],2)},staticRenderFns:[]};t.a=n},6:function(t,r){t.exports=e},7:function(e,r){e.exports=t},9:function(e,t){e.exports=r}},[270])}); \ No newline at end of file diff --git a/lib/VeTreeChart.js b/lib/VeTreeChart.js deleted file mode 100644 index 57b4094..0000000 --- a/lib/VeTreeChart.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/tree")):"function"==typeof define&&define.amd?define(["vue","echarts/lib/echarts","zrender/lib/svg/svg","echarts/lib/component/title","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/component/dataset","echarts/lib/chart/tree"],t):"object"==typeof exports?exports["ve-charts"]=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/tree")):e["ve-charts"]=t(e.vue,e["echarts/lib/echarts"],e["zrender/lib/svg/svg"],e["echarts/lib/component/title"],e["echarts/lib/component/tooltip"],e["echarts/lib/component/legend"],e["echarts/lib/component/dataset"],e["echarts/lib/chart/tree"])}("undefined"!=typeof self?self:this,function(e,t,r,n,i,a,o,s){return webpackJsonpve_charts([5],{0:function(e,t,r){"use strict";t.__esModule=!0;var n,i=r(4),a=(n=i)&&n.__esModule?n:{default:n};t.default=a.default||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},10:function(e,t){e.exports=n},105:function(e,t,r){"use strict";var n=r(8),i=r(2),a=r(277),o=r(278);r.n(o);t.a={name:"VeTreeChart",mixins:[n.a],data:function(){return{options:i.c}},created:function(){this.chartHandler=a.a}}},11:function(e,t){e.exports=i},12:function(e,t){e.exports=a},13:function(e,t){e.exports=o},275:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(276);t.default=n.a},276:function(e,t,r){"use strict";var n=r(105),i=r(279),a=r(3)(n.a,i.a,!1,null,null,null);t.a=a.exports},277:function(e,t,r){"use strict";r.d(t,"a",function(){return c});var n=r(27),i=(r.n(n),r(0)),a=r.n(i),o=r(1),s=r.n(o);var c=function(e,t,r){var n=r.tooltipVisible,i=r.legendVisible,o={tooltip:n&&{trigger:"item",triggerOn:"mousemove"},legend:i&&function(e,t){var r=t.legendType,n=void 0===r?"plain":r,i=t.legendPadding;return{type:n,padding:void 0===i?5:i,data:e.measures.map(function(e){return e.name})}}(e,t),series:function(e,t){var r=t.seriesMap,n=void 0===r?[]:r,i=t.labelRotate;return s()(t,["seriesMap","labelRotate"]),e.measures.map(function(e,t){var r=n&&n[t]&&n[t].layout,o=n&&n[t]&&n[t].orient,s="radial"===r?{}:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"LR",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r="",n="",i="",a="";switch(e){case"LR":r="left",n="right",i="right",a="left";break;case"RL":r="right",n="left",i="left",a="right";break;case"TB":r="top",n=t>0?"right":"middle",i="bottom",a=t>0?"left":"middle";break;case"BT":r="bottom",n=t>0?"right":"middle",i="top",a=t>0?"left":"middle"}return{label:{normal:{position:r,verticalAlign:"middle",align:n,rotate:t}},leaves:{label:{normal:{position:i,verticalAlign:"middle",align:a,rotate:t}}}}}(o,i);return a()({type:"tree",name:e.name,data:[e.value]},s,n[t])})}(e,t)};return o}},278:function(e,t){e.exports=s},279:function(e,t,r){"use strict";var n={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"ve-charts-parent",style:e.parentStyle},[e.isHasData?r("base-echarts",e._g({attrs:{"init-options":e.initOptions,options:e.options,autoResize:!0,theme:e.theme,"chart-height":e.height,ec:e.ec},on:{"update:ec":function(t){e.ec=t}}},e.$listeners)):e._e(),e._v(" "),e.isHasData||e.loading?e._e():e._t("default",[r("empty-data",{attrs:{"empty-text":e.emptyText}})]),e._v(" "),e.loading?r("loading-chart"):e._e()],2)},staticRenderFns:[]};t.a=n},6:function(t,r){t.exports=e},7:function(e,r){e.exports=t},9:function(e,t){e.exports=r}},[275])}); \ No newline at end of file diff --git a/lib/VeTreemapChart.js b/lib/VeTreemapChart.js deleted file mode 100644 index 9da0293..0000000 --- a/lib/VeTreemapChart.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/treemap")):"function"==typeof define&&define.amd?define(["vue","echarts/lib/echarts","zrender/lib/svg/svg","echarts/lib/component/title","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/component/dataset","echarts/lib/chart/treemap"],t):"object"==typeof exports?exports["ve-charts"]=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts/lib/chart/treemap")):e["ve-charts"]=t(e.vue,e["echarts/lib/echarts"],e["zrender/lib/svg/svg"],e["echarts/lib/component/title"],e["echarts/lib/component/tooltip"],e["echarts/lib/component/legend"],e["echarts/lib/component/dataset"],e["echarts/lib/chart/treemap"])}("undefined"!=typeof self?self:this,function(e,t,r,n,a,i,o,s){return webpackJsonpve_charts([4],{0:function(e,t,r){"use strict";t.__esModule=!0;var n,a=r(4),i=(n=a)&&n.__esModule?n:{default:n};t.default=i.default||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},10:function(e,t){e.exports=n},103:function(e,t,r){"use strict";var n=r(8),a=r(2),i=r(267),o=r(268);r.n(o);t.a={name:"VeTreemapChart",mixins:[n.a],data:function(){return{options:a.c}},created:function(){this.chartHandler=i.a}}},11:function(e,t){e.exports=a},12:function(e,t){e.exports=i},13:function(e,t){e.exports=o},265:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(266);t.default=n.a},266:function(e,t,r){"use strict";var n=r(103),a=r(269),i=r(3)(n.a,a.a,!1,null,null,null);t.a=i.exports},267:function(e,t,r){"use strict";r.d(t,"a",function(){return c});var n=r(0),a=r.n(n),i=r(1),o=r.n(i),s=r(2);var c=function(e,t,r){return{tooltip:r.tooltipVisible&&{formatter:"{b}:
{c}"},series:function(e){var t=e.data,r=e.settings,n=t.measures,i=r.name,c=void 0===i?"根级":i,l=r.levels,u=void 0===l?s.d:l,p=o()(r,["name","levels"]),h=[];return h.push(a()({type:"treemap",name:c,levels:u,data:n},p)),h}({data:e,settings:t})}}},268:function(e,t){e.exports=s},269:function(e,t,r){"use strict";var n={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"ve-charts-parent",style:e.parentStyle},[e.isHasData?r("base-echarts",e._g({attrs:{"init-options":e.initOptions,options:e.options,autoResize:!0,theme:e.theme,"chart-height":e.height,ec:e.ec},on:{"update:ec":function(t){e.ec=t}}},e.$listeners)):e._e(),e._v(" "),e.isHasData||e.loading?e._e():e._t("default",[r("empty-data",{attrs:{"empty-text":e.emptyText}})]),e._v(" "),e.loading?r("loading-chart"):e._e()],2)},staticRenderFns:[]};t.a=n},6:function(t,r){t.exports=e},7:function(e,r){e.exports=t},9:function(e,t){e.exports=r}},[265])}); \ No newline at end of file diff --git a/lib/VeWordcloudChart.js b/lib/VeWordcloudChart.js deleted file mode 100644 index 7fc47f9..0000000 --- a/lib/VeWordcloudChart.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts-wordcloud/dist/echarts-wordcloud")):"function"==typeof define&&define.amd?define(["vue","echarts/lib/echarts","zrender/lib/svg/svg","echarts/lib/component/title","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/component/dataset","echarts-wordcloud/dist/echarts-wordcloud"],t):"object"==typeof exports?exports["ve-charts"]=t(require("vue"),require("echarts/lib/echarts"),require("zrender/lib/svg/svg"),require("echarts/lib/component/title"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/component/dataset"),require("echarts-wordcloud/dist/echarts-wordcloud")):e["ve-charts"]=t(e.vue,e["echarts/lib/echarts"],e["zrender/lib/svg/svg"],e["echarts/lib/component/title"],e["echarts/lib/component/tooltip"],e["echarts/lib/component/legend"],e["echarts/lib/component/dataset"],e["echarts-wordcloud/dist/echarts-wordcloud"])}("undefined"!=typeof self?self:this,function(e,t,r,o,n,i,s,a){return webpackJsonpve_charts([11],{0:function(e,t,r){"use strict";t.__esModule=!0;var o,n=r(4),i=(o=n)&&o.__esModule?o:{default:o};t.default=i.default||function(e){for(var t=1;t0&&u[0],v=L(p)&&"pie"===f?u.map(function(t,e){return 0===e?"·"+t:t}):u,_=c()({},d,v),g={},y=[];if(l&&h&&r.measures.length>0){var w=r.measures.map(function(t){return t.data}),O=j.a.apply(void 0,a()(w));y=O.map(function(t){return x()(t)})}return r.measures.map(function(t){var e=L(t.name)?t.name+" ":t.name;i()(g,c()({},e,l&&h?t.data.map(function(t,e){return b()(t/y[e],4)}):t.data))}),{source:i()({},_,g)}}S.a.util.warn("data.dimensions.data is required. Please check on you data",E)},C=function(t,e){return function(t,e,n){var r=n>0?"0."+"0".repeat(n):"0",i=n>0?"0,0."+"0".repeat(n):"0,0";switch(t){case"currency":return M()(e).format(i);case"en":return M()(e).format(r+" a");case"zh":return M()(e).format(r+" zh");case"percentage":return M()(e).format(r+"%");default:return e}}(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)},L=function(t){return!v()(parseFloat(t))&&isFinite(t)&&Number(t)==t}},function(t,e,n){var r=n(20),i=n(47);t.exports=n(21)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(16),i=n(113),o=n(114),a=Object.defineProperty;e.f=n(21)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(33)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var r=n(166)(!0);n(78)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e){t.exports={}},function(t,e,n){var r=n(32);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(56),i=n(15)("iterator"),o=n(23);t.exports=n(5).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){t.exports={default:n(177),__esModule:!0}},function(t,e,n){n(180);for(var r=n(14),i=n(19),o=n(23),a=n(15)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c0?i(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(63)("keys"),i=n(64);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports=!0},function(t,e,n){var r=n(20).f,i=n(34),o=n(15)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(35),i=n(15)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){"use strict";var r=n(32);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}(t)}},,,,,function(t,e,n){var r=n(35);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(5),i=n(14),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(54)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){t.exports=function(t){return void 0===t}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r=n(129),i=n(130);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){t.exports=function(){return!1}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(133),i=1,o=4;t.exports=function(t){return r(t,i|o)}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(75),i=n(73),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(141);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(38)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(148),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){"use strict";var r=n(54),i=n(17),o=n(167),a=n(19),u=n(23),c=n(168),s=n(55),f=n(171),l=n(15)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,p,v,_,m){c(n,e,p);var g,b,y,x=function(t){if(!h&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",j="values"==v,O=!1,S=t.prototype,z=S[l]||S["@@iterator"]||v&&S[v],M=z||x(v),E=v?j?x("entries"):M:void 0,P="Array"==e&&S.entries||z;if(P&&(y=f(P.call(new t)))!==Object.prototype&&y.next&&(s(y,w,!0),r||"function"==typeof y[l]||a(y,l,d)),j&&z&&"values"!==z.name&&(O=!0,M=function(){return z.call(this)}),r&&!m||!h&&!O&&S[l]||a(S,l,M),u[e]=M,u[w]=d,v)if(g={values:j?M:x("values"),keys:_?M:x("keys"),entries:E},m)for(b in g)b in S||o(S,b,g[b]);else i(i.P+i.F*(h||O),e,g);return g}},function(t,e,n){var r=n(14).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(16);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(23),i=n(15)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(15)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){t.exports={default:n(178),__esModule:!0}},function(t,e,n){var r=n(16),i=n(32),o=n(15)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},function(t,e,n){var r,i,o,a=n(24),u=n(186),c=n(79),s=n(46),f=n(14),l=f.process,h=f.setImmediate,d=f.clearImmediate,p=f.MessageChannel,v=f.Dispatch,_=0,m={},g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},b=function(t){g.call(t.data)};h&&d||(h=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++_]=function(){u("function"==typeof t?t:Function(t),e)},r(_),_},d=function(t){delete m[t]},"process"==n(35)(l)?r=function(t){l.nextTick(a(g,t,1))}:v&&v.now?r=function(t){v.now(a(g,t,1))}:p?(o=(i=new p).port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):r="onreadystatechange"in s("script")?function(t){c.appendChild(s("script")).onreadystatechange=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:h,clear:d}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(16),i=n(25),o=n(57);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(90)("round");t.exports=r},function(t,e,n){var r=n(195),i=n(91),o=n(196),a=Math.min;t.exports=function(t){var e=Math[t];return function(t,n){if(t=i(t),n=null==n?0:a(r(n),292)){var u=(o(t)+"e").split("e"),c=e(u[0]+"e"+(+u[1]+n));return+((u=(o(c)+"e").split("e"))[0]+"e"+(+u[1]-n))}return e(t)}}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r,i; -/*! @preserve - * numeral.js - * version : 2.0.6 - * author : Adam Draper - * license : MIT - * http://adamwdraper.github.com/Numeral-js/ - */void 0===(i="function"==typeof(r=function(){var t,e,n,r,i,o={},a={},u={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},c={currentLocale:u.currentLocale,zeroFormat:u.zeroFormat,nullFormat:u.nullFormat,defaultFormat:u.defaultFormat,scalePercentBy100:u.scalePercentBy100};function s(t,e){this._input=t,this._value=e}return(t=function(n){var r,i,a,u;if(t.isNumeral(n))r=n.value();else if(0===n||void 0===n)r=0;else if(null===n||e.isNaN(n))r=null;else if("string"==typeof n)if(c.zeroFormat&&n===c.zeroFormat)r=0;else if(c.nullFormat&&n===c.nullFormat||!n.replace(/[^0-9]+/g,"").length)r=null;else{for(i in o)if((u="function"==typeof o[i].regexps.unformat?o[i].regexps.unformat():o[i].regexps.unformat)&&n.match(u)){a=o[i].unformat;break}r=(a=a||t._.stringToNumber)(n)}else r=Number(n)||null;return new s(n,r)}).version="2.0.6",t.isNumeral=function(t){return t instanceof s},t._=e={numberToFormat:function(e,n,r){var i,o,u,c,s,f,l,h,d=a[t.options.currentLocale],p=!1,v=!1,_="",m="",g=!1;if(e=e||0,u=Math.abs(e),t._.includes(n,"(")?(p=!0,n=n.replace(/[\(|\)]/g,"")):(t._.includes(n,"+")||t._.includes(n,"-"))&&(f=t._.includes(n,"+")?n.indexOf("+"):e<0?n.indexOf("-"):-1,n=n.replace(/[\+|\-]/g,"")),t._.includes(n,"a")&&(o=!!(o=n.match(/a(k|m|b|t)?/))&&o[1],t._.includes(n," a")&&(_=" "),n=n.replace(new RegExp(_+"a[kmbt]?"),""),u>=1e12&&!o||"t"===o?(_+=d.abbreviations.trillion,e/=1e12):u<1e12&&u>=1e9&&!o||"b"===o?(_+=d.abbreviations.billion,e/=1e9):u<1e9&&u>=1e6&&!o||"m"===o?(_+=d.abbreviations.million,e/=1e6):(u<1e6&&u>=1e3&&!o||"k"===o)&&(_+=d.abbreviations.thousand,e/=1e3)),t._.includes(n,"[.]")&&(v=!0,n=n.replace("[.]",".")),c=e.toString().split(".")[0],s=n.split(".")[1],l=n.indexOf(","),i=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,s?(t._.includes(s,"[")?(s=(s=s.replace("]","")).split("["),m=t._.toFixed(e,s[0].length+s[1].length,r,s[1].length)):m=t._.toFixed(e,s.length,r),c=m.split(".")[0],m=t._.includes(m,".")?d.delimiters.decimal+m.split(".")[1]:"",v&&0===Number(m.slice(1))&&(m="")):c=t._.toFixed(e,0,r),_&&!o&&Number(c)>=1e3&&_!==d.abbreviations.trillion)switch(c=String(Number(c)/1e3),_){case d.abbreviations.thousand:_=d.abbreviations.million;break;case d.abbreviations.million:_=d.abbreviations.billion;break;case d.abbreviations.billion:_=d.abbreviations.trillion}if(t._.includes(c,"-")&&(c=c.slice(1),g=!0),c.length0;b--)c="0"+c;return l>-1&&(c=c.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+d.delimiters.thousands)),0===n.indexOf(".")&&(c=""),h=c+m+(_||""),p?h=(p&&g?"(":"")+h+(p&&g?")":""):f>=0?h=0===f?(g?"-":"+")+h:h+(g?"-":"+"):g&&(h="-"+h),h},stringToNumber:function(t){var e,n,r,i=a[c.currentLocale],o=t,u={thousand:3,million:6,billion:9,trillion:12};if(c.zeroFormat&&t===c.zeroFormat)n=0;else if(c.nullFormat&&t===c.nullFormat||!t.replace(/[^0-9]+/g,"").length)n=null;else{for(e in n=1,"."!==i.delimiters.decimal&&(t=t.replace(/\./g,"").replace(i.delimiters.decimal,".")),u)if(r=new RegExp("[^a-zA-Z]"+i.abbreviations[e]+"(?:\\)|(\\"+i.currency.symbol+")?(?:\\))?)?$"),o.match(r)){n*=Math.pow(10,u[e]);break}n*=(t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1,t=t.replace(/[^0-9\.]+/g,""),n*=Number(t)}return n},isNaN:function(t){return"number"==typeof t&&isNaN(t)},includes:function(t,e){return-1!==t.indexOf(e)},insert:function(t,e,n){return t.slice(0,n)+e+t.slice(n)},reduce:function(t,e){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var n,r=Object(t),i=r.length>>>0,o=0;if(3===arguments.length)n=arguments[2];else{for(;o=i)throw new TypeError("Reduce of empty array with no initial value");n=r[o++]}for(;or?t:r},1)},toFixed:function(t,e,n,r){var i,o,a,u,c=t.toString().split("."),s=e-(r||0);return i=2===c.length?Math.min(Math.max(c[1].length,s),e):s,a=Math.pow(10,i),u=(n(t+"e+"+i)/a).toFixed(i),r>e-i&&(o=new RegExp("\\.?0{1,"+(r-(e-i))+"}$"),u=u.replace(o,"")),u}},t.options=c,t.formats=o,t.locales=a,t.locale=function(t){return t&&(c.currentLocale=t.toLowerCase()),c.currentLocale},t.localeData=function(t){if(!t)return a[c.currentLocale];if(t=t.toLowerCase(),!a[t])throw new Error("Unknown locale : "+t);return a[t]},t.reset=function(){for(var t in u)c[t]=u[t]},t.zeroFormat=function(t){c.zeroFormat="string"==typeof t?t:null},t.nullFormat=function(t){c.nullFormat="string"==typeof t?t:null},t.defaultFormat=function(t){c.defaultFormat="string"==typeof t?t:"0.0"},t.register=function(t,e,n){if(e=e.toLowerCase(),this[t+"s"][e])throw new TypeError(e+" "+t+" already registered.");return this[t+"s"][e]=n,n},t.validate=function(e,n){var r,i,o,a,u,c,s,f;if("string"!=typeof e&&(e+="",console.warn),(e=e.trim()).match(/^\d+$/))return!0;if(""===e)return!1;try{s=t.localeData(n)}catch(e){s=t.localeData(t.locale())}return o=s.currency.symbol,u=s.abbreviations,r=s.delimiters.decimal,i="."===s.delimiters.thousands?"\\.":s.delimiters.thousands,(null===(f=e.match(/^[^\d]+/))||(e=e.substr(1),f[0]===o))&&((null===(f=e.match(/[^\d]+$/))||(e=e.slice(0,-1),f[0]===u.thousand||f[0]===u.million||f[0]===u.billion||f[0]===u.trillion))&&(c=new RegExp(i+"{2}"),!e.match(/[^\d.,]/g)&&(!((a=e.split(r)).length>2)&&(a.length<2?!!a[0].match(/^\d+.*\d$/)&&!a[0].match(c):1===a[0].length?!!a[0].match(/^\d+$/)&&!a[0].match(c)&&!!a[1].match(/^\d+$/):!!a[0].match(/^\d+.*\d$/)&&!a[0].match(c)&&!!a[1].match(/^\d+$/)))))},t.fn=s.prototype={clone:function(){return t(this)},format:function(e,n){var r,i,a,u=this._value,s=e||c.defaultFormat;if(n=n||Math.round,0===u&&null!==c.zeroFormat)i=c.zeroFormat;else if(null===u&&null!==c.nullFormat)i=c.nullFormat;else{for(r in o)if(s.match(o[r].regexps.format)){a=o[r].format;break}i=(a=a||t._.numberToFormat)(u,s,n)}return i},value:function(){return this._value},input:function(){return this._input},set:function(t){return this._value=Number(t),this},add:function(t){var n=e.correctionFactor.call(null,this._value,t);return this._value=e.reduce([this._value,t],function(t,e,r,i){return t+Math.round(n*e)},0)/n,this},subtract:function(t){var n=e.correctionFactor.call(null,this._value,t);return this._value=e.reduce([t],function(t,e,r,i){return t-Math.round(n*e)},Math.round(this._value*n))/n,this},multiply:function(t){return this._value=e.reduce([this._value,t],function(t,n,r,i){var o=e.correctionFactor(t,n);return Math.round(t*o)*Math.round(n*o)/Math.round(o*o)},1),this},divide:function(t){return this._value=e.reduce([this._value,t],function(t,n,r,i){var o=e.correctionFactor(t,n);return Math.round(t*o)/Math.round(n*o)}),this},difference:function(e){return Math.abs(t(this._value).subtract(e).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(t){var e=t%10;return 1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th"},currency:{symbol:"$"}}),t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(e,n,r){var i,o=t._.includes(n," BPS")?" ":"";return e*=1e4,n=n.replace(/\s?BPS/,""),i=t._.numberToFormat(e,n,r),t._.includes(i,")")?((i=i.split("")).splice(-1,0,o+"BPS"),i=i.join("")):i=i+o+"BPS",i},unformat:function(e){return+(1e-4*t._.stringToNumber(e)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},i="("+(i=(n={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter(function(t){return n.suffixes.indexOf(t)<0})).join("|")).replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(i)},format:function(e,i,o){var a,u,c,s=t._.includes(i,"ib")?r:n,f=t._.includes(i," b")||t._.includes(i," ib")?" ":"";for(i=i.replace(/\s?i?b/,""),a=0;a<=s.suffixes.length;a++)if(u=Math.pow(s.base,a),c=Math.pow(s.base,a+1),null===e||0===e||e>=u&&e0&&(e/=u);break}return t._.numberToFormat(e,i,o)+f},unformat:function(e){var i,o,a=t._.stringToNumber(e);if(a){for(i=n.suffixes.length-1;i>=0;i--){if(t._.includes(e,n.suffixes[i])){o=Math.pow(n.base,i);break}if(t._.includes(e,r.suffixes[i])){o=Math.pow(r.base,i);break}}a*=o||1}return a}}),t.register("format","currency",{regexps:{format:/(\$)/},format:function(e,n,r){var i,o,a=t.locales[t.options.currentLocale],u={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),i=t._.numberToFormat(e,n,r),e>=0?(u.before=u.before.replace(/[\-\(]/,""),u.after=u.after.replace(/[\-\)]/,"")):e<0&&!t._.includes(u.before,"-")&&!t._.includes(u.before,"(")&&(u.before="-"+u.before),o=0;o=0;o--)switch(u.after[o]){case"$":i=o===u.after.length-1?i+a.currency.symbol:t._.insert(i,a.currency.symbol,-(u.after.length-(1+o)));break;case" ":i=o===u.after.length-1?i+" ":t._.insert(i," ",-(u.after.length-(1+o)+a.currency.symbol.length-1))}return i}}),t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(e,n,r){var i=("number"!=typeof e||t._.isNaN(e)?"0e+0":e.toExponential()).split("e");return n=n.replace(/e[\+|\-]{1}0/,""),t._.numberToFormat(Number(i[0]),n,r)+"e"+i[1]},unformat:function(e){var n=t._.includes(e,"e+")?e.split("e+"):e.split("e-"),r=Number(n[0]),i=Number(n[1]);return i=t._.includes(e,"e-")?i*=-1:i,t._.reduce([r,Math.pow(10,i)],function(e,n,r,i){var o=t._.correctionFactor(e,n);return e*o*(n*o)/(o*o)},1)}}),t.register("format","ordinal",{regexps:{format:/(o)/},format:function(e,n,r){var i=t.locales[t.options.currentLocale],o=t._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),o+=i.ordinal(e),t._.numberToFormat(e,n,r)+o}}),t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(e,n,r){var i,o=t._.includes(n," %")?" ":"";return t.options.scalePercentBy100&&(e*=100),n=n.replace(/\s?\%/,""),i=t._.numberToFormat(e,n,r),t._.includes(i,")")?((i=i.split("")).splice(-1,0,o+"%"),i=i.join("")):i=i+o+"%",i},unformat:function(e){var n=t._.stringToNumber(e);return t.options.scalePercentBy100?.01*n:n}}),t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(t,e,n){var r=Math.floor(t/60/60),i=Math.floor((t-60*r*60)/60),o=Math.round(t-60*r*60-60*i);return r+":"+(i<10?"0"+i:i)+":"+(o<10?"0"+o:o)},unformat:function(t){var e=t.split(":"),n=0;return 3===e.length?(n+=60*Number(e[0])*60,n+=60*Number(e[1]),n+=Number(e[2])):2===e.length&&(n+=60*Number(e[0]),n+=Number(e[1])),Number(n)}}),t})?r.call(e,n,e,t):r)||(t.exports=i)},function(t,e,n){"use strict";var r=n(43),i=n.n(r),o=n(213),a=n.n(o),u=n(7),c=n.n(u),s=n(215),f=n(6),l=n.n(f),h=n(9),d=(n.n(h),n(10)),p=(n.n(d),n(11)),v=(n.n(p),n(12)),_=(n.n(v),n(13)),m=(n.n(_),["legendselectchanged","legendselected","legendunselected","legendscroll","datazoom","datarangeselected","timelinechanged","timelineplaychanged","restore","dataviewchanged","magictypechanged","geoselectchanged","geoselected","geounselected","pieselectchanged","pieselected","pieunselected","mapselectchanged","mapselected","mapunselected","axisareaselected","focusnodeadjacency","unfocusnodeadjacency","brush","brushselected","click","dblclick","mouseover","mouseout","mousedown","mouseup","globalout","contextmenu"]);e.a={props:{options:Object,theme:[String,Object],initOptions:Object,group:String,autoResize:Boolean,watchShallow:Boolean,chartHeight:{type:Number,default:400}},data:function(){return{chart:null}},computed:{width:{cache:!1,get:function(){return this.delegateGet("width","getWidth")}},height:{cache:!1,get:function(){return this.delegateGet("height","getHeight")}},isDisposed:{cache:!1,get:function(){return!!this.delegateGet("isDisposed","isDisposed")}},computedOptions:{cache:!1,get:function(){return this.delegateGet("computedOptions","getOption")}},echartsStyle:function(){return{width:"auto",height:this.chartHeight+"px"}}},watch:{group:function(t){this.chart.group=t}},methods:{mergeOptions:function(t,e,n){this.delegateMethod("setOption",t,e,n)},appendData:function(t){this.delegateMethod("appendData",t)},resize:function(t){this.delegateMethod("resize",t)},dispatchAction:function(t){this.delegateMethod("dispatchAction",t)},convertToPixel:function(t,e){return this.delegateMethod("convertToPixel",t,e)},convertFromPixel:function(t,e){return this.delegateMethod("convertFromPixel",t,e)},containPixel:function(t,e){return this.delegateMethod("containPixel",t,e)},showLoading:function(t,e){this.delegateMethod("showLoading",t,e)},hideLoading:function(){this.delegateMethod("hideLoading")},getDataURL:function(t){return this.delegateMethod("getDataURL",t)},getConnectedDataURL:function(t){return this.delegateMethod("getConnectedDataURL",t)},clear:function(){this.delegateMethod("clear")},dispose:function(){this.delegateMethod("dispose")},delegateMethod:function(t){var e;if(this.chart){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;os;)for(var h,d=u(arguments[s++]),p=f?r(d).concat(f(d)):r(d),v=p.length,_=0;v>_;)l.call(d,h=p[_++])&&(n[h]=d[h]);return n}:c},function(t,e,n){var r=n(34),i=n(49),o=n(117)(!1),a=n(53)("IE_PROTO");t.exports=function(t,e){var n,u=i(t),c=0,s=[];for(n in u)n!=a&&r(u,n)&&s.push(n);for(;e.length>c;)r(u,n=e[c++])&&(~o(s,n)||s.push(n));return s}},function(t,e,n){var r=n(49),i=n(51),o=n(118);t.exports=function(t){return function(e,n,a){var u,c=r(e),s=i(c.length),f=o(a,s);if(t&&n!=n){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(52),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){n(122),t.exports=n(5).Object.keys},function(t,e,n){var r=n(36),i=n(48);n(123)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(17),i=n(5),o=n(33);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(125);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(127),i=n(67),o=n(128),a=n(39),u=n(68),c=n(70),s=n(71),f=n(131),l="[object Map]",h="[object Set]",d=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(u(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||f(t)||o(t)))return!t.length;var e=i(t);if(e==l||e==h)return!t.size;if(s(t))return!r(t).length;for(var n in t)if(d.call(t,n))return!1;return!0}},function(t,e,n){var r=n(38)(Object.keys,Object);t.exports=r},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(69),i=n(40),o="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",c="[object Proxy]";t.exports=function(t){if(!i(t))return!1;var e=r(t);return e==a||e==u||e==o||e==c}},function(t,e){var n=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}},function(t,e){t.exports=function(){return!1}},function(t,e){t.exports=function(t){return null===t}},function(t,e,n){var r=n(134),i=n(140),o=n(74),a=n(143),u=n(144),c=n(146),s=n(150),f=n(151),l=n(153),h=n(155),d=n(156),p=n(67),v=n(157),_=n(158),m=n(159),g=n(39),b=n(70),y=n(162),x=n(40),w=n(163),j=n(76),O=1,S=2,z=4,M="[object Arguments]",E="[object Function]",P="[object GeneratorFunction]",F="[object Object]",T={};T[M]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[F]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[E]=T["[object WeakMap]"]=!1,t.exports=function t(e,n,A,C,L,k){var N,B=n&O,R=n&S,D=n&z;if(A&&(N=L?A(e,C,L,k):A(e)),void 0!==N)return N;if(!x(e))return e;var $=g(e);if($){if(N=v(e),!B)return s(e,N)}else{var H=p(e),W=H==E||H==P;if(b(e))return c(e,B);if(H==F||H==M||W&&!L){if(N=R||W?{}:m(e),!B)return R?l(e,u(N,e)):f(e,a(N,e))}else{if(!T[H])return L?e:{};N=_(e,H,B)}}k||(k=new r);var G=k.get(e);if(G)return G;if(k.set(e,N),w(e))return e.forEach(function(r){N.add(t(r,n,A,r,e,k))}),N;if(y(e))return e.forEach(function(r,i){N.set(i,t(r,n,A,i,e,k))}),N;var I=D?R?d:h:R?keysIn:j,U=$?void 0:I(e);return i(U||e,function(r,i){U&&(r=e[i=r]),o(N,i,t(r,n,A,i,e,k))}),N}},function(t,e,n){var r=n(135),i=n(136),o=n(137),a=n(138),u=n(139);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1}},function(t,e,n){var r=n(41);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n=s?t?"":void 0:(o=u.charCodeAt(c))<55296||o>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):o:t?u.slice(c,c+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){t.exports=n(19)},function(t,e,n){"use strict";var r=n(169),i=n(47),o=n(55),a={};n(19)(a,n(15)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(16),i=n(170),o=n(65),a=n(53)("IE_PROTO"),u=function(){},c=function(){var t,e=n(46)("iframe"),r=o.length;for(e.style.display="none",n(79).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(" - diff --git a/src/packages/funnel/chartHandler.js b/src/packages/funnel/chartHandler.js index cec185f..672f227 100644 --- a/src/packages/funnel/chartHandler.js +++ b/src/packages/funnel/chartHandler.js @@ -2,13 +2,13 @@ import Vue from 'vue' import { max, min, round } from 'lodash' import { getDataset } from '../../utils' -function getFunnelTooltip(args) { +function getFunnelTooltip (args) { return { trigger: 'item' } } -function getFunnelLegend(args) { +function getFunnelLegend (args) { const { settings } = args const { legendType = 'plain', @@ -20,7 +20,7 @@ function getFunnelLegend(args) { } } -function getFunnelSeries(args) { +function getFunnelSeries (args) { const { data, settings } = args const { dimensions, measures } = data const dimName = dimensions && `${dimensions.name} ` diff --git a/src/packages/funnel/index.vue b/src/packages/funnel/index.vue index cbd78f9..e0da5ae 100644 --- a/src/packages/funnel/index.vue +++ b/src/packages/funnel/index.vue @@ -18,7 +18,7 @@ \ No newline at end of file + diff --git a/src/packages/wordcloud/chartHandler.js b/src/packages/wordcloud/chartHandler.js index 96958bb..ee21a19 100644 --- a/src/packages/wordcloud/chartHandler.js +++ b/src/packages/wordcloud/chartHandler.js @@ -1,7 +1,7 @@ // build series -function getWordcloudSeries(args) { - const {data, settings} = args - const {measures} = data +function getWordcloudSeries (args) { + const { data, settings } = args + const { measures } = data const type = 'wordCloud' const series = [] const seriesItem = { @@ -14,8 +14,8 @@ function getWordcloudSeries(args) { } export const wordcloud = (data, settings, extra) => { - const {tooltip} = settings - const series = getWordcloudSeries({data, settings}) + const { tooltip } = settings + const series = getWordcloudSeries({ data, settings }) const options = { tooltip, series diff --git a/src/packages/wordcloud/index.vue b/src/packages/wordcloud/index.vue index 5c67ac6..3751065 100644 --- a/src/packages/wordcloud/index.vue +++ b/src/packages/wordcloud/index.vue @@ -18,21 +18,21 @@ diff --git a/src/mixins/core.js b/src/mixins/core.js index f877e35..a26d56c 100644 --- a/src/mixins/core.js +++ b/src/mixins/core.js @@ -1,10 +1,10 @@ -import { cloneDeep, isNull, isEmpty, isUndefined, get } from 'lodash' +import { cloneDeep, isNull, isEmpty, isUndefined, get } from 'lodash-es' import { getType } from '../utils' import { color } from '../base-options' -import BaseEcharts from '../components/BaseEcharts' -import EmptyData from '../components/EmptyData' -import LoadingChart from '../components/LoadingChart' +import BaseEcharts from '../components/BaseEcharts.vue' +import EmptyData from '../components/EmptyData.vue' +import LoadingChart from '../components/LoadingChart.vue' export default { components: { diff --git a/src/packages/bar/chart.js b/src/packages/bar/chart.js new file mode 100644 index 0000000..bf45be9 --- /dev/null +++ b/src/packages/bar/chart.js @@ -0,0 +1,260 @@ +import { isArray, isUndefined } from 'lodash-es' + +import { options, waterfallConfig } from '../../base-options' +import { getDataset, getStackMap, formatMeasure } from '../../utils' +import BaseChart from '../../BaseChart' + +class BarChart extends BaseChart { + // build tooltip + static getBarTooltip (settings) { + const { tooltipFormatter } = settings + return { + trigger: 'axis', + axisPointer: { // 坐标轴指示器,坐标轴触发有效 + type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' + }, + formatter: tooltipFormatter + } + } + + // build legend + static getBarLegend (data, settings) { + const { measures } = data + const { legendType, legendPadding, waterfall } = settings + let result = { + type: legendType || 'plain', + padding: legendPadding || 5 + } + // 当配置项填入waterfall,瀑布图默认将图例去除secondaryMeasure--by:jeff + if (waterfall && waterfall === true) { + result['data'] = measures.filter(({ name }) => { + if (name !== 'secondaryMeasure') return name + }) + } + return result + } + + // build grid + static getBarGrid (isBar) { + const BarGrid = { + right: 30, + bottom: 10, + left: 30, + containLabel: true + } + return isBar ? BarGrid : options.grid + } + + // build dimension Axis + static getBarDimAxis (settings) { + const { dimAxisType } = settings + + const axisItem = { + type: dimAxisType, + axisTick: { + show: false + }, + axisLabel: { + margin: 10, + fontWeight: 400 + } + } + const disAxis = [] + disAxis.push(axisItem) + return disAxis + } + + // build measure axis + static getBarMeaAxis (data, settings) { + const { + meaAxisType, + meaAxisDigits, + yAxisScale = false, + percentage = false, + yAxisName, + yAxisInterval, + yAxisMax, + yAxisMin + } = settings + + const meaAxisBase = { + type: 'value', + scale: yAxisScale, + axisTick: { + show: false + }, + min: percentage ? 0 : null, + max: percentage ? 1 : null + } + + const meaAxis = [] + meaAxisType.forEach((type, i) => { + const axisLabel = { + margin: 10, + fontWeight: 400 + } + if (type !== 'normal') { + // Y轴标签格式化后保留几位小数兼容之前版本类型 + if (isArray(meaAxisDigits)) { + let num = isUndefined(meaAxisDigits[i]) ? 0 : meaAxisDigits[i] + axisLabel.formatter = value => formatMeasure(type, value, num) + } else { + axisLabel.formatter = value => formatMeasure(type, value, meaAxisDigits) + } + } + const axisItem = { + ...meaAxisBase, + axisLabel + } + if (yAxisName && yAxisName.length) { + axisItem['name'] = yAxisName[i] + } + if (yAxisInterval && yAxisInterval.length) { + if (yAxisInterval[i]) { // 容错处理,当第二个值为空时,不设置interval + axisItem['interval'] = Number(yAxisInterval[i]) + } + } + // 当开启百分比模式时,轴最大和最小刻度设置无效 + if (percentage === false && yAxisMax && yAxisMax.length) { + axisItem['max'] = yAxisMax[i] + } + if (percentage === false && yAxisMin && yAxisMin.length) { + axisItem['min'] = yAxisMin[i] + } + meaAxis.push(axisItem) + }) + return meaAxis + } + + // build label + static getBarLabel (setLabel, isBar) { + const { + position = isBar ? 'right' : 'top', + formatType = 'currency', + formatDigits = 0, + ...others + } = setLabel + const formatter = params => { + const { value, seriesIndex } = params + // dataset formatter need shift the value + value.shift() + return formatMeasure(formatType, value[seriesIndex], formatDigits) + } + return { + position, + formatter, + ...others + } + } + + // build series + static getBarSeries (data, settings, isBar) { + const { measures } = data + const { + label = {}, + showLine = [], + stack = null, + secondMeaAxis = [], + itemStyle = {}, + waterfall, + ...others + } = settings + + const axisIndexName = isBar ? 'xAxisIndex' : 'yAxisIndex' + const series = [] + const stackMap = stack && getStackMap(stack) + + measures.forEach(({ name }) => { + // label数据类型调整为对象或者数组,Object类型为全部数据维度添加配置,Array类型根据每项name名字去修改配置----by:Jeff + let setLabel = {} + if (label instanceof Array) { + setLabel = label.filter(item => item.name === name)[0] + if (setLabel === undefined) setLabel = {} + } else { + setLabel = label + } + // ------------end----------- + const type = showLine.includes(name) ? 'line' : 'bar' + const seriesItem = { + type, + name, + label: BarChart.getBarLabel(setLabel, isBar), + stack: stack && stackMap[name], + [axisIndexName]: secondMeaAxis.includes(name) ? '1' : '0', + itemStyle: itemStyle[name] ? itemStyle[name] : {}, + ...others + } + // 当配置项填入waterfall,瀑布图默认将secondaryMeasure图设置透明--by:jeff + if (waterfall && waterfall === true) { + if (name === 'secondaryMeasure') { + seriesItem['itemStyle'] = waterfallConfig[name] + } + } + series.push(seriesItem) + }) + return series + } + + bar (data, settings, extra) { + const { tooltipVisible, legendVisible, isEmptyData } = extra + const { + direction = 'column', + secondMeaAxis = null, + yAxisLabelType, + yAxisLabelDigits = 0, + yAxisName, + xAxisLabelType, + xAxisLabelDigits = 0, + xAxisName + } = settings + + // 默认柱状图 + const isBar = direction !== 'column' && direction === 'row' + + const defaultMeaAxisType = secondMeaAxis !== null ? ['normal', 'normal'] : ['normal'] + + settings.meaAxisType = (isBar ? xAxisLabelType : yAxisLabelType) || defaultMeaAxisType + settings.meaAxisDigits = isBar ? xAxisLabelDigits : yAxisLabelDigits + settings.meaAxisName = (isBar ? xAxisName : yAxisName) || [] + settings.dimAxisType = (isBar ? yAxisLabelType : xAxisLabelType) || 'category' + settings.dimAxisDigits = isBar ? yAxisLabelDigits : xAxisLabelDigits + settings.dimAxisName = (isBar ? yAxisName : xAxisName) || '' + + // 如果设置了双Y轴,将双Y轴统一设置 meaAxisType + if (defaultMeaAxisType.length > settings.meaAxisType.length) { + settings.meaAxisType = defaultMeaAxisType.fill(settings.meaAxisType[0]) + } + + extra.chartType = 'bar' + const dataset = !isEmptyData && getDataset(data, settings, extra) + + const tooltip = tooltipVisible && BarChart.getBarTooltip(settings) + + const legend = legendVisible && BarChart.getBarLegend(data, settings) + + const grid = BarChart.getBarGrid(isBar) + + const xAxis = isBar ? BarChart.getBarMeaAxis(data, settings) : BarChart.getBarDimAxis(settings) + + const yAxis = isBar ? BarChart.getBarDimAxis(settings) : BarChart.getBarMeaAxis(data, settings) + + const series = BarChart.getBarSeries(data, settings, isBar) + + // build echarts options + const options = { + grid, + dataset, + tooltip, + legend, + xAxis, + yAxis, + series + } + + console.log(options) + + return options + } +} + +export default BarChart diff --git a/src/packages/bar/chartHandler.js b/src/packages/bar/chartHandler.js deleted file mode 100644 index 929cde0..0000000 --- a/src/packages/bar/chartHandler.js +++ /dev/null @@ -1,254 +0,0 @@ -import { options, waterfallConfig } from '../../base-options' -import { getDataset, getStackMap, formatMeasure } from '../../utils' -import { isArray, isUndefined } from 'lodash' - -// build tooltip -function getBarTooltip (settings) { - const { tooltipFormatter } = settings - return { - trigger: 'axis', - axisPointer: { // 坐标轴指示器,坐标轴触发有效 - type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' - }, - formatter: tooltipFormatter - } -} - -// build legend -function getBarLegend (data, settings) { - const { measures } = data - const { legendType, legendPadding, waterfall } = settings - let result = { - type: legendType || 'plain', - padding: legendPadding || 5 - } - // 当配置项填入waterfall,瀑布图默认将图例去除secondaryMeasure--by:jeff - if (waterfall && waterfall === true) { - result['data'] = measures.filter(({ name }) => { - if (name !== 'secondaryMeasure') return name - }) - } - return result -} - -// build grid -function getBarGrid (isBar) { - const BarGrid = { - right: 30, - bottom: 10, - left: 30, - containLabel: true - } - return isBar ? BarGrid : options.grid -} - -// build dimension Axis -function getBarDimAxis (settings) { - const { dimAxisType } = settings - - const axisItem = { - type: dimAxisType, - axisTick: { - show: false - }, - axisLabel: { - margin: 10, - fontWeight: 400 - } - } - const disAxis = [] - disAxis.push(axisItem) - return disAxis -} - -// build measure axis -function getBarMeaAxis (data, settings) { - const { - meaAxisType, - meaAxisDigits, - yAxisScale = false, - percentage = false, - yAxisName, - yAxisInterval, - yAxisMax, - yAxisMin - } = settings - - const meaAxisBase = { - type: 'value', - scale: yAxisScale, - axisTick: { - show: false - }, - min: percentage ? 0 : null, - max: percentage ? 1 : null - } - - const meaAxis = [] - meaAxisType.forEach((type, i) => { - const axisLabel = { - margin: 10, - fontWeight: 400 - } - if (type !== 'normal') { - // Y轴标签格式化后保留几位小数兼容之前版本类型 - if (isArray(meaAxisDigits)) { - let num = isUndefined(meaAxisDigits[i]) ? 0 : meaAxisDigits[i] - axisLabel.formatter = value => formatMeasure(type, value, num) - } else { - axisLabel.formatter = value => formatMeasure(type, value, meaAxisDigits) - } - } - const axisItem = { - ...meaAxisBase, - axisLabel - } - if (yAxisName && yAxisName.length) { - axisItem['name'] = yAxisName[i] - } - if (yAxisInterval && yAxisInterval.length) { - if (yAxisInterval[i]) { // 容错处理,当第二个值为空时,不设置interval - axisItem['interval'] = Number(yAxisInterval[i]) - } - } - // 当开启百分比模式时,轴最大和最小刻度设置无效 - if (percentage === false && yAxisMax && yAxisMax.length) { - axisItem['max'] = yAxisMax[i] - } - if (percentage === false && yAxisMin && yAxisMin.length) { - axisItem['min'] = yAxisMin[i] - } - meaAxis.push(axisItem) - }) - return meaAxis -} - -// build label -function getBarLabel (setLabel, isBar) { - const { - position = isBar ? 'right' : 'top', - formatType = 'currency', - formatDigits = 0, - ...others - } = setLabel - const formatter = params => { - const { value, seriesIndex } = params - // dataset formatter need shift the value - value.shift() - return formatMeasure(formatType, value[seriesIndex], formatDigits) - } - return { - position, - formatter, - ...others - } -} - -// build series -function getBarSeries (data, settings, isBar) { - const { measures } = data - const { - label = {}, - showLine = [], - stack = null, - secondMeaAxis = [], - itemStyle = {}, - waterfall, - ...others - } = settings - - const axisIndexName = isBar ? 'xAxisIndex' : 'yAxisIndex' - const series = [] - const stackMap = stack && getStackMap(stack) - - measures.forEach(({ name }) => { - // label数据类型调整为对象或者数组,Object类型为全部数据维度添加配置,Array类型根据每项name名字去修改配置----by:Jeff - let setLabel = {} - if (label instanceof Array) { - setLabel = label.filter(item => item.name === name)[0] - if (setLabel === undefined) setLabel = {} - } else { - setLabel = label - } - // ------------end----------- - const type = showLine.includes(name) ? 'line' : 'bar' - const seriesItem = { - type, - name, - label: getBarLabel(setLabel, isBar), - stack: stack && stackMap[name], - [axisIndexName]: secondMeaAxis.includes(name) ? '1' : '0', - itemStyle: itemStyle[name] ? itemStyle[name] : {}, - ...others - } - // 当配置项填入waterfall,瀑布图默认将secondaryMeasure图设置透明--by:jeff - if (waterfall && waterfall === true) { - if (name === 'secondaryMeasure') { - seriesItem['itemStyle'] = waterfallConfig[name] - } - } - series.push(seriesItem) - }) - return series -} - -export const bar = (data, settings, extra) => { - const { tooltipVisible, legendVisible, isEmptyData } = extra - const { - direction = 'column', - secondMeaAxis = null, - yAxisLabelType, - yAxisLabelDigits = 0, - yAxisName, - xAxisLabelType, - xAxisLabelDigits = 0, - xAxisName - } = settings - - // 默认柱状图 - const isBar = direction !== 'column' && direction === 'row' - - const defaultMeaAxisType = secondMeaAxis !== null ? ['normal', 'normal'] : ['normal'] - - settings.meaAxisType = (isBar ? xAxisLabelType : yAxisLabelType) || defaultMeaAxisType - settings.meaAxisDigits = isBar ? xAxisLabelDigits : yAxisLabelDigits - settings.meaAxisName = (isBar ? xAxisName : yAxisName) || [] - settings.dimAxisType = (isBar ? yAxisLabelType : xAxisLabelType) || 'category' - settings.dimAxisDigits = isBar ? yAxisLabelDigits : xAxisLabelDigits - settings.dimAxisName = (isBar ? yAxisName : xAxisName) || '' - - // 如果设置了双Y轴,将双Y轴统一设置 meaAxisType - if (defaultMeaAxisType.length > settings.meaAxisType.length) { - settings.meaAxisType = defaultMeaAxisType.fill(settings.meaAxisType[0]) - } - - extra.chartType = 'bar' - const dataset = !isEmptyData && getDataset(data, settings, extra) - - const tooltip = tooltipVisible && getBarTooltip(settings) - - const legend = legendVisible && getBarLegend(data, settings) - - const grid = getBarGrid(isBar) - - const xAxis = isBar ? getBarMeaAxis(data, settings) : getBarDimAxis(settings) - - const yAxis = isBar ? getBarDimAxis(settings) : getBarMeaAxis(data, settings) - - const series = getBarSeries(data, settings, isBar) - - // build echarts options - const options = { - grid, - dataset, - tooltip, - legend, - xAxis, - yAxis, - series - } - - console.log(options) - - return options -} diff --git a/src/packages/bar/index.js b/src/packages/bar/index.js index 3b7ca8d..9aceab5 100644 --- a/src/packages/bar/index.js +++ b/src/packages/bar/index.js @@ -1,3 +1,12 @@ -import VeBarChart from './index.vue' +import 'echarts/lib/chart/bar' -export default VeBarChart +import HocEcharts from '../../components/HocEcharts.vue' +import BarChart from './chart' + +export default { + name: 'VeBarChart', + mixins: [HocEcharts], + created () { + this.chartHandler = new BarChart().bar + } +} diff --git a/src/packages/bar/index.vue b/src/packages/bar/index.vue deleted file mode 100644 index abe38a5..0000000 --- a/src/packages/bar/index.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - diff --git a/src/packages/line/chart.js b/src/packages/line/chart.js new file mode 100644 index 0000000..ff9bcbb --- /dev/null +++ b/src/packages/line/chart.js @@ -0,0 +1,170 @@ +import { getDataset, getStackMap, formatMeasure } from '../../utils' +import BaseChart from '../../BaseChart' + +class LineChart extends BaseChart { + static getLineTooltip (settings) { + const { tooltipFormatter } = settings + return { + trigger: 'axis', + formatter: tooltipFormatter + } + } + + static getLineLegend (args) { + const { settings } = args + const { legendType = 'plain', legendPadding = 5 } = settings + return { + type: legendType, + padding: legendPadding + } + } + + static getLineDimAxis (args) { + const { settings } = args + const type = settings.yAxisType || 'category' + return { + type, + boundaryGap: false, + axisTick: { + show: false + }, + axisLabel: { + margin: 10, + fontWeight: 400 + } + } + } + + static getLineMeaAxis (args) { + const { settings } = args + const { + yAxisScale, + yAxisLabelType, + yAxisLabelDigits, + yAxisName, + yAxisInterval, + yAxisMax, + yAxisMin, + percentage = false + } = settings + + let axisValue = { + type: 'value', + scale: yAxisScale, + axisTick: { + show: false + }, + axisLabel: { + margin: 10, + fontWeight: 400, + formatter: value => formatMeasure(yAxisLabelType, value, yAxisLabelDigits) + }, + min: percentage ? 0 : null, + max: percentage ? 1 : null + } + if (yAxisName) axisValue['name'] = yAxisName + if (yAxisInterval) axisValue['interval'] = Number(yAxisInterval) + if (yAxisMax) axisValue['max'] = yAxisMax + if (yAxisMin) axisValue['min'] = yAxisMin + + return axisValue + } + + static getLineLabel (args) { + const { + position = 'top', + formatType = 'currency', + formatDigits = 0, + ...others + } = args + const formatter = params => { + const { value, seriesIndex } = params + // dataset formatter need shift the value + value.shift() + return formatMeasure(formatType, value[seriesIndex], formatDigits) + } + return { + normal: { + position, + formatter, + ...others + } + } + } + + static getLineSeries (args) { + const { data, settings } = args + const { measures } = data + const { + label = {}, + showSymbol = true, + smooth = false, + stack = null, + step = null, + symbol = 'emptyCircle', + symbolSize = 4, + ...others + } = settings + const series = [] + const stackMap = stack && getStackMap(stack) + + function getLineStyle (lineParams) { + return { + normal: { + width: 2 + } + } + } + + measures.forEach(({ name, data }, i) => { + series.push({ + type: 'line', + name, + label: this.getLineLabel(label), + lineStyle: getLineStyle(), + showSymbol, + smooth, + stack: stack && stackMap[name], + step, + symbol, + symbolSize, + ...others + }) + }) + + return series + } + + line (data, settings, extra) { + const { tooltipVisible, legendVisible, isEmptyData } = extra + + extra.chartType = 'line' + const dataset = !isEmptyData && getDataset(data, settings, extra) + + const tooltip = tooltipVisible && LineChart.getLineTooltip(settings) + + const legend = legendVisible && LineChart.getLineLegend({ settings }) + + const xAxis = LineChart.getLineDimAxis({ settings }) + + const yAxis = LineChart.getLineMeaAxis({ settings }) + + const series = !isEmptyData && LineChart.getLineSeries({ data, settings }) + + // build echarts options + const options = { + dataset, + tooltip, + legend, + xAxis, + yAxis, + series + } + + // console.log(JSON.stringify(options)) + + return options + } +} + +export default LineChart diff --git a/src/packages/line/chartHandler.js b/src/packages/line/chartHandler.js deleted file mode 100644 index 2437a25..0000000 --- a/src/packages/line/chartHandler.js +++ /dev/null @@ -1,167 +0,0 @@ -import { getDataset, getStackMap, formatMeasure } from '../../utils' - -function getLineTooltip (args) { - return { - trigger: 'axis' - } -} - -function getLineLegend (args) { - const { settings } = args - const { legendType = 'plain', legendPadding = 5 } = settings - return { - type: legendType, - padding: legendPadding - } -} - -function getLineDimAxis (args) { - const { settings } = args - const type = settings.yAxisType || 'category' - return { - type, - boundaryGap: false, - axisTick: { - show: false - }, - axisLabel: { - margin: 10, - fontWeight: 400 - } - } -} - -// build measure axis -function getLineMeaAxis (args) { - const { settings } = args - const { - yAxisScale, - yAxisLabelType, - yAxisLabelDigits, - yAxisName, - yAxisInterval, - yAxisMax, - yAxisMin, - percentage = false - } = settings - - let axisValue = { - type: 'value', - scale: yAxisScale, - axisTick: { - show: false - }, - axisLabel: { - margin: 10, - fontWeight: 400, - formatter: value => formatMeasure(yAxisLabelType, value, yAxisLabelDigits) - }, - min: percentage ? 0 : null, - max: percentage ? 1 : null - } - if (yAxisName) axisValue['name'] = yAxisName - if (yAxisInterval) axisValue['interval'] = Number(yAxisInterval) - if (yAxisMax) axisValue['max'] = yAxisMax - if (yAxisMin) axisValue['min'] = yAxisMin - - return axisValue -} - -// build label -function getLineLabel (args) { - const { - position = 'top', - formatType = 'currency', - formatDigits = 0, - ...others - } = args - const formatter = params => { - const { value, seriesIndex } = params - // dataset formatter need shift the value - value.shift() - return formatMeasure(formatType, value[seriesIndex], formatDigits) - } - return { - normal: { - position, - formatter, - ...others - } - } -} - -function getLineSeries (args) { - const { data, settings } = args - const { measures } = data - const { - label = {}, - showSymbol = true, - smooth = false, - stack = null, - step = null, - symbol = 'emptyCircle', - symbolSize = 4, - ...others - } = settings - const series = [] - const stackMap = stack && getStackMap(stack) - - function getLineStyle (lineParams) { - return { - normal: { - width: 2 - } - } - } - - console.log(stackMap) - - measures.forEach(({ name, data }, i) => { - series.push({ - type: 'line', - name, - label: getLineLabel(label), - lineStyle: getLineStyle(), - showSymbol, - smooth, - stack: stack && stackMap[name], - step, - symbol, - symbolSize, - ...others - }) - }) - - return series -} - -export const line = (data, settings, extra) => { - const { tooltipVisible, legendVisible, isEmptyData } = extra - - extra.chartType = 'line' - const dataset = !isEmptyData && getDataset(data, settings, extra) - - const tooltip = tooltipVisible && getLineTooltip() - - const legend = legendVisible && getLineLegend({ settings }) - - const xAxis = getLineDimAxis({ settings }) - - const yAxis = getLineMeaAxis({ settings }) - - const series = !isEmptyData && getLineSeries({ data, settings }) - - // build echarts options - const options = { - dataset, - tooltip, - legend, - xAxis, - yAxis, - series - } - - // console.log(JSON.stringify(options)) - - return options -} diff --git a/src/packages/line/index.js b/src/packages/line/index.js index f7e4761..77b3d18 100644 --- a/src/packages/line/index.js +++ b/src/packages/line/index.js @@ -1,3 +1,12 @@ -import VeLineChart from './index.vue' +import 'echarts/lib/chart/line' -export default VeLineChart +import HocEcharts from '../../components/HocEcharts.vue' +import Chart from './chart' + +export default { + name: 'VeLineChart', + mixins: [HocEcharts], + created () { + this.chartHandler = new Chart().line + } +} From 111cf395d485c19e674da853600e45dbcb2032bb Mon Sep 17 00:00:00 2001 From: xiaoluoboding Date: Sat, 4 Jan 2020 21:52:41 +0800 Subject: [PATCH 04/20] chore: update lib --- lib/demo.html | 8 + lib/ve-charts.common.js | 9996 ++++++++++++++++++++++++++++++++++++ lib/ve-charts.umd.js | 10006 +++++++++++++++++++++++++++++++++++++ lib/ve-charts.umd.min.js | 8 + 4 files changed, 20018 insertions(+) create mode 100644 lib/demo.html create mode 100644 lib/ve-charts.common.js create mode 100644 lib/ve-charts.umd.js create mode 100644 lib/ve-charts.umd.min.js diff --git a/lib/demo.html b/lib/demo.html new file mode 100644 index 0000000..252aeb6 --- /dev/null +++ b/lib/demo.html @@ -0,0 +1,8 @@ + +ve-charts demo + + + + diff --git a/lib/ve-charts.common.js b/lib/ve-charts.common.js new file mode 100644 index 0000000..5473ca6 --- /dev/null +++ b/lib/ve-charts.common.js @@ -0,0 +1,9996 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "fb15"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "068a": +/***/ (function(module, exports, __webpack_require__) { + +// Imports +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb"); +exports = ___CSS_LOADER_API_IMPORT___(false); +// Module +exports.push([module.i, ".ve-charts-empty-data{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}", ""]); +// Exports +module.exports = exports; + + +/***/ }), + +/***/ "0e45": +/***/ (function(module) { + +module.exports = JSON.parse("{\"北京市\":[116.46,39.92],\"天津市\":[117.2,39.13],\"上海市\":[121.48,31.22],\"重庆市\":[106.54,29.59],\"七台河市\":[130.95,45.78],\"万宁市\":[110.4,18.8],\"万州区\":[108.4,30.82],\"三亚市\":[109.5,18.25],\"三明市\":[117.62,26.27],\"三沙市\":[112.2,16.5],\"三门峡市\":[111.2,34.78],\"上饶市\":[117.97,28.45],\"东丽区\":[117.3,39.08],\"东城区\":[116.42,39.93],\"东方市\":[108.63,19.1],\"东莞市\":[113.75,23.05],\"东营市\":[118.67,37.43],\"中卫市\":[105.18,37.52],\"中山市\":[113.38,22.52],\"丰台区\":[116.28,39.85],\"丰都县\":[107.73,29.87],\"临夏州\":[103.22,35.6],\"临汾市\":[111.52,36.08],\"临沂市\":[118.35,35.05],\"临沧市\":[100.08,23.88],\"临高县\":[109.68,19.92],\"丹东市\":[124.38,40.13],\"丽水市\":[119.92,28.45],\"丽江市\":[100.23,26.88],\"乌兰察布市\":[113.12,40.98],\"乌海市\":[106.82,39.67],\"乌鲁木齐市\":[87.62,43.82],\"乐东县\":[109.17,18.75],\"乐山市\":[103.77,29.57],\"九江市\":[116,29.7],\"九龙坡区\":[106.5,29.5],\"云浮市\":[112.03,22.92],\"云阳县\":[108.67,30.95],\"五家渠市\":[87.53,44.17],\"五指山市\":[109.52,18.78],\"亳州市\":[115.78,33.85],\"仙桃市\":[113.45,30.37],\"伊春市\":[128.9,47.73],\"伊犁州\":[81.32,43.92],\"佛山市\":[113.12,23.02],\"佳木斯市\":[130.37,46.82],\"保亭县\":[109.7,18.63],\"保定市\":[115.47,38.87],\"保山市\":[99.17,25.12],\"信阳市\":[114.07,32.13],\"儋州市\":[109.57,19.52],\"克拉玛依市\":[84.87,45.6],\"六安市\":[116.5,31.77],\"六盘水市\":[104.83,26.6],\"兰州市\":[103.82,36.07],\"兴安盟\":[122.05,46.08],\"内江市\":[105.05,29.58],\"凉山州\":[102.27,27.9],\"包头市\":[109.83,40.65],\"北海市\":[109.12,21.48],\"北碚区\":[106.4,29.8],\"北辰区\":[117.13,39.22],\"十堰市\":[110.78,32.65],\"南京市\":[118.78,32.07],\"南充市\":[106.08,30.78],\"南宁市\":[109.29,22.8],\"南岸区\":[106.57,29.52],\"南川区\":[107.17,29.14],\"南平市\":[118.17,26.65],\"南开区\":[117.15,39.13],\"南昌市\":[115.85,28.68],\"南通市\":[120.88,31.98],\"南阳市\":[112.52,33],\"博尔塔拉州\":[82.07,44.9],\"厦门市\":[118.08,24.48],\"双鸭山市\":[131.15,46.63],\"台州市\":[121.43,28.68],\"合川区\":[106.3,30.11],\"合肥市\":[117.25,31.83],\"吉安市\":[114.98,27.12],\"吉林市\":[126.55,43.83],\"吐鲁番地区\":[89.17,42.95],\"吕梁市\":[111.13,37.52],\"吴忠市\":[106.2,37.98],\"周口市\":[114.65,33.62],\"呼伦贝尔市\":[119.77,49.22],\"呼和浩特市\":[111.73,40.83],\"和平区\":[117.2,39.12],\"和田地区\":[79.92,37.12],\"咸宁市\":[114.32,29.85],\"咸阳市\":[108.7,34.33],\"哈密地区\":[93.52,42.83],\"哈尔滨市\":[126.53,45.8],\"唐山市\":[118.2,39.63],\"商丘市\":[115.65,34.45],\"商洛市\":[109.93,33.87],\"喀什地区\":[75.98,39.47],\"嘉兴市\":[120.75,30.75],\"嘉定区\":[121.27,31.38],\"嘉峪关市\":[98.27,39.8],\"四平市\":[124.35,43.17],\"固原市\":[106.28,36],\"图木舒克市\":[79.13,39.85],\"垫江县\":[107.35,30.33],\"城口县\":[108.67,31.95],\"塔城地区\":[82.98,46.75],\"塘沽区\":[117.65,39.02],\"大兴区\":[116.33,39.73],\"大兴安岭地区\":[124.12,50.42],\"大同市\":[113.3,40.08],\"大庆市\":[125.03,46.58],\"大渡口区\":[106.48,29.48],\"大港区\":[117.45,38.83],\"大理州\":[100.23,25.6],\"大足区\":[105.72,29.7],\"大连市\":[121.62,38.92],\"天水市\":[105.72,34.58],\"天门市\":[113.17,30.67],\"太原市\":[112.55,37.87],\"奉节县\":[109.47,31.02],\"奉贤区\":[121.47,30.92],\"威海市\":[122.12,37.52],\"娄底市\":[112,27.73],\"孝感市\":[113.92,30.93],\"宁德市\":[119.52,26.67],\"宁河县\":[117.82,39.33],\"宁波市\":[121.55,29.88],\"安庆市\":[117.05,30.53],\"安康市\":[109.02,32.68],\"安阳市\":[114.38,36.1],\"安顺市\":[105.95,26.25],\"定安县\":[110.32,19.7],\"定西市\":[104.62,35.58],\"宜宾市\":[104.62,28.77],\"宜昌市\":[111.28,30.7],\"宜春市\":[114.38,27.8],\"宝坻区\":[117.3,39.72],\"宝山区\":[131.4,46.57],\"宝鸡市\":[107.13,34.37],\"宣城市\":[118.75,30.95],\"宣武区\":[116.35,39.87],\"宿州市\":[116.98,33.63],\"宿迁市\":[118.28,33.97],\"密云区\":[116.83,40.37],\"屯昌县\":[110.1,19.37],\"山南地区\":[91.77,29.23],\"岳阳市\":[113.12,29.37],\"崇左市\":[107.37,22.4],\"崇文区\":[116.43,39.88],\"崇明县\":[121.53,31.63],\"巫山县\":[109.88,31.08],\"巫溪县\":[109.63,31.4],\"巴中市\":[106.77,31.85],\"巴南区\":[106.52,29.38],\"巴彦淖尔市\":[107.42,40.75],\"巴音郭楞州\":[86.15,41.77],\"常州市\":[119.95,31.78],\"常德市\":[111.68,29.05],\"平凉市\":[106.67,35.55],\"平谷区\":[117.12,40.13],\"平顶山市\":[113.18,33.77],\"广元市\":[105.83,32.43],\"广安市\":[106.63,30.47],\"广州市\":[113.27,23.13],\"庆阳市\":[107.63,35.73],\"廊坊市\":[116.7,39.52],\"延安市\":[109.48,36.6],\"延庆县\":[115.97,40.45],\"延边州\":[129.5,42.88],\"开县\":[108.42,31.18],\"开封市\":[114.3,34.8],\"张家口市\":[114.88,40.82],\"张家界市\":[110.47,29.13],\"张掖市\":[100.45,38.93],\"彭水县\":[108.17,29.3],\"徐州市\":[117.18,34.27],\"徐汇区\":[121.43,31.18],\"德宏州\":[98.58,24.43],\"德州市\":[116.3,37.45],\"德阳市\":[104.38,31.13],\"忠县\":[108.02,30.3],\"忻州市\":[112.73,38.42],\"怀化市\":[110,27.57],\"怀柔区\":[116.63,40.32],\"怒江州\":[98.85,25.85],\"恩施州\":[109.5,30.3],\"惠州市\":[114.42,23.12],\"成都市\":[104.07,30.67],\"房山区\":[116.13,39.75],\"扬州市\":[119.4,32.4],\"承德市\":[117.93,40.97],\"抚州市\":[116.35,28],\"抚顺市\":[123.98,41.88],\"拉萨市\":[91.13,29.65],\"揭阳市\":[116.37,23.55],\"攀枝花市\":[101.72,26.58],\"文山州\":[104.25,23.37],\"文昌市\":[110.8,19.55],\"新乡市\":[113.9,35.3],\"新余市\":[114.92,27.82],\"无锡市\":[120.3,31.57],\"日喀则地区\":[88.88,29.27],\"日照市\":[119.52,35.42],\"昆明市\":[102.72,25.05],\"昌吉州\":[87.3,44.02],\"昌平区\":[116.23,40.22],\"昌江县\":[109.05,19.25],\"昌都地区\":[97.18,31.13],\"昭通市\":[103.72,27.33],\"晋中市\":[112.75,37.68],\"晋城市\":[112.83,35.5],\"普洱市\":[100.98,22.78],\"普陀区\":[121.4,31.25],\"景德镇市\":[117.17,29.27],\"曲靖市\":[103.8,25.5],\"朔州市\":[112.43,39.33],\"朝阳区\":[116.43,39.92],\"朝阳市\":[120.45,41.57],\"本溪市\":[123.77,41.3],\"来宾市\":[109.23,23.73],\"杨浦区\":[121.52,31.27],\"杭州市\":[120.15,30.28],\"松原市\":[124.82,45.13],\"松江区\":[121.22,31.03],\"林芝地区\":[94.37,29.68],\"果洛州\":[100.23,34.48],\"枣庄市\":[117.32,34.82],\"柳州市\":[109.42,24.32],\"株洲市\":[113.13,27.83],\"桂林市\":[110.28,25.28],\"梁平县\":[107.8,30.68],\"梅州市\":[116.12,24.28],\"梧州市\":[111.27,23.48],\"楚雄州\":[101.55,25.03],\"榆林市\":[109.73,38.28],\"武威市\":[102.63,37.93],\"武汉市\":[114.3,30.6],\"武清区\":[117.03,39.38],\"武隆县\":[107.75,29.33],\"毕节市\":[105.28,27.3],\"永川区\":[105.87,29.29],\"永州市\":[111.62,26.43],\"汉中市\":[107.02,33.07],\"汉沽区\":[117.8,39.25],\"汕头市\":[116.68,23.35],\"汕尾市\":[115.37,22.78],\"江北区\":[121.55,29.88],\"江津区\":[106.3,29.03],\"江门市\":[113.08,22.58],\"池州市\":[117.48,30.67],\"沈阳市\":[123.43,41.8],\"沙坪坝区\":[106.45,29.53],\"沧州市\":[116.83,38.3],\"河东区\":[117.22,39.12],\"河北区\":[117.18,39.15],\"河池市\":[108.07,24.7],\"河源市\":[114.7,23.73],\"河西区\":[117.22,39.12],\"泉州市\":[118.67,24.88],\"泰安市\":[117.08,36.2],\"泰州市\":[119.92,32.45],\"泸州市\":[105.43,28.87],\"洛阳市\":[112.45,34.62],\"津南区\":[117.38,38.98],\"济南市\":[116.98,36.67],\"济宁市\":[116.58,35.42],\"济源市\":[112.58,35.07],\"浦东新区\":[121.53,31.22],\"海东地区\":[102.12,36.5],\"海北州\":[100.9,36.97],\"海南州\":[100.62,36.28],\"海口市\":[110.32,20.03],\"海淀区\":[116.3,39.95],\"海西州\":[97.37,37.37],\"涪陵区\":[107.4,29.72],\"淄博市\":[118.05,36.82],\"淮北市\":[116.8,33.95],\"淮南市\":[117,32.63],\"淮安市\":[119.02,33.62],\"深圳市\":[114.05,22.55],\"清远市\":[113.03,23.7],\"渝中区\":[106.57,29.55],\"渝北区\":[106.63,29.72],\"温州市\":[120.7,28],\"渭南市\":[109.5,34.5],\"湖州市\":[120.08,30.9],\"湘潭市\":[112.93,27.83],\"湘西州\":[109.74,28.31],\"湛江市\":[110.35,21.27],\"滁州市\":[118.32,32.3],\"滨州市\":[117.97,37.38],\"漯河市\":[114.02,33.58],\"漳州市\":[117.65,24.52],\"潍坊市\":[119.15,36.7],\"潜江市\":[112.88,30.42],\"潮州市\":[116.62,23.67],\"潼南县\":[105.83,30.18],\"澄迈县\":[110,19.73],\"濮阳市\":[115.03,35.77],\"烟台市\":[121.43,37.45],\"焦作市\":[113.25,35.22],\"牡丹江市\":[129.6,44.58],\"玉林市\":[110.17,22.63],\"玉树州\":[97.02,33],\"玉溪市\":[102.55,24.35],\"珠海市\":[113.57,22.27],\"琼中县\":[109.83,19.03],\"琼海市\":[110.47,19.25],\"璧山县\":[106.22,29.6],\"甘南州\":[102.92,34.98],\"甘孜州\":[101.97,30.05],\"白城市\":[122.83,45.62],\"白山市\":[126.42,41.93],\"白沙县\":[109.45,19.23],\"白银市\":[104.18,36.55],\"百色市\":[106.62,23.9],\"益阳市\":[112.32,28.6],\"盐城市\":[120.15,33.35],\"盘锦市\":[122.07,41.12],\"眉山市\":[103.83,30.05],\"石嘴山市\":[106.38,39.02],\"石家庄市\":[114.52,38.05],\"石景山区\":[116.22,39.9],\"石柱县\":[108.12,30],\"石河子市\":[86.03,44.3],\"神农架林区\":[110.67,31.75],\"福州市\":[119.3,26.08],\"秀山县\":[108.98,28.45],\"秦皇岛市\":[119.6,39.93],\"綦江区\":[106.65,29.03],\"红桥区\":[117.15,39.17],\"红河州\":[103.4,23.37],\"绍兴市\":[120.57,30],\"绥化市\":[126.98,46.63],\"绵阳市\":[104.73,31.47],\"聊城市\":[115.98,36.45],\"肇庆市\":[112.47,23.05],\"自贡市\":[104.78,29.35],\"舟山市\":[122.2,30],\"芜湖市\":[118.38,31.33],\"苏州市\":[120.58,31.3],\"茂名市\":[110.92,21.67],\"荆州市\":[112.23,30.33],\"荆门市\":[112.2,31.03],\"荣昌县\":[105.58,29.4],\"莆田市\":[119,25.43],\"莱芜市\":[117.67,36.22],\"菏泽市\":[115.46,35.26],\"萍乡市\":[113.85,27.63],\"营口市\":[122.23,40.67],\"葫芦岛市\":[120.83,40.72],\"蓟县\":[117.4,40.05],\"虹口区\":[121.5,31.27],\"蚌埠市\":[117.38,32.92],\"衡水市\":[115.68,37.73],\"衡阳市\":[112.57,26.9],\"衢州市\":[118.87,28.93],\"襄阳市\":[112.2,32.08],\"西双版纳州\":[100.8,22.02],\"西城区\":[116.37,39.92],\"西宁市\":[101.78,36.62],\"西安市\":[108.93,34.27],\"西青区\":[117,39.13],\"许昌市\":[113.85,34.03],\"贵港市\":[109.6,23.1],\"贵阳市\":[106.63,26.65],\"贺州市\":[111.55,24.42],\"资阳市\":[104.65,30.12],\"赣州市\":[114.93,25.83],\"赤峰市\":[118.92,42.27],\"辽源市\":[125.13,42.88],\"辽阳市\":[123.17,41.27],\"达州市\":[107.5,31.22],\"运城市\":[110.98,35.02],\"连云港市\":[119.22,34.6],\"迪庆州\":[99.7,27.83],\"迪庆藏族自治县\":[99.7,27.83],\"通化市\":[125.93,41.73],\"通州区\":[116.65,39.92],\"通辽市\":[122.27,43.62],\"遂宁市\":[105.57,30.52],\"遵义市\":[106.92,27.73],\"邢台市\":[114.48,37.07],\"那曲地区\":[92.07,31.48],\"邯郸市\":[114.48,36.62],\"邵阳市\":[111.47,27.25],\"郑州市\":[113.62,34.75],\"郴州市\":[113.02,25.78],\"鄂尔多斯市\":[109.8,39.62],\"鄂州市\":[114.88,30.4],\"酉阳县\":[108.77,28.85],\"酒泉市\":[98.52,39.75],\"金华市\":[119.65,29.08],\"金山区\":[121.33,30.75],\"金昌市\":[102.18,38.5],\"钦州市\":[108.62,21.95],\"铁岭市\":[123.83,42.28],\"铜仁市\":[109.18,27.72],\"铜川市\":[108.93,34.9],\"铜梁县\":[106.05,29.85],\"铜陵市\":[117.82,30.93],\"银川市\":[106.28,38.47],\"锡林郭勒盟\":[116.07,43.95],\"锦州市\":[121.13,41.1],\"镇江市\":[119.45,32.2],\"长宁区\":[121.42,31.22],\"长寿区\":[107.08,29.87],\"长春市\":[125.32,43.9],\"长沙市\":[112.93,28.23],\"长治市\":[113.11,36.2],\"门头沟\":[116.1,39.93],\"闵行区\":[121.38,31.12],\"闸北区\":[121.45,31.25],\"阜新市\":[121.67,42.02],\"阜阳市\":[115.82,32.9],\"防城港市\":[108.35,21.7],\"阳江市\":[111.98,21.87],\"阳泉市\":[113.57,37.85],\"阿克苏地区\":[80.27,41.17],\"阿勒泰地区\":[88.13,47.85],\"阿坝州\":[102.22,31.9],\"阿拉善盟\":[105.67,38.83],\"阿拉尔市\":[81.28,40.55],\"阿里地区\":[80.1,32.5],\"陇南市\":[104.92,33.4],\"陵水县\":[110.03,18.5],\"随州市\":[113.37,31.72],\"雅安市\":[103,29.98],\"青岛市\":[120.38,36.07],\"青浦区\":[121.12,31.15],\"静安区\":[121.45,31.23],\"静海县\":[116.92,38.93],\"鞍山市\":[122.98,41.1],\"韶关市\":[113.6,24.82],\"韶山市\":[112.52,27.93],\"顺义区\":[116.65,40.13],\"马鞍山市\":[118.5,31.7],\"驻马店市\":[114.02,32.98],\"鸡西市\":[130.97,45.3],\"鹤壁市\":[114.28,35.75],\"鹤岗市\":[130.27,47.33],\"鹰潭市\":[117.07,28.27],\"黄冈市\":[114.87,30.45],\"黄南州\":[102.02,35.52],\"黄山市\":[118.33,29.72],\"黄浦区\":[121.48,31.23],\"黄石市\":[115.03,30.2],\"黑河市\":[127.48,50.25],\"黔东南州\":[107.97,26.58],\"黔南州\":[107.52,26.27],\"黔江区\":[108.77,29.53],\"黔西南州\":[106.12,27.05],\"齐齐哈尔市\":[123.95,47.33],\"龙岩市\":[117.03,25.1]}"); + +/***/ }), + +/***/ "0fcc": +/***/ (function(module, exports, __webpack_require__) { + +// style-loader: Adds some css to the DOM by adding a