diff --git a/src/CoordinateSystem.js b/src/CoordinateSystem.js index 3c254bc1da64fb80871647eb684c2538c0132b8d..cf068eba005efb9a18261aee91d1544241785bfc 100644 --- a/src/CoordinateSystem.js +++ b/src/CoordinateSystem.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var coordinateSystemCreators = {}; diff --git a/src/ExtensionAPI.js b/src/ExtensionAPI.js index 99a1fb36fb0333b3d3ced750f27f606a4c3b25fa..93acac9bfb4f2fead3fcbeb58f74136ce34444e0 100644 --- a/src/ExtensionAPI.js +++ b/src/ExtensionAPI.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var echartsAPIList = [ 'getDom', 'getZr', 'getWidth', 'getHeight', 'getDevicePixelRatio', 'dispatchAction', 'isDisposed', diff --git a/src/action/createDataSelectAction.js b/src/action/createDataSelectAction.js index f2e0c9b37f9f8676c60a67fa993ca32504b2d48f..f0b9e2ef61a515b343997a87bd109ff8fa167232 100644 --- a/src/action/createDataSelectAction.js +++ b/src/action/createDataSelectAction.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export default function (seriesType, actionInfos) { zrUtil.each(actionInfos, function (actionInfo) { diff --git a/src/action/geoRoam.js b/src/action/geoRoam.js index 566748f6a899d4666696ed5e520c4ea27bdc3799..4d0b10d50388514dbd6244ecbec52417f3da2184 100644 --- a/src/action/geoRoam.js +++ b/src/action/geoRoam.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {updateCenterAndZoom} from './roamHelper'; /** diff --git a/src/chart/bar.js b/src/chart/bar.js index d72c7b017bd987f82a6164268690f6704a92bc13..151969e564fabcfbee361e6fd7f16cda17fecaed 100644 --- a/src/chart/bar.js +++ b/src/chart/bar.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import barLayoutGrid from '../layout/barGrid'; import '../coord/cartesian/Grid'; diff --git a/src/chart/bar/BarView.js b/src/chart/bar/BarView.js index 7077d0f8d30e50a2579fa3491e576ba670e2bb37..bc6b01146d1b9f059c133b8348d16c5fbfbb2c0f 100644 --- a/src/chart/bar/BarView.js +++ b/src/chart/bar/BarView.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import {setLabel} from './helper'; import Model from '../../model/Model'; diff --git a/src/chart/bar/PictorialBarView.js b/src/chart/bar/PictorialBarView.js index 38648b730cc2d7187214782f7a402a3e3344b832..29b5f38b5e8e8f98d5de3f574ce2d7df39fffc9a 100644 --- a/src/chart/bar/PictorialBarView.js +++ b/src/chart/bar/PictorialBarView.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import {createSymbol} from '../../util/symbol'; import {parsePercent, isNumeric} from '../../util/number'; diff --git a/src/chart/boxplot/BoxplotSeries.js b/src/chart/boxplot/BoxplotSeries.js index 9410f21f5dd81db47981ad987af701e27109c1a2..5fd284d10149f48f08a4aa6f7f19c29c7e032529 100644 --- a/src/chart/boxplot/BoxplotSeries.js +++ b/src/chart/boxplot/BoxplotSeries.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import SeriesModel from '../../model/Series'; import {seriesModelMixin} from '../helper/whiskerBoxCommon'; diff --git a/src/chart/boxplot/BoxplotView.js b/src/chart/boxplot/BoxplotView.js index 75ac1cc881d82f3c4cc8cc7a04a6ba4ab9fd5236..79b0e9def186515f6286746a8d2b04f4caf460fc 100644 --- a/src/chart/boxplot/BoxplotView.js +++ b/src/chart/boxplot/BoxplotView.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import ChartView from '../../view/Chart'; import * as graphic from '../../util/graphic'; import {viewMixin} from '../helper/whiskerBoxCommon'; diff --git a/src/chart/boxplot/boxplotLayout.js b/src/chart/boxplot/boxplotLayout.js index 035ba55d602af0623982ea5a2edda78fd61c60ef..4c6122b56a527e5b70cd4b1b048d42814a99fe3e 100644 --- a/src/chart/boxplot/boxplotLayout.js +++ b/src/chart/boxplot/boxplotLayout.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {parsePercent} from '../../util/number'; var each = zrUtil.each; diff --git a/src/chart/candlestick/CandlestickSeries.js b/src/chart/candlestick/CandlestickSeries.js index b8270e81bb170fa1a78ae7ccec0a2532a994b580..ed999f48bada7eb0628495b6a86e99d18369657e 100644 --- a/src/chart/candlestick/CandlestickSeries.js +++ b/src/chart/candlestick/CandlestickSeries.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import SeriesModel from '../../model/Series'; import {seriesModelMixin} from '../helper/whiskerBoxCommon'; diff --git a/src/chart/candlestick/CandlestickView.js b/src/chart/candlestick/CandlestickView.js index d570be09dea7290b3ff45d531609de0ba8244931..5e42df6966034018c021bf87e415dbbd51327dba 100644 --- a/src/chart/candlestick/CandlestickView.js +++ b/src/chart/candlestick/CandlestickView.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import ChartView from '../../view/Chart'; import * as graphic from '../../util/graphic'; import {viewMixin} from '../helper/whiskerBoxCommon'; diff --git a/src/chart/candlestick/candlestickLayout.js b/src/chart/candlestick/candlestickLayout.js index 0ba97fc7d4c55122307f0f8407544f0f3d9ff086..60b73c94fcb38b1612b81e16c448aa22dbc125b3 100644 --- a/src/chart/candlestick/candlestickLayout.js +++ b/src/chart/candlestick/candlestickLayout.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {parsePercent} from '../../util/number'; import {subPixelOptimize} from '../../util/graphic'; diff --git a/src/chart/candlestick/preprocessor.js b/src/chart/candlestick/preprocessor.js index fb3eee58fc5424dbcf249664eff3d7011e7038d7..9339d3c559ea9da8f1e1a59933f737d9a3a3923f 100644 --- a/src/chart/candlestick/preprocessor.js +++ b/src/chart/candlestick/preprocessor.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export default function (option) { if (!option || !zrUtil.isArray(option.series)) { diff --git a/src/chart/chord.js b/src/chart/chord.js index 4009a0d10fdd2f589077a6209f0a421536583ee5..587da080726fa0ca904518d8363d2fa98461621a 100644 --- a/src/chart/chord.js +++ b/src/chart/chord.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import './chord/ChordSeries'; import './chord/ChordView'; diff --git a/src/chart/chord/chordCircularLayout.js b/src/chart/chord/chordCircularLayout.js index b6e47083f437d69acfb0a7facacc521739fa14b6..b85ec6353d1c6dc846fd3075902141ed7358f129 100644 --- a/src/chart/chord/chordCircularLayout.js +++ b/src/chart/chord/chordCircularLayout.js @@ -3,7 +3,7 @@ * @module echarts/chart/chord/chordCircularLayout * @author pissang(http://github.com/pissang) */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {parsePercent} from '../../util/number'; /** diff --git a/src/chart/custom.js b/src/chart/custom.js index 037153d1e1d9d64f9672d4b635afc5a58f789a84..5e88dc4cb928acca324fb9a50cf3ce6fe86f9ecd 100644 --- a/src/chart/custom.js +++ b/src/chart/custom.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphicUtil from '../util/graphic'; import {findLabelValueDim} from './helper/labelHelper'; import createListFromArray from './helper/createListFromArray'; diff --git a/src/chart/effectScatter.js b/src/chart/effectScatter.js index 69736fb2eccba7d9856574e117e6788d8c7ba634..c5630e92209e1da5c32111a319f538c8590c9137 100644 --- a/src/chart/effectScatter.js +++ b/src/chart/effectScatter.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import './effectScatter/EffectScatterSeries'; import './effectScatter/EffectScatterView'; diff --git a/src/chart/funnel.js b/src/chart/funnel.js index 0571549ad275a1800fcc457da0f2e75640933135..d842c2bda388b8bf92cdb7c5012708c369f20b93 100644 --- a/src/chart/funnel.js +++ b/src/chart/funnel.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import './funnel/FunnelSeries'; import './funnel/FunnelView'; diff --git a/src/chart/funnel/FunnelView.js b/src/chart/funnel/FunnelView.js index ee134d828c2a09f5710ee1836652e5237c74146b..14a495c45a72630fee3e31d01e630e7cce30c023 100644 --- a/src/chart/funnel/FunnelView.js +++ b/src/chart/funnel/FunnelView.js @@ -1,5 +1,5 @@ import * as graphic from '../../util/graphic'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import ChartView from '../../view/Chart'; /** diff --git a/src/chart/gauge/GaugeSeries.js b/src/chart/gauge/GaugeSeries.js index 01fea0ff1e6f3f907488755f830ae0a9bac50128..f751b80b576ba44a433f76ebec2ad83d2eab5932 100644 --- a/src/chart/gauge/GaugeSeries.js +++ b/src/chart/gauge/GaugeSeries.js @@ -1,6 +1,6 @@ import List from '../../data/List'; import SeriesModel from '../../model/Series'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var GaugeSeries = SeriesModel.extend({ diff --git a/src/chart/gauge/PointerPath.js b/src/chart/gauge/PointerPath.js index 302b669e59861990fbfcb5cb40ba6d8bd3b00b8a..9aa792362f51a2b1a34a625d789432ec10f8755f 100644 --- a/src/chart/gauge/PointerPath.js +++ b/src/chart/gauge/PointerPath.js @@ -1,4 +1,4 @@ -import {Path} from 'zrender'; +import Path from 'zrender/graphic/Path'; export default Path.extend({ diff --git a/src/chart/graph.js b/src/chart/graph.js index ee85cae5f61aada2a4bbc4f6b08b43c4abfe909d..52720fc776a5454a1818156509a12f36f1c5db91 100644 --- a/src/chart/graph.js +++ b/src/chart/graph.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import './graph/GraphSeries'; import './graph/GraphView'; diff --git a/src/chart/graph/GraphSeries.js b/src/chart/graph/GraphSeries.js index 44d85db58eb1d65c38ed5ac4ce031dc6d978c09e..b156bde0cbcf06b96478aafe7317d1bf4fa19a7a 100644 --- a/src/chart/graph/GraphSeries.js +++ b/src/chart/graph/GraphSeries.js @@ -1,6 +1,6 @@ import * as echarts from '../../echarts'; import List from '../../data/List'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {defaultEmphasis} from '../../util/model'; import Model from '../../model/Model'; import {encodeHTML} from '../../util/format'; diff --git a/src/chart/graph/GraphView.js b/src/chart/graph/GraphView.js index 7ce086aae5b44b81469746652102770bb535d529..0ca426eaa3e924688a5e5ae90eb1ebda5ccb7c74 100644 --- a/src/chart/graph/GraphView.js +++ b/src/chart/graph/GraphView.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import SymbolDraw from '../helper/SymbolDraw'; import LineDraw from '../helper/LineDraw'; import RoamController from '../../component/helper/RoamController'; diff --git a/src/chart/graph/adjustEdge.js b/src/chart/graph/adjustEdge.js index 4285fe6fe034ff322f43716da9c11f8c4cec1e08..609752e07a1d2d9d9a1d729a27cff966a3cef267 100644 --- a/src/chart/graph/adjustEdge.js +++ b/src/chart/graph/adjustEdge.js @@ -1,5 +1,5 @@ -import {curve as curveTool} from 'zrender'; -import {vector as vec2} from 'zrender'; +import * as curveTool from 'zrender/core/curve'; +import * as vec2 from 'zrender/core/vector'; var v1 = []; var v2 = []; diff --git a/src/chart/graph/createView.js b/src/chart/graph/createView.js index 2ca9f7433fcf4c1edccd4cc8ba8b6e1f25094d25..03854ba8e46efe6c8a913d9064222d89eb6f1b6f 100644 --- a/src/chart/graph/createView.js +++ b/src/chart/graph/createView.js @@ -1,7 +1,7 @@ // FIXME Where to create the simple view coordinate system import View from '../../coord/View'; import {getLayoutRect} from '../../util/layout'; -import {bbox} from 'zrender'; +import * as bbox from 'zrender/core/bbox'; function getViewRect(seriesModel, api, aspect) { var option = seriesModel.getBoxLayoutParams(); diff --git a/src/chart/graph/forceHelper.js b/src/chart/graph/forceHelper.js index e564fbe9556435b4a3a1a696bac77e0facf34e56..b7109f74c799f3b5d2b6182744e23d3f5b841912 100644 --- a/src/chart/graph/forceHelper.js +++ b/src/chart/graph/forceHelper.js @@ -1,4 +1,4 @@ -import {vector as vec2} from 'zrender'; +import * as vec2 from 'zrender/core/vector'; var scaleAndAdd = vec2.scaleAndAdd; diff --git a/src/chart/graph/forceLayout.js b/src/chart/graph/forceLayout.js index b2c0766f88cc00dfafda53e8146196088a9cd729..f3ed89b387fbc050dc99b9268d5a427e5154d925 100644 --- a/src/chart/graph/forceLayout.js +++ b/src/chart/graph/forceLayout.js @@ -2,8 +2,8 @@ import {forceLayout} from './forceHelper'; import {simpleLayout} from './simpleLayoutHelper'; import {circularLayout} from './circularLayoutHelper'; import {linearMap} from '../../util/number'; -import {vector as vec2} from 'zrender'; -import {util as zrUtil} from 'zrender'; +import * as vec2 from 'zrender/core/vector'; +import * as zrUtil from 'zrender/core/util'; export default function (ecModel) { ecModel.eachSeriesByType('graph', function (graphSeries) { diff --git a/src/chart/graph/simpleLayoutHelper.js b/src/chart/graph/simpleLayoutHelper.js index 2527ffcdb064f34af253e2d8955880a1ffb45328..952272ec3bf70fd67ce5277e9acfc337285bbb47 100644 --- a/src/chart/graph/simpleLayoutHelper.js +++ b/src/chart/graph/simpleLayoutHelper.js @@ -1,4 +1,4 @@ -import {vector as vec2} from 'zrender'; +import * as vec2 from 'zrender/core/vector'; export function simpleLayout(seriesModel) { var coordSys = seriesModel.coordinateSystem; diff --git a/src/chart/heatmap/HeatmapLayer.js b/src/chart/heatmap/HeatmapLayer.js index d6eb9a19bade6e42fff69ddf99b4e8ad115278e9..07a3595a12fa036f156a0880f37d136355e48d26 100644 --- a/src/chart/heatmap/HeatmapLayer.js +++ b/src/chart/heatmap/HeatmapLayer.js @@ -6,7 +6,7 @@ * @module */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var GRADIENT_LEVELS = 256; diff --git a/src/chart/heatmap/HeatmapView.js b/src/chart/heatmap/HeatmapView.js index a0ad6e97c79b9021ab7f8890030dfd4bf0129535..17563e99ec7b2a3b86320d054e326664ab5a26e2 100644 --- a/src/chart/heatmap/HeatmapView.js +++ b/src/chart/heatmap/HeatmapView.js @@ -1,7 +1,7 @@ import * as echarts from '../../echarts'; import * as graphic from '../../util/graphic'; import HeatmapLayer from './HeatmapLayer'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; function getIsInPiecewiseRange(dataExtent, pieceList, selected) { var dataSpan = dataExtent[1] - dataExtent[0]; diff --git a/src/chart/helper/EffectLine.js b/src/chart/helper/EffectLine.js index 5982e874ff4c033b3fab874d4fc566c771306b5c..febe41049594aeb03d54cbff4887dfdd1c1e2382 100644 --- a/src/chart/helper/EffectLine.js +++ b/src/chart/helper/EffectLine.js @@ -5,10 +5,10 @@ import * as graphic from '../../util/graphic'; import Line from './Line'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {createSymbol} from '../../util/symbol'; -import {vector as vec2} from 'zrender'; -import {curve as curveUtil} from 'zrender'; +import * as vec2 from 'zrender/core/vector'; +import * as curveUtil from 'zrender/core/curve'; /** * @constructor diff --git a/src/chart/helper/EffectPolyline.js b/src/chart/helper/EffectPolyline.js index 82b316b86d2f325a0f7c1ea9e83fda14f7772c5d..3b122766cd1d0db264f08c9a4b2ea0fac0af9de3 100644 --- a/src/chart/helper/EffectPolyline.js +++ b/src/chart/helper/EffectPolyline.js @@ -4,9 +4,9 @@ */ import Polyline from './Polyline'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import EffectLine from './EffectLine'; -import {vector as vec2} from 'zrender'; +import * as vec2 from 'zrender/core/vector'; /** * @constructor diff --git a/src/chart/helper/EffectSymbol.js b/src/chart/helper/EffectSymbol.js index 50f2c9868b9c07ef878a83faf218a2befc4ad585..678cf47c57917c09de09cd205121b671f90eb3d9 100644 --- a/src/chart/helper/EffectSymbol.js +++ b/src/chart/helper/EffectSymbol.js @@ -3,7 +3,7 @@ * @module echarts/chart/helper/EffectSymbol */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {createSymbol} from '../../util/symbol'; import {Group} from '../../util/graphic'; import {parsePercent} from '../../util/number'; diff --git a/src/chart/helper/LargeLineDraw.js b/src/chart/helper/LargeLineDraw.js index 3761f8070aa68c2a223b5b67eaf7fa77ef0f7e3e..d1438bda2932bf8cc5dc28e45dfdc8ac0357af24 100644 --- a/src/chart/helper/LargeLineDraw.js +++ b/src/chart/helper/LargeLineDraw.js @@ -1,7 +1,8 @@ // TODO Batch by color import * as graphic from '../../util/graphic'; -import {contain} from 'zrender'; +import * as lineContain from 'zrender/contain/line'; +import * as quadraticContain from 'zrender/contain/quadratic'; var LargeLineShape = graphic.extendShape({ shape: { @@ -45,7 +46,7 @@ var LargeLineShape = graphic.extendShape({ var seg = segs[i]; if (isPolyline) { for (var j = 1; j < seg.length; j++) { - if (contain.line.containStroke( + if (lineContain.containStroke( seg[j - 1][0], seg[j - 1][1], seg[j][0], seg[j][1], lineWidth, x, y )) { return i; @@ -54,14 +55,14 @@ var LargeLineShape = graphic.extendShape({ } else { if (seg.length > 2) { - if (contain.quadratic.containStroke( + if (quadraticContain.containStroke( seg[0][0], seg[0][1], seg[2][0], seg[2][1], seg[1][0], seg[1][1], lineWidth, x, y )) { return i; } } else { - if (contain.line.containStroke( + if (lineContain.containStroke( seg[0][0], seg[0][1], seg[1][0], seg[1][1], lineWidth, x, y )) { return i; diff --git a/src/chart/helper/Line.js b/src/chart/helper/Line.js index 53235b47956c22ee18e9aa7e5bf2bcebcc969a39..ad61f92b059ed78d9387da2f5bf554516f6e116d 100644 --- a/src/chart/helper/Line.js +++ b/src/chart/helper/Line.js @@ -2,7 +2,8 @@ * @module echarts/chart/helper/Line */ -import {util as zrUtil, vector} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import * as vector from 'zrender/core/vector'; import * as symbolUtil from '../../util/symbol'; import LinePath from './LinePath'; import * as graphic from '../../util/graphic'; diff --git a/src/chart/helper/LinePath.js b/src/chart/helper/LinePath.js index 77928ada5a2f0d671831045eeef32966ec5788da..740664e470f3a836e273a0b5a872b4ff6ac777b3 100644 --- a/src/chart/helper/LinePath.js +++ b/src/chart/helper/LinePath.js @@ -3,7 +3,7 @@ */ import * as graphic from '../../util/graphic'; -import {vector as vec2} from 'zrender'; +import * as vec2 from 'zrender/core/vector'; var straightLineProto = graphic.Line.prototype; var bezierCurveProto = graphic.BezierCurve.prototype; diff --git a/src/chart/helper/Polyline.js b/src/chart/helper/Polyline.js index c4b8ebb842665283fc2a93cc4457c5abca2e4bdb..c45dd7eee6eae2e2a85a1f5bc0f9285c89b5a83b 100644 --- a/src/chart/helper/Polyline.js +++ b/src/chart/helper/Polyline.js @@ -3,7 +3,7 @@ */ import * as graphic from '../../util/graphic'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; /** * @constructor diff --git a/src/chart/helper/Symbol.js b/src/chart/helper/Symbol.js index ec0f8117269263196fea196de018166368808f37..a37b8f1359c748bdd878da1a63e3be103f5e4e80 100644 --- a/src/chart/helper/Symbol.js +++ b/src/chart/helper/Symbol.js @@ -2,7 +2,7 @@ * @module echarts/chart/helper/Symbol */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {createSymbol} from '../../util/symbol'; import * as graphic from '../../util/graphic'; import {parsePercent} from '../../util/number'; diff --git a/src/chart/helper/WhiskerBoxDraw.js b/src/chart/helper/WhiskerBoxDraw.js index 1575c83c9c28125374ae252fbfa23e9f72647e53..952abb36fb59fed00bd2541e48112b932d9b1ca2 100644 --- a/src/chart/helper/WhiskerBoxDraw.js +++ b/src/chart/helper/WhiskerBoxDraw.js @@ -2,7 +2,7 @@ * @module echarts/chart/helper/Symbol */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import Path from 'zrender/graphic/Path'; diff --git a/src/chart/helper/createGraphFromNodeEdge.js b/src/chart/helper/createGraphFromNodeEdge.js index 3bf5ccf66bb1ed0f8bc23add507c7868daa7c804..fd79bdf6e5131dbdd32d605ca040247be75974d7 100644 --- a/src/chart/helper/createGraphFromNodeEdge.js +++ b/src/chart/helper/createGraphFromNodeEdge.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import List from '../../data/List'; import Graph from '../../data/Graph'; import linkList from '../../data/helper/linkList'; diff --git a/src/chart/helper/createGraphFromNodeMatrix.js b/src/chart/helper/createGraphFromNodeMatrix.js index 26841bfe5a13c99c61fa160e59af0cf0f54f8e7f..e1c472d5660f5ec3e1111ddb81401547d9925c31 100644 --- a/src/chart/helper/createGraphFromNodeMatrix.js +++ b/src/chart/helper/createGraphFromNodeMatrix.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import List from '../../data/List'; import Graph from '../../data/Graph'; import linkList from '../../data/helper/linkList'; diff --git a/src/chart/helper/createListFromArray.js b/src/chart/helper/createListFromArray.js index ce7db04fcd6691f2ed4c7af7e4007555d7e1d02b..8617ce6f817bbae40fcb3742e1507d33783a87b9 100644 --- a/src/chart/helper/createListFromArray.js +++ b/src/chart/helper/createListFromArray.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import List from '../../data/List'; import completeDimensions from '../../data/helper/completeDimensions'; import {getDataItemValue, converDataValue, isDataItemOption} from '../../util/model'; diff --git a/src/chart/helper/whiskerBoxCommon.js b/src/chart/helper/whiskerBoxCommon.js index 8748e4a8e051fa0eff27cdbac703b7a2066c17df..8feb53f2f5dcaa95edf649e49dd72ccf71bf013b 100644 --- a/src/chart/helper/whiskerBoxCommon.js +++ b/src/chart/helper/whiskerBoxCommon.js @@ -2,7 +2,7 @@ import List from '../../data/List'; import completeDimensions from '../../data/helper/completeDimensions'; import WhiskerBoxDraw from '../helper/WhiskerBoxDraw'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export var seriesModelMixin = { diff --git a/src/chart/line.js b/src/chart/line.js index bca5c3adc5762938e8a6051476b8db053af1bd74..3bae0736792bc2ec4c106fd5781fcea164ab0e36 100644 --- a/src/chart/line.js +++ b/src/chart/line.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import './line/LineSeries'; import './line/LineView'; diff --git a/src/chart/line/LineView.js b/src/chart/line/LineView.js index b802e3c84fa82266a5e91e569ab9ec0d42194e5e..bdb378961bba2191a2cf0ba7c1ef4ddfa7885014 100644 --- a/src/chart/line/LineView.js +++ b/src/chart/line/LineView.js @@ -1,6 +1,6 @@ // FIXME step not support polar -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import SymbolDraw from '../helper/SymbolDraw'; import SymbolClz from '../helper/Symbol'; import lineAnimationDiff from './lineAnimationDiff'; diff --git a/src/chart/line/poly.js b/src/chart/line/poly.js index 7b8f5732ae40bd9932bf22d354459f2679065668..aa59377a296d9cc6fdd25a2aac37139e5e41a91f 100644 --- a/src/chart/line/poly.js +++ b/src/chart/line/poly.js @@ -1,7 +1,8 @@ // Poly path support NaN point import Path from 'zrender/graphic/Path'; -import {vector as vec2, zrHelper} from 'zrender'; +import * as vec2 from 'zrender/core/vector'; +import fixClipWithShadow from 'zrender/graphic/helper/fixClipWithShadow'; var vec2Min = vec2.min; var vec2Max = vec2.max; @@ -151,7 +152,7 @@ export var Polyline = Path.extend({ stroke: '#000' }, - brush: zrHelper.fixClipWithShadow(Path.prototype.brush), + brush: fixClipWithShadow(Path.prototype.brush), buildPath: function (ctx, shape) { var points = shape.points; @@ -205,7 +206,7 @@ export var Polygon = Path.extend({ connectNulls: false }, - brush: zrHelper.fixClipWithShadow(Path.prototype.brush), + brush: fixClipWithShadow(Path.prototype.brush), buildPath: function (ctx, shape) { var points = shape.points; diff --git a/src/chart/lines/LinesSeries.js b/src/chart/lines/LinesSeries.js index 9a886b9009400a9d9c0f0c75403fea70fb943f01..85bbc9f02be25bc01aa27cdd5ca46f922fcce25e 100644 --- a/src/chart/lines/LinesSeries.js +++ b/src/chart/lines/LinesSeries.js @@ -1,6 +1,6 @@ import SeriesModel from '../../model/Series'; import List from '../../data/List'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {encodeHTML} from '../../util/format'; import CoordinateSystem from '../../CoordinateSystem'; diff --git a/src/chart/map/MapSeries.js b/src/chart/map/MapSeries.js index 6806427e0eecbd3b50d81f2c1b4e7ebc68a541bc..7b29cdd544e54586d8e9fbff845e54017786e177 100644 --- a/src/chart/map/MapSeries.js +++ b/src/chart/map/MapSeries.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import List from '../../data/List'; import SeriesModel from '../../model/Series'; import completeDimensions from '../../data/helper/completeDimensions'; diff --git a/src/chart/map/MapView.js b/src/chart/map/MapView.js index b253441bd243c65876b0f5677ee59c66cc456dbe..f8565d0cb7d4f71e436ff793d51a463950519158 100644 --- a/src/chart/map/MapView.js +++ b/src/chart/map/MapView.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import MapDraw from '../../component/helper/MapDraw'; diff --git a/src/chart/map/backwardCompat.js b/src/chart/map/backwardCompat.js index 74432461750a0b5328766ab11e67c28cb9a9e6bc..40be5fbee69bcc13c064509113298e0041c06282 100644 --- a/src/chart/map/backwardCompat.js +++ b/src/chart/map/backwardCompat.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export default function (option) { // Save geoCoord diff --git a/src/chart/map/mapDataStatistic.js b/src/chart/map/mapDataStatistic.js index 49d6488c898087380db3a044f97d9cfde3029896..e28e04e5b323518ee5846e5dc654cbedea56e7e4 100644 --- a/src/chart/map/mapDataStatistic.js +++ b/src/chart/map/mapDataStatistic.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; // FIXME 公用? /** diff --git a/src/chart/map/mapSymbolLayout.js b/src/chart/map/mapSymbolLayout.js index 6a12e4a501832e96d427a5c0b9fbea88d45022ea..b34994230a6a1b3f7f12d58e20ecf2457c14caf3 100644 --- a/src/chart/map/mapSymbolLayout.js +++ b/src/chart/map/mapSymbolLayout.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export default function (ecModel) { diff --git a/src/chart/parallel/ParallelSeries.js b/src/chart/parallel/ParallelSeries.js index 0504088748d786ee44ed0c5b7309808607b52d92..3a573cccc26e93ed73a461ef9f5ce9c6ec08f40d 100644 --- a/src/chart/parallel/ParallelSeries.js +++ b/src/chart/parallel/ParallelSeries.js @@ -1,5 +1,5 @@ import List from '../../data/List'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import SeriesModel from '../../model/Series'; import completeDimensions from '../../data/helper/completeDimensions'; diff --git a/src/chart/parallel/ParallelView.js b/src/chart/parallel/ParallelView.js index 4ebefc9f2baa822ce96a242e0a866678cb38d558..d802a8eec34a07d6b33971c69f6f2e027e5e1c18 100644 --- a/src/chart/parallel/ParallelView.js +++ b/src/chart/parallel/ParallelView.js @@ -1,5 +1,5 @@ import * as graphic from '../../util/graphic'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import ChartView from '../../view/Chart'; var SMOOTH = 0.3; diff --git a/src/chart/pictorialBar.js b/src/chart/pictorialBar.js index 3b4ffbdcff357ff1432a82466f79a09969b66491..16636182832dc216730f1ad1842bd978def9783b 100644 --- a/src/chart/pictorialBar.js +++ b/src/chart/pictorialBar.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import '../coord/cartesian/Grid'; import './bar/PictorialBarSeries'; diff --git a/src/chart/pie.js b/src/chart/pie.js index 8883d4c49410eaba1b07e67eaebe5723952221f9..4c4038fc76101c50657c56ab280c15c9ae225652 100644 --- a/src/chart/pie.js +++ b/src/chart/pie.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import './pie/PieSeries'; import './pie/PieView'; diff --git a/src/chart/pie/PieSeries.js b/src/chart/pie/PieSeries.js index 7eb311ccaa9ee09c4cb2bcad9b58eba740fa3ec3..41dd810e48416df87c83797e0a15047d21b31dd3 100644 --- a/src/chart/pie/PieSeries.js +++ b/src/chart/pie/PieSeries.js @@ -1,6 +1,6 @@ import * as echarts from '../../echarts'; import List from '../../data/List'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as modelUtil from '../../util/model'; import {getPercentWithPrecision} from '../../util/number'; import completeDimensions from '../../data/helper/completeDimensions'; diff --git a/src/chart/pie/PieView.js b/src/chart/pie/PieView.js index ce201f7911dffdd9c75800c0c966414e4458caf0..4a44346414f0f96551d2e0af0894160b64663ec4 100644 --- a/src/chart/pie/PieView.js +++ b/src/chart/pie/PieView.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import ChartView from '../../view/Chart'; diff --git a/src/chart/pie/labelLayout.js b/src/chart/pie/labelLayout.js index 269382f035581a2dcc9aba0db6de50730a6051be..17f626d4b6936d40fa57561ac87214a6f8118657 100644 --- a/src/chart/pie/labelLayout.js +++ b/src/chart/pie/labelLayout.js @@ -1,6 +1,6 @@ // FIXME emphasis label position is not same with normal label position -import {contain} from 'zrender'; +import * as textContain from 'zrender/contain/text'; function adjustSingleSide(list, cx, cy, r, dir, viewWidth, viewHeight) { list.sort(function (a, b) { @@ -194,7 +194,7 @@ export default function (seriesModel, r, viewWidth, viewHeight) { ? (dx < 0 ? -midAngle + Math.PI : -midAngle) : 0; var text = seriesModel.getFormattedLabel(idx, 'normal') || data.getName(idx); - var textRect = contain.text.getBoundingRect( + var textRect = textContain.getBoundingRect( text, font, textAlign, 'top' ); hasLabelRotate = !!labelRotate; diff --git a/src/chart/pie/pieLayout.js b/src/chart/pie/pieLayout.js index 87b40fbd8d50eba84b84abe01eca40cd7aedbd91..8122e03337f003b358bb61a1252e2292590e065e 100644 --- a/src/chart/pie/pieLayout.js +++ b/src/chart/pie/pieLayout.js @@ -1,7 +1,7 @@ import {parsePercent, linearMap} from '../../util/number'; import labelLayout from './labelLayout'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var PI2 = Math.PI * 2; var RADIAN = Math.PI / 180; diff --git a/src/chart/radar.js b/src/chart/radar.js index 14b1061b4ddc00ae162da1d99939dcc522d55811..d8b1ac5feeca65b48f2cee48a74f51905cedecf3 100644 --- a/src/chart/radar.js +++ b/src/chart/radar.js @@ -1,6 +1,6 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; // Must use radar component import '../component/radar'; diff --git a/src/chart/radar/RadarSeries.js b/src/chart/radar/RadarSeries.js index 43d15f9e4d84baa2769344db5778bff8ddefba21..ee3f2ba2b88fc4e04be7b3541015a18b06423fd2 100644 --- a/src/chart/radar/RadarSeries.js +++ b/src/chart/radar/RadarSeries.js @@ -1,7 +1,7 @@ import SeriesModel from '../../model/Series'; import List from '../../data/List'; import completeDimensions from '../../data/helper/completeDimensions'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {encodeHTML} from '../../util/format'; var RadarSeries = SeriesModel.extend({ diff --git a/src/chart/radar/RadarView.js b/src/chart/radar/RadarView.js index 209807e302cc5aceeae9dbf1457b29722bc00cf5..c7438ad11da9eda01e12d893332b758eeb02b6ac 100644 --- a/src/chart/radar/RadarView.js +++ b/src/chart/radar/RadarView.js @@ -1,6 +1,6 @@ import * as echarts from '../../echarts'; import * as graphic from '../../util/graphic'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as symbolUtil from '../../util/symbol'; function normalizeSymbolSize(symbolSize) { diff --git a/src/chart/radar/backwardCompat.js b/src/chart/radar/backwardCompat.js index 985f8fbb4c28a75d08ec4e0e25449f890e24c07e..25eb28408498cf0e3800ec64f8abf31c4888a79c 100644 --- a/src/chart/radar/backwardCompat.js +++ b/src/chart/radar/backwardCompat.js @@ -1,5 +1,5 @@ // Backward compat for radar chart in 2 -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export default function (option) { var polarOptArr = option.polar; diff --git a/src/chart/sankey/sankeyLayout.js b/src/chart/sankey/sankeyLayout.js index 9dd2656e916a5738f5809db30a0d2fe83ae57723..a6ad7e9c5ac1b0b0524856c21435cc037bfe7510 100644 --- a/src/chart/sankey/sankeyLayout.js +++ b/src/chart/sankey/sankeyLayout.js @@ -5,7 +5,7 @@ import * as layout from '../../util/layout'; import nest from '../../util/array/nest'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export default function (ecModel, api, payload) { diff --git a/src/chart/sankey/sankeyVisual.js b/src/chart/sankey/sankeyVisual.js index 6534a94c1d4c968558f64868d6a6f4e465e691ac..59163f0b13a51bbdec19b148b13c518d2d528ae5 100644 --- a/src/chart/sankey/sankeyVisual.js +++ b/src/chart/sankey/sankeyVisual.js @@ -4,7 +4,7 @@ */ import VisualMapping from '../../visual/VisualMapping'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export default function (ecModel, payload) { ecModel.eachSeriesByType('sankey', function (seriesModel) { diff --git a/src/chart/scatter.js b/src/chart/scatter.js index 580b6c6dd00d837c4dfb35f6f394ba2ed3aae9ce..4afd3a7ea19da20b69145d2f85c6e0378a32c8e2 100644 --- a/src/chart/scatter.js +++ b/src/chart/scatter.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import './scatter/ScatterSeries'; import './scatter/ScatterView'; diff --git a/src/chart/themeRiver.js b/src/chart/themeRiver.js index ced91f7ab5492d55d23a77aa22256d7079fde809..b447b946723dcbfaf60810711e178a7f80d5db2e 100644 --- a/src/chart/themeRiver.js +++ b/src/chart/themeRiver.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import '../component/singleAxis'; import './themeRiver/ThemeRiverSeries'; diff --git a/src/chart/themeRiver/ThemeRiverSeries.js b/src/chart/themeRiver/ThemeRiverSeries.js index 8b4c146fd7e4b51cc0149dd46f83626854262dec..4b3aa196bc9d4180a603279089b18b4ac4ca1d94 100644 --- a/src/chart/themeRiver/ThemeRiverSeries.js +++ b/src/chart/themeRiver/ThemeRiverSeries.js @@ -6,7 +6,7 @@ import completeDimensions from '../../data/helper/completeDimensions'; import SeriesModel from '../../model/Series'; import List from '../../data/List'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {encodeHTML} from '../../util/format'; import nest from '../../util/array/nest'; diff --git a/src/chart/themeRiver/ThemeRiverView.js b/src/chart/themeRiver/ThemeRiverView.js index bb24888279b2c1a6fdb9c4345f2eb7efa4ca9025..0806b5ed9be7896df0a9045fcbd01c2ce0d542fe 100644 --- a/src/chart/themeRiver/ThemeRiverView.js +++ b/src/chart/themeRiver/ThemeRiverView.js @@ -6,7 +6,7 @@ import * as echarts from '../../echarts'; import {Polygon} from '../line/poly'; import * as graphic from '../../util/graphic'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import DataDiffer from '../../data/DataDiffer'; export default echarts.extendChartView({ diff --git a/src/chart/themeRiver/themeRiverLayout.js b/src/chart/themeRiver/themeRiverLayout.js index 9741e8d2a8f75c3c781e2d2dda0933365bbfeeb1..99e9085a200ffbd841ac69432a1684362a7e22fd 100644 --- a/src/chart/themeRiver/themeRiverLayout.js +++ b/src/chart/themeRiver/themeRiverLayout.js @@ -3,7 +3,7 @@ * @author Deqing Li(annong035@gmail.com) */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as numberUtil from '../../util/number'; export default function (ecModel, api) { diff --git a/src/chart/tree.js b/src/chart/tree.js index 42ee2c89d543e0987d16f32e97d1b8313abc076c..68597d3b17548cf97a83412589fcac1640c37dce 100644 --- a/src/chart/tree.js +++ b/src/chart/tree.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import './tree/TreeSeries'; import './tree/TreeView'; diff --git a/src/chart/tree/TreeView.js b/src/chart/tree/TreeView.js index 352507e1c1f5dc0a9f8a380e1e8351a20fbce0dd..a5e6da9a384d3dfe5f755c06dac669c812d2b7b2 100644 --- a/src/chart/tree/TreeView.js +++ b/src/chart/tree/TreeView.js @@ -2,7 +2,7 @@ * @file This file used to draw tree view */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import SymbolClz from '../helper/Symbol'; import {radialCoordinate} from './layoutHelper'; diff --git a/src/chart/treemap/Breadcrumb.js b/src/chart/treemap/Breadcrumb.js index 984905f4a90069aa92f3f763f622b69328ed1f35..59bee0101096202af347671530752b99dd2b4d5e 100644 --- a/src/chart/treemap/Breadcrumb.js +++ b/src/chart/treemap/Breadcrumb.js @@ -1,6 +1,6 @@ import * as graphic from '../../util/graphic'; import * as layout from '../../util/layout'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {wrapTreePathInfo} from './helper'; var TEXT_PADDING = 8; diff --git a/src/chart/treemap/TreemapSeries.js b/src/chart/treemap/TreemapSeries.js index d75e5aec5c72a7b3a762e71d4db3e899f3fd83a7..7a12a0db223915d5d6b0ba810a5cca190cadaf38 100644 --- a/src/chart/treemap/TreemapSeries.js +++ b/src/chart/treemap/TreemapSeries.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import SeriesModel from '../../model/Series'; import Tree from '../../data/Tree'; import Model from '../../model/Model'; diff --git a/src/chart/treemap/TreemapView.js b/src/chart/treemap/TreemapView.js index 02bb8a8d507b52c8842e6400b82112fd0bc47797..ecab017270ddf88ffd8b5b17705242ff2b23bc92 100644 --- a/src/chart/treemap/TreemapView.js +++ b/src/chart/treemap/TreemapView.js @@ -1,12 +1,12 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import DataDiffer from '../../data/DataDiffer'; import * as helper from './helper'; import Breadcrumb from './Breadcrumb'; import RoamController from '../../component/helper/RoamController'; -import {BoundingRect} from 'zrender'; -import {matrix} from 'zrender'; +import BoundingRect from 'zrender/core/BoundingRect'; +import * as matrix from 'zrender/core/matrix'; import * as animationUtil from '../../util/animation'; import makeStyleMapper from '../../model/mixin/makeStyleMapper'; diff --git a/src/chart/treemap/helper.js b/src/chart/treemap/helper.js index 9a7479361e21c7ee2cd7ba6f3870af1ef90b4684..606a8b106af8507e0b965302c1fb6efdfdf2bd33 100644 --- a/src/chart/treemap/helper.js +++ b/src/chart/treemap/helper.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export function retrieveTargetInfo(payload, seriesModel) { if (payload diff --git a/src/chart/treemap/treemapLayout.js b/src/chart/treemap/treemapLayout.js index 766a926a8ea3b0a149afadccf9412fed6d910534..56bb1965a4dd639399a05919c0903682c820ecb7 100644 --- a/src/chart/treemap/treemapLayout.js +++ b/src/chart/treemap/treemapLayout.js @@ -1,4 +1,5 @@ -import {util as zrUtil, BoundingRect} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import BoundingRect from 'zrender/core/BoundingRect'; import {parsePercent, MAX_SAFE_INTEGER} from '../../util/number'; import * as layout from '../../util/layout'; import * as helper from './helper'; diff --git a/src/chart/treemap/treemapVisual.js b/src/chart/treemap/treemapVisual.js index 22c2cc4ac17c05b248d53374dc4fb0cea14e26d7..74fbdd03100a728a425c1cfeaa1bfc3d138a5e11 100644 --- a/src/chart/treemap/treemapVisual.js +++ b/src/chart/treemap/treemapVisual.js @@ -1,8 +1,6 @@ import VisualMapping from '../../visual/VisualMapping'; -import { - color as zrColor, - util as zrUtil -} from 'zrender'; +import * as zrColor from 'zrender/tool/color'; +import * as zrUtil from 'zrender/core/util'; var isArray = zrUtil.isArray; diff --git a/src/component/axis/AngleAxisView.js b/src/component/axis/AngleAxisView.js index 317dba2fea220b6470c12a9c79b17e5b54dcfbfa..c258d8f9eec43c3c77f9cb66bb2d1a348f6543cc 100644 --- a/src/component/axis/AngleAxisView.js +++ b/src/component/axis/AngleAxisView.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import Model from '../../model/Model'; import AxisView from './AxisView'; diff --git a/src/component/axis/AxisBuilder.js b/src/component/axis/AxisBuilder.js index 7abb08545048e9910f4d2759e192118814db67c1..494bfb626865168f85451f1e326ea3acb70e187e 100644 --- a/src/component/axis/AxisBuilder.js +++ b/src/component/axis/AxisBuilder.js @@ -1,10 +1,10 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as formatUtil from '../../util/format'; import * as graphic from '../../util/graphic'; import Model from '../../model/Model'; import {isRadianAroundZero, remRadian} from '../../util/number'; -import {matrix as matrixUtil} from 'zrender'; -import {vector as vec2} from 'zrender'; +import * as matrixUtil from 'zrender/core/matrix'; +import * as vec2 from 'zrender/core/vector'; var v2ApplyTransform = vec2.applyTransform; var retrieve = zrUtil.retrieve; diff --git a/src/component/axis/CartesianAxisView.js b/src/component/axis/CartesianAxisView.js index 24c569d0aba833941fc692df1e70600dfdcaa7dd..899605852c5fd217ccf493fb5249378389336db6 100644 --- a/src/component/axis/CartesianAxisView.js +++ b/src/component/axis/CartesianAxisView.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import AxisBuilder from './AxisBuilder'; import AxisView from './AxisView'; diff --git a/src/component/axis/ParallelAxisView.js b/src/component/axis/ParallelAxisView.js index fbc264a009b9f696f4688719ae00be739d42494e..9a0d2f33ca89a2cea714316608006a8f619051a8 100644 --- a/src/component/axis/ParallelAxisView.js +++ b/src/component/axis/ParallelAxisView.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import AxisBuilder from './AxisBuilder'; import BrushController from '../helper/BrushController'; import * as brushHelper from '../helper/brushHelper'; diff --git a/src/component/axis/RadiusAxisView.js b/src/component/axis/RadiusAxisView.js index 78b014f63879c9aa35b9f722cb4112b4b20d9a72..db7d760e5130ad6b17c821983711ea843ef52f4c 100644 --- a/src/component/axis/RadiusAxisView.js +++ b/src/component/axis/RadiusAxisView.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import AxisBuilder from './AxisBuilder'; import AxisView from './AxisView'; diff --git a/src/component/axis/SingleAxisView.js b/src/component/axis/SingleAxisView.js index 1b4f21a01fa3b5b0ff82257733f96f4e0829e76b..54a9c53001e9477e54f217f8ca6dc03d15ba39d5 100644 --- a/src/component/axis/SingleAxisView.js +++ b/src/component/axis/SingleAxisView.js @@ -1,5 +1,5 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import AxisBuilder from './AxisBuilder'; import * as graphic from '../../util/graphic'; import * as singleAxisHelper from './singleAxisHelper'; diff --git a/src/component/axis/cartesianAxisHelper.js b/src/component/axis/cartesianAxisHelper.js index e6d12d770fd6463add16be315399ea636f81a5c4..db42bbf8951ef88363cfa28031d4df846bf15a1f 100644 --- a/src/component/axis/cartesianAxisHelper.js +++ b/src/component/axis/cartesianAxisHelper.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; /** * @param {Object} opt {labelInside} diff --git a/src/component/axis/singleAxisHelper.js b/src/component/axis/singleAxisHelper.js index 757aff22f6ec82214c0fcd8561a1a67d28a60109..678e4e91e3adb5d7a95618c4d3dd8b70cc1bfd11 100644 --- a/src/component/axis/singleAxisHelper.js +++ b/src/component/axis/singleAxisHelper.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; /** * @param {Object} opt {labelInside} diff --git a/src/component/axisPointer.js b/src/component/axisPointer.js index 48e44fcac156554750a511edc081f09f3ee58d46..819135691ba0c4f928cf55f0903fefc10a38de80 100644 --- a/src/component/axisPointer.js +++ b/src/component/axisPointer.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as axisPointerModelHelper from './axisPointer/modelHelper'; import axisTrigger from './axisPointer/axisTrigger'; diff --git a/src/component/axisPointer/BaseAxisPointer.js b/src/component/axisPointer/BaseAxisPointer.js index 5d472380214804360dee6404c8b8e35ef316a3b3..94d88461183d9bb4ba9656ca4f1151c6c11994e4 100644 --- a/src/component/axisPointer/BaseAxisPointer.js +++ b/src/component/axisPointer/BaseAxisPointer.js @@ -1,8 +1,8 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as clazzUtil from '../../util/clazz'; import * as graphic from '../../util/graphic'; import * as axisPointerModelHelper from './modelHelper'; -import {event as eventTool} from 'zrender'; +import * as eventTool from 'zrender/core/event'; import * as throttleUtil from '../../util/throttle'; import * as modelUtil from '../../util/model'; diff --git a/src/component/axisPointer/PolarAxisPointer.js b/src/component/axisPointer/PolarAxisPointer.js index 7628373ceb02dd053aefce4067b7bddc5a0e7834..5e0e7ac44855d9b10734aac30a6d23b3b217fd32 100644 --- a/src/component/axisPointer/PolarAxisPointer.js +++ b/src/component/axisPointer/PolarAxisPointer.js @@ -2,7 +2,7 @@ import * as formatUtil from '../../util/format'; import BaseAxisPointer from './BaseAxisPointer'; import * as graphic from '../../util/graphic'; import * as viewHelper from './viewHelper'; -import {matrix} from 'zrender'; +import * as matrix from 'zrender/core/matrix'; import AxisBuilder from '../axis/AxisBuilder'; import AxisView from '../axis/AxisView'; diff --git a/src/component/axisPointer/axisTrigger.js b/src/component/axisPointer/axisTrigger.js index 2e5aed13376ca1703f44fd8e36f3c887aa85dad0..2b2a79d7535e409501a3916268fefd658c1a469a 100644 --- a/src/component/axisPointer/axisTrigger.js +++ b/src/component/axisPointer/axisTrigger.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as modelUtil from '../../util/model'; import * as modelHelper from './modelHelper'; import findPointFromSeries from './findPointFromSeries'; diff --git a/src/component/axisPointer/findPointFromSeries.js b/src/component/axisPointer/findPointFromSeries.js index 945e035cfe40ed0b5dfe3f48856e0639b84b8b66..12f0106a7d9dcc05a677ede34bdc1d8cad3830b2 100644 --- a/src/component/axisPointer/findPointFromSeries.js +++ b/src/component/axisPointer/findPointFromSeries.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as modelUtil from '../../util/model'; /** diff --git a/src/component/axisPointer/globalListener.js b/src/component/axisPointer/globalListener.js index 1b328ba7ab76d35a5dec9f34ad5cf780bee54868..ba16c8ccc05ad46d212f25e3db745e8a600a7bce 100644 --- a/src/component/axisPointer/globalListener.js +++ b/src/component/axisPointer/globalListener.js @@ -1,5 +1,5 @@ -import {util as zrUtil} from 'zrender'; -import {env} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import env from 'zrender/core/env'; import * as modelUtil from '../../util/model'; var get = modelUtil.makeGetter(); diff --git a/src/component/axisPointer/modelHelper.js b/src/component/axisPointer/modelHelper.js index 7f7cb9dd2581084a8122c52fc39d9971c50ab4a9..8e9eb08e73c3036a622500b03af469d3d122013a 100644 --- a/src/component/axisPointer/modelHelper.js +++ b/src/component/axisPointer/modelHelper.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Model from '../../model/Model'; var each = zrUtil.each; diff --git a/src/component/axisPointer/viewHelper.js b/src/component/axisPointer/viewHelper.js index 9e31c6e479f9177826e2a323b968a1b7e75bfbf8..d7bf97422c0ce539e85a0267420ae219db3dd9f4 100644 --- a/src/component/axisPointer/viewHelper.js +++ b/src/component/axisPointer/viewHelper.js @@ -1,8 +1,8 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; -import {contain} from 'zrender'; +import * as textContain from 'zrender/contain/text'; import * as formatUtil from '../../util/format'; -import {matrix} from 'zrender'; +import * as matrix from 'zrender/core/matrix'; import * as axisHelper from '../../coord/axisHelper'; import AxisBuilder from '../axis/AxisBuilder'; @@ -43,7 +43,7 @@ export function buildLabelElOption( var paddings = formatUtil.normalizeCssArray(labelModel.get('padding') || 0); var font = labelModel.getFont(); - var textRect = contain.text.getBoundingRect(text, font); + var textRect = textContain.getBoundingRect(text, font); var position = labelPos.position; var width = textRect.width + paddings[1] + paddings[3]; diff --git a/src/component/brush/BrushModel.js b/src/component/brush/BrushModel.js index 76bd33380667e7e3ed2534879339f5f285a41657..72fb65337117307da145f929e5a657470a82bad6 100644 --- a/src/component/brush/BrushModel.js +++ b/src/component/brush/BrushModel.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as visualSolution from '../../visual/visualSolution'; import Model from '../../model/Model'; diff --git a/src/component/brush/BrushView.js b/src/component/brush/BrushView.js index b559bf0d4a16a99a3a7937a5fe46862236a886b1..2e8eba68201633323aeb61ba170903896e007385 100644 --- a/src/component/brush/BrushView.js +++ b/src/component/brush/BrushView.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import BrushController from '../helper/BrushController'; export default echarts.extendComponentView({ diff --git a/src/component/brush/preprocessor.js b/src/component/brush/preprocessor.js index b8ba72f3f0baff5f5960ffcc55d1756d49c00202..a747746f1f66408a9509ae2a9f6405e2e4b90867 100644 --- a/src/component/brush/preprocessor.js +++ b/src/component/brush/preprocessor.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var DEFAULT_TOOLBOX_BTNS = ['rect', 'polygon', 'keep', 'clear']; diff --git a/src/component/brush/selector.js b/src/component/brush/selector.js index 6bd6a3361a580d7885e2a2bb49eca6c0a432ed61..c378fcdacfcfdaf77d4046e98507c2fe33f6260e 100644 --- a/src/component/brush/selector.js +++ b/src/component/brush/selector.js @@ -1,6 +1,5 @@ -import {contain, BoundingRect} from 'zrender'; - -var polygonContain = contain.polygon; +import polygonContain from 'zrender/contain/polygon'; +import BoundingRect from 'zrender/core/BoundingRect'; // Key of the first level is brushType: `line`, `rect`, `polygon`. // Key of the second level is chart element type: `point`, `rect`. diff --git a/src/component/brush/visualEncoding.js b/src/component/brush/visualEncoding.js index 0b43c4f48cb5484dd02f45f37446b67d9be81982..0a7969216b196c050002a43d00436c02edc9504e 100644 --- a/src/component/brush/visualEncoding.js +++ b/src/component/brush/visualEncoding.js @@ -1,5 +1,6 @@ import * as echarts from '../../echarts'; -import {util as zrUtil, BoundingRect} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import BoundingRect from 'zrender/core/BoundingRect'; import * as visualSolution from '../../visual/visualSolution'; import selector from './selector'; import * as throttleUtil from '../../util/throttle'; diff --git a/src/component/calendar/CalendarView.js b/src/component/calendar/CalendarView.js index b74456d15d8ad3a3262940e72451989354cdb08b..47740aa16574aac71c1058d92408819e9675d915 100644 --- a/src/component/calendar/CalendarView.js +++ b/src/component/calendar/CalendarView.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import * as formatUtil from '../../util/format'; import * as numberUtil from '../../util/number'; diff --git a/src/component/dataZoom/AxisProxy.js b/src/component/dataZoom/AxisProxy.js index e12402c077794cfaa57e528f0b4ac6ec0b754d55..8f8445e273e9d6faf642a877f69c29ee0efedbff 100644 --- a/src/component/dataZoom/AxisProxy.js +++ b/src/component/dataZoom/AxisProxy.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as numberUtil from '../../util/number'; import * as helper from './helper'; diff --git a/src/component/dataZoom/DataZoomModel.js b/src/component/dataZoom/DataZoomModel.js index 517ac807d3b5c25c9fd3ce7a5d96791ebdd57125..4c7dd7cc1790828688365d2ccd55bfe5134d05c8 100644 --- a/src/component/dataZoom/DataZoomModel.js +++ b/src/component/dataZoom/DataZoomModel.js @@ -1,5 +1,6 @@ import * as echarts from '../../echarts'; -import {util as zrUtil, env} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import env from 'zrender/core/env'; import * as modelUtil from '../../util/model'; import * as helper from './helper'; import AxisProxy from './AxisProxy'; diff --git a/src/component/dataZoom/InsideZoomView.js b/src/component/dataZoom/InsideZoomView.js index 4027b92b950b4abf3c1989ce2ee78be6ab47d434..472ca6efa444e42a90a7f4d5a4798ed898cac38e 100644 --- a/src/component/dataZoom/InsideZoomView.js +++ b/src/component/dataZoom/InsideZoomView.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import DataZoomView from './DataZoomView'; import sliderMove from '../helper/sliderMove'; import * as roams from './roams'; diff --git a/src/component/dataZoom/SliderZoomView.js b/src/component/dataZoom/SliderZoomView.js index 7d41dae105c61bb7924da36356d2bd552e0266f1..e9381da0c4009d2ae49335207a4e7e77c741dba6 100644 --- a/src/component/dataZoom/SliderZoomView.js +++ b/src/component/dataZoom/SliderZoomView.js @@ -1,4 +1,5 @@ -import {util as zrUtil, event as eventTool} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import * as eventTool from 'zrender/core/event'; import * as graphic from '../../util/graphic'; import * as throttle from '../../util/throttle'; import DataZoomView from './DataZoomView'; diff --git a/src/component/dataZoom/dataZoomAction.js b/src/component/dataZoom/dataZoomAction.js index 5ff8d00b191513d3f65bf3b320b39b8fd8a5a13d..b14b197428f49d039929b3d2c764f19e1793e18e 100644 --- a/src/component/dataZoom/dataZoomAction.js +++ b/src/component/dataZoom/dataZoomAction.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as helper from './helper'; diff --git a/src/component/dataZoom/helper.js b/src/component/dataZoom/helper.js index 2cafed95d525318145844276c018bb2f3cdbc098..bd97d3a1e15bc971e83acc38b9192843265ce568 100644 --- a/src/component/dataZoom/helper.js +++ b/src/component/dataZoom/helper.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as formatUtil from '../../util/format'; diff --git a/src/component/dataZoom/history.js b/src/component/dataZoom/history.js index b7f75357fa50441f065a133bc08e1d9e94b425b6..887d79c60cc4e320409f452e5db6aae260478d14 100644 --- a/src/component/dataZoom/history.js +++ b/src/component/dataZoom/history.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var each = zrUtil.each; diff --git a/src/component/dataZoom/roams.js b/src/component/dataZoom/roams.js index 311537a5603972bbd5313c4646708d62e1d1353d..f3efcf81c406a9d313e1a31e1eb5c43a4741e9c9 100644 --- a/src/component/dataZoom/roams.js +++ b/src/component/dataZoom/roams.js @@ -4,7 +4,7 @@ // pan or zoom, only dispatch one action for those data zoom // components. -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import RoamController from '../../component/helper/RoamController'; import * as throttleUtil from '../../util/throttle'; diff --git a/src/component/geo.js b/src/component/geo.js index b6bae6f88bbb38894286aa862e8d63631c91e72f..2f44ee834eb912ea652b86bef08511b41440cb9f 100644 --- a/src/component/geo.js +++ b/src/component/geo.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import '../coord/geo/GeoModel'; import '../coord/geo/geoCreator'; diff --git a/src/component/graphic.js b/src/component/graphic.js index 97fb1e262c312fbbdab5fe9584f629f7a6edb73c..07dd7aa0937ab662afc4329933acadcbd0cff41a 100644 --- a/src/component/graphic.js +++ b/src/component/graphic.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as modelUtil from '../util/model'; import * as graphicUtil from '../util/graphic'; diff --git a/src/component/gridSimple.js b/src/component/gridSimple.js index 03f1f2f34e217d8ea925e559ee9fc833064cd528..56558d245de644931ae2854bced03af3eb7a7862 100644 --- a/src/component/gridSimple.js +++ b/src/component/gridSimple.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../util/graphic'; import '../coord/cartesian/Grid'; diff --git a/src/component/helper/BrushController.js b/src/component/helper/BrushController.js index fd1ed5c34beb63b5833e1f1160f90b522164bde1..7359535d224d78f255b4a72c7d91e32b6d442232 100644 --- a/src/component/helper/BrushController.js +++ b/src/component/helper/BrushController.js @@ -1,4 +1,5 @@ -import {util as zrUtil, Eventful} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import Eventful from 'zrender/mixin/Eventful'; import * as graphic from '../../util/graphic'; import * as interactionMutex from './interactionMutex'; import DataDiffer from '../../data/DataDiffer'; diff --git a/src/component/helper/BrushTargetManager.js b/src/component/helper/BrushTargetManager.js index 1a2c4b34979296b3375c0644fd7e3655d0955766..2146a380c4fe186ffaf66d3e51d645d7b6656f31 100644 --- a/src/component/helper/BrushTargetManager.js +++ b/src/component/helper/BrushTargetManager.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import * as modelUtil from '../../util/model'; import * as brushHelper from './brushHelper'; diff --git a/src/component/helper/MapDraw.js b/src/component/helper/MapDraw.js index 31841d02d1aee90f79010ffe3ee93a85cf508a7e..e468ef75321a29cf09c756cf7d9710207c735d91 100644 --- a/src/component/helper/MapDraw.js +++ b/src/component/helper/MapDraw.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import RoamController from './RoamController'; import * as roamHelper from '../../component/helper/roamHelper'; import {onIrrelevantElement} from '../../component/helper/cursorHelper'; diff --git a/src/component/helper/RoamController.js b/src/component/helper/RoamController.js index 088b41d3a088ea86bfe9c9343271856d6fa05d10..58cafa049803a0ea80ce484f787bbc70877ac9d4 100644 --- a/src/component/helper/RoamController.js +++ b/src/component/helper/RoamController.js @@ -1,4 +1,6 @@ -import {util as zrUtil, Eventful, event as eventTool} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import Eventful from 'zrender/mixin/Eventful'; +import * as eventTool from 'zrender/core/event'; import * as interactionMutex from './interactionMutex'; /** diff --git a/src/component/helper/brushHelper.js b/src/component/helper/brushHelper.js index 2773f3e08f40087701400447061bc192efa5db6a..9760f88092a74650a80e1a7d125b037cf85ac34b 100644 --- a/src/component/helper/brushHelper.js +++ b/src/component/helper/brushHelper.js @@ -1,4 +1,4 @@ -import {BoundingRect} from 'zrender'; +import BoundingRect from 'zrender/core/BoundingRect'; import {onIrrelevantElement} from './cursorHelper'; import * as graphicUtil from '../../util/graphic'; diff --git a/src/component/helper/selectableMixin.js b/src/component/helper/selectableMixin.js index 8e592b9b358fb59f46ff9c636611405826fde081..c2556bf4fbbf0e55d3d8e691ce92ce887b8daae7 100644 --- a/src/component/helper/selectableMixin.js +++ b/src/component/helper/selectableMixin.js @@ -4,7 +4,7 @@ * And each data item will use `selected` to toggle itself selected status */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export default { diff --git a/src/component/legend/LegendModel.js b/src/component/legend/LegendModel.js index 40c45dc3ec3ba9eb7ae0d0a92486c8967166c7ba..ad8d67a75386f2cce5b1054e73fb91f0b2978f11 100644 --- a/src/component/legend/LegendModel.js +++ b/src/component/legend/LegendModel.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Model from '../../model/Model'; var LegendModel = echarts.extendComponentModel({ diff --git a/src/component/legend/LegendView.js b/src/component/legend/LegendView.js index 0519be49d24e9e396a3d350d80a8dc2de25bd185..1e5a5bcac146b237001fc1864417967223396eb9 100644 --- a/src/component/legend/LegendView.js +++ b/src/component/legend/LegendView.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {createSymbol} from '../../util/symbol'; import * as graphic from '../../util/graphic'; import {makeBackground} from '../helper/listComponent'; diff --git a/src/component/legend/ScrollableLegendView.js b/src/component/legend/ScrollableLegendView.js index 325d67053b91b8bef818a65c4e4144803d978109..348c4fe4f84a530ff00de7d6ba188923d3805ac3 100644 --- a/src/component/legend/ScrollableLegendView.js +++ b/src/component/legend/ScrollableLegendView.js @@ -2,7 +2,7 @@ * Separate legend and scrollable legend to reduce package size. */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import * as layoutUtil from '../../util/layout'; import LegendView from './LegendView'; diff --git a/src/component/legend/legendAction.js b/src/component/legend/legendAction.js index 983cf882299ba40c8bfa187f1e35c72df843d6fe..d2edd47a0005cd94c556fd04f636914c7c4b8d14 100644 --- a/src/component/legend/legendAction.js +++ b/src/component/legend/legendAction.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; function legendSelectActionHandler(methodName, payload, ecModel) { var selectedMap = {}; diff --git a/src/component/marker/MarkAreaView.js b/src/component/marker/MarkAreaView.js index a2ebd36e209d3009c5375eb1cd368a38de92c7a9..2608022b8d6dba113db836cdd27a729a93eeb9ea 100644 --- a/src/component/marker/MarkAreaView.js +++ b/src/component/marker/MarkAreaView.js @@ -1,6 +1,7 @@ // TODO Better on polar -import {util as zrUtil, color as colorUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import * as colorUtil from 'zrender/tool/color'; import List from '../../data/List'; import * as numberUtil from '../../util/number'; import * as graphic from '../../util/graphic'; diff --git a/src/component/marker/MarkLineView.js b/src/component/marker/MarkLineView.js index 6ca0943220694a1a9c05da655f574ec10c34d9d0..221794653fd420fc3882b0cc5235bf72484c571b 100644 --- a/src/component/marker/MarkLineView.js +++ b/src/component/marker/MarkLineView.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import List from '../../data/List'; import * as numberUtil from '../../util/number'; import * as markerHelper from './markerHelper'; diff --git a/src/component/marker/MarkPointView.js b/src/component/marker/MarkPointView.js index 294c9e80f5311ba802efa9468bc4780b64fbff26..c597693f46f209038fcd9fdbbc6bd10357fe1cde 100644 --- a/src/component/marker/MarkPointView.js +++ b/src/component/marker/MarkPointView.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import SymbolDraw from '../../chart/helper/SymbolDraw'; import * as numberUtil from '../../util/number'; import List from '../../data/List'; diff --git a/src/component/marker/MarkerModel.js b/src/component/marker/MarkerModel.js index a25a6b3c63a4f91a8be7403c3e12078cb62f269f..b890d4c2fda65e8d4c002eda0972b7c1db35203d 100644 --- a/src/component/marker/MarkerModel.js +++ b/src/component/marker/MarkerModel.js @@ -1,5 +1,6 @@ import * as echarts from '../../echarts'; -import {util as zrUtil, env} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import env from 'zrender/core/env'; import * as modelUtil from '../../util/model'; import * as formatUtil from '../../util/format'; diff --git a/src/component/marker/MarkerView.js b/src/component/marker/MarkerView.js index be9df761e1b51c8efc8c22bc11053c3e7cab16b7..4c3e193dc8f733b1ae208895af42b1a2d44876df 100644 --- a/src/component/marker/MarkerView.js +++ b/src/component/marker/MarkerView.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export default echarts.extendComponentView({ diff --git a/src/component/marker/markerHelper.js b/src/component/marker/markerHelper.js index 44345431a055f3a05503655f149020b622be8856..16af605a4032ea4c9c1327bcd6e1532e430ca073 100644 --- a/src/component/marker/markerHelper.js +++ b/src/component/marker/markerHelper.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as numberUtil from '../../util/number'; var indexOf = zrUtil.indexOf; diff --git a/src/component/parallel.js b/src/component/parallel.js index 2b2ec3647f2162ec0fb668cdb9e56a288f1e4a10..57b149fd3aaaafd0bd7657b8786a70c784f452c0 100644 --- a/src/component/parallel.js +++ b/src/component/parallel.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as throttleUtil from '../util/throttle'; import parallelPreprocessor from '../coord/parallel/parallelPreprocessor'; diff --git a/src/component/polar.js b/src/component/polar.js index 79839a1acc5bd3cb7cde018e669209d518fbc155..e0492536f4ef9f3a975e079b56663a14f36f32fa 100644 --- a/src/component/polar.js +++ b/src/component/polar.js @@ -1,5 +1,5 @@ import * as echarts from '../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import barPolar from '../layout/barPolar'; import '../coord/polar/polarCreator'; diff --git a/src/component/radar/RadarView.js b/src/component/radar/RadarView.js index a4f5cfd11fbe545c0f660c73f04eac25bd144c08..3c5cab6c1056264cb4da5392ed1a00a6b972e6b3 100644 --- a/src/component/radar/RadarView.js +++ b/src/component/radar/RadarView.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import AxisBuilder from '../axis/AxisBuilder'; import * as graphic from '../../util/graphic'; diff --git a/src/component/timeline/SliderTimelineModel.js b/src/component/timeline/SliderTimelineModel.js index 07e50c4398269322f040e442c02f890a0afa2305..d58d1fb1b64b576792af3656835f9b1267d66a3c 100644 --- a/src/component/timeline/SliderTimelineModel.js +++ b/src/component/timeline/SliderTimelineModel.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import TimelineModel from './TimelineModel'; import * as modelUtil from '../../util/model'; diff --git a/src/component/timeline/SliderTimelineView.js b/src/component/timeline/SliderTimelineView.js index e170c891d5af69bd8f42c5a89f82e07a1f3e91dc..4c8166d4f8b98285aded1602b1a1a98695b377fa 100644 --- a/src/component/timeline/SliderTimelineView.js +++ b/src/component/timeline/SliderTimelineView.js @@ -1,4 +1,6 @@ -import {util as zrUtil, BoundingRect, matrix} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import BoundingRect from 'zrender/core/BoundingRect'; +import * as matrix from 'zrender/core/matrix'; import * as graphic from '../../util/graphic'; import * as layout from '../../util/layout'; import TimelineView from './TimelineView'; diff --git a/src/component/timeline/TimelineAxis.js b/src/component/timeline/TimelineAxis.js index 8096374b5365f40d496217b351a95c2057a461d5..8144cef6ec0c14901763b634bc47bbaf399c57d9 100644 --- a/src/component/timeline/TimelineAxis.js +++ b/src/component/timeline/TimelineAxis.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Axis from '../../coord/Axis'; import * as axisHelper from '../../coord/axisHelper'; diff --git a/src/component/timeline/TimelineModel.js b/src/component/timeline/TimelineModel.js index 7560bc7e0b0318e40cf57945fd31cb9ffd74176f..5485ff8ee9f138ca212ff67a72a27411fc267479 100644 --- a/src/component/timeline/TimelineModel.js +++ b/src/component/timeline/TimelineModel.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import ComponentModel from '../../model/Component'; import List from '../../data/List'; import * as modelUtil from '../../util/model'; diff --git a/src/component/timeline/preprocessor.js b/src/component/timeline/preprocessor.js index 01d52a5b1c3b208592fe77df6263d37aa41feed6..6c5930e86d0a649dc546d694b3d9010f89f69760 100644 --- a/src/component/timeline/preprocessor.js +++ b/src/component/timeline/preprocessor.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export default function (option) { var timelineOpt = option && option.timeline; diff --git a/src/component/timeline/timelineAction.js b/src/component/timeline/timelineAction.js index 650754fd2eebc934b1ba3792fa570abb9779dc31..b84f2aec56a3f5095203ee6bd3d5b6fdac3f6b1c 100644 --- a/src/component/timeline/timelineAction.js +++ b/src/component/timeline/timelineAction.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; echarts.registerAction( diff --git a/src/component/toolbox/ToolboxModel.js b/src/component/toolbox/ToolboxModel.js index dc2097df95ddcdf9a9c6675482aeaf4b17429084..d8aa39fa947cb9f48edf16f87ce874a8b90e88bd 100644 --- a/src/component/toolbox/ToolboxModel.js +++ b/src/component/toolbox/ToolboxModel.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as featureManager from './featureManager'; var ToolboxModel = echarts.extendComponentModel({ diff --git a/src/component/toolbox/ToolboxView.js b/src/component/toolbox/ToolboxView.js index 2ffd6e6b6d7fa3386513bd8b0fd9e0432ad03a6c..e5c3fa00bb48b9a3af5e4dade5b95e88aef5a788 100644 --- a/src/component/toolbox/ToolboxView.js +++ b/src/component/toolbox/ToolboxView.js @@ -1,5 +1,6 @@ import * as echarts from '../../echarts'; -import {util as zrUtil, contain} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import textContain from 'zrender/contain/text'; import * as featureManager from './featureManager'; import * as graphic from '../../util/graphic'; import Model from '../../model/Model'; @@ -178,8 +179,8 @@ export default echarts.extendComponentView({ var hoverStyle = icon.hoverStyle; // May be background element if (hoverStyle && titleText) { - var rect = contain.text.getBoundingRect( - titleText, contain.text.makeFont(hoverStyle) + var rect = textContain.getBoundingRect( + titleText, textContain.makeFont(hoverStyle) ); var offsetX = icon.position[0] + group.position[0]; var offsetY = icon.position[1] + group.position[1] + itemSize; diff --git a/src/component/toolbox/feature/Brush.js b/src/component/toolbox/feature/Brush.js index 147e8b3731960c483768da7b04c5dcd22aa5564d..49a8963a0f1fddd01728cf3a856f0e2c95a2ab1a 100644 --- a/src/component/toolbox/feature/Brush.js +++ b/src/component/toolbox/feature/Brush.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as featureManager from '../featureManager'; import lang from '../../../lang'; diff --git a/src/component/toolbox/feature/DataView.js b/src/component/toolbox/feature/DataView.js index 4d5f0298b8006abb082a0a04c4c2de0510cf5dfe..1fa8afc72660720bbdc92595bcb0d81537178ced 100644 --- a/src/component/toolbox/feature/DataView.js +++ b/src/component/toolbox/feature/DataView.js @@ -1,5 +1,6 @@ import * as echarts from '../../../echarts'; -import {util as zrUtil, event as eventTool} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import * as eventTool from 'zrender/core/event'; import lang from '../../../lang'; import * as featureManager from '../featureManager'; diff --git a/src/component/toolbox/feature/DataZoom.js b/src/component/toolbox/feature/DataZoom.js index 324e5de12ab4ee014b5798552891af91ca7f0d7b..a6ce40d908c7bfd630ed439a43c1e0cbab1545fc 100644 --- a/src/component/toolbox/feature/DataZoom.js +++ b/src/component/toolbox/feature/DataZoom.js @@ -1,5 +1,5 @@ import * as echarts from '../../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import BrushController from '../../helper/BrushController'; import BrushTargetManager from '../../helper/BrushTargetManager'; import * as history from '../../dataZoom/history'; diff --git a/src/component/toolbox/feature/MagicType.js b/src/component/toolbox/feature/MagicType.js index 6122dfcdfcf5d23b4fea51197cd7f3364c28a9ff..1c7b47a58cda6bc875f64ad8fb97b8d50273353e 100644 --- a/src/component/toolbox/feature/MagicType.js +++ b/src/component/toolbox/feature/MagicType.js @@ -1,5 +1,5 @@ import * as echarts from '../../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import lang from '../../../lang'; import * as featureManager from '../featureManager'; diff --git a/src/component/toolbox/feature/SaveAsImage.js b/src/component/toolbox/feature/SaveAsImage.js index da9b7b7599581ce9eaf17b5993906b589cf4f43c..3f292d7e56050d85703ea3bf8257fd851b7d8e96 100644 --- a/src/component/toolbox/feature/SaveAsImage.js +++ b/src/component/toolbox/feature/SaveAsImage.js @@ -1,4 +1,4 @@ -import {env} from 'zrender'; +import env from 'zrender/core/env'; import lang from '../../../lang'; import * as featureManager from '../featureManager'; diff --git a/src/component/tooltip/TooltipContent.js b/src/component/tooltip/TooltipContent.js index eb78d4cdabc6b494adbca01c2867af614f9c09a7..a27bbf705bd0b82617525e366d3f9b58e4f28117 100644 --- a/src/component/tooltip/TooltipContent.js +++ b/src/component/tooltip/TooltipContent.js @@ -1,9 +1,7 @@ -import { - util as zrUtil, - color as zrColor, - event as eventUtil, - env -} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import * as zrColor from 'zrender/tool/color'; +import * as eventUtil from 'zrender/core/event'; +import env from 'zrender/core/env'; import * as formatUtil from '../../util/format'; var each = zrUtil.each; diff --git a/src/component/tooltip/TooltipView.js b/src/component/tooltip/TooltipView.js index 5ac3c99bed91e886d466d2d4b5d2bb3573e4f7fb..1161a53af745dc54e346b5257e0e6ecf4989e989 100644 --- a/src/component/tooltip/TooltipView.js +++ b/src/component/tooltip/TooltipView.js @@ -1,5 +1,6 @@ import * as echarts from '../../echarts'; -import {util as zrUtil, env} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import env from 'zrender/core/env'; import TooltipContent from './TooltipContent'; import * as formatUtil from '../../util/format'; import * as numberUtil from '../../util/number'; diff --git a/src/component/visualMap/ContinuousModel.js b/src/component/visualMap/ContinuousModel.js index dbb605c28a07a93dac71d44bc514ddce1d0e5145..3b418480b3766b0f3776cb48eac2a973cbaaae25 100644 --- a/src/component/visualMap/ContinuousModel.js +++ b/src/component/visualMap/ContinuousModel.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import VisualMapModel from './VisualMapModel'; import * as numberUtil from '../../util/number'; diff --git a/src/component/visualMap/ContinuousView.js b/src/component/visualMap/ContinuousView.js index ae92565d3937d5ddd6561a92249e5da454bfed38..587d7857a0c6c506b3b9635a7ae78781e8dc5957 100644 --- a/src/component/visualMap/ContinuousView.js +++ b/src/component/visualMap/ContinuousView.js @@ -1,8 +1,6 @@ -import { - util as zrUtil, - LinearGradient, - event as eventTool -} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import LinearGradient from 'zrender/graphic/LinearGradient'; +import * as eventTool from 'zrender/core/event'; import VisualMapView from './VisualMapView'; import * as graphic from '../../util/graphic'; import * as numberUtil from '../../util/number'; diff --git a/src/component/visualMap/PiecewiseModel.js b/src/component/visualMap/PiecewiseModel.js index 74d4921043f931fd394b0587ef141dd710153c20..70fa10267031a3a16495f1e7d68f8a41c5e7046f 100644 --- a/src/component/visualMap/PiecewiseModel.js +++ b/src/component/visualMap/PiecewiseModel.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import VisualMapModel from './VisualMapModel'; import VisualMapping from '../../visual/VisualMapping'; import visualDefault from '../../visual/visualDefault'; diff --git a/src/component/visualMap/PiecewiseView.js b/src/component/visualMap/PiecewiseView.js index e4c12d0e4ac8f6f491487fc9a1619b5cba9d5654..888bc61e17c14facbc8a240e6650a3dd65d8ec60 100644 --- a/src/component/visualMap/PiecewiseView.js +++ b/src/component/visualMap/PiecewiseView.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import VisualMapView from './VisualMapView'; import * as graphic from '../../util/graphic'; import {createSymbol} from '../../util/symbol'; diff --git a/src/component/visualMap/VisualMapModel.js b/src/component/visualMap/VisualMapModel.js index be539fb8d267d8d181740f9c752a0931274d46c6..4e3ac5566835bee5dde227e91a5fef6e8ffe3ee2 100644 --- a/src/component/visualMap/VisualMapModel.js +++ b/src/component/visualMap/VisualMapModel.js @@ -1,5 +1,6 @@ import * as echarts from '../../echarts'; -import {util as zrUtil, env} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import env from 'zrender/core/env'; import visualDefault from '../../visual/visualDefault'; import VisualMapping from '../../visual/VisualMapping'; import * as visualSolution from '../../visual/visualSolution'; diff --git a/src/component/visualMap/VisualMapView.js b/src/component/visualMap/VisualMapView.js index bbef3d8097a6e88888ca18c1dffb964cc173f651..b14c75287872c95cc79d6334f36870a3d0b3da1b 100644 --- a/src/component/visualMap/VisualMapView.js +++ b/src/component/visualMap/VisualMapView.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../../util/graphic'; import * as formatUtil from '../../util/format'; import * as layout from '../../util/layout'; diff --git a/src/component/visualMap/helper.js b/src/component/visualMap/helper.js index ee1b6a02de9497b940da568db6a89b101f546363..722b2d2b0efc6d3b58eeb6a754b6e6451827daf2 100644 --- a/src/component/visualMap/helper.js +++ b/src/component/visualMap/helper.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {getLayoutRect} from '../../util/layout'; /** diff --git a/src/component/visualMap/preprocessor.js b/src/component/visualMap/preprocessor.js index fe3dd89d1cbb370d9b63dc506b700b685cb0098a..82a03c4942dd91a90ae05c51a0fabfecaeb46b76 100644 --- a/src/component/visualMap/preprocessor.js +++ b/src/component/visualMap/preprocessor.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var each = zrUtil.each; diff --git a/src/component/visualMap/visualEncoding.js b/src/component/visualMap/visualEncoding.js index 8025fce527ad80664f71571b23fa751db139f65b..5c002d83346007659682e21cee766d8e6aa88b33 100644 --- a/src/component/visualMap/visualEncoding.js +++ b/src/component/visualMap/visualEncoding.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as visualSolution from '../../visual/visualSolution'; import VisualMapping from '../../visual/VisualMapping'; diff --git a/src/coord/Axis.js b/src/coord/Axis.js index 01898628e3171b74b248e9d3f78297f55ff3f149..b10690f836e058e23b8fdd14d41e248198ff1ae3 100644 --- a/src/coord/Axis.js +++ b/src/coord/Axis.js @@ -1,5 +1,5 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as numberUtil from '../util/number'; import * as axisHelper from './axisHelper'; diff --git a/src/coord/View.js b/src/coord/View.js index 7aa587a709291222be907d00fe0f05ac4d2f53eb..6c2aba3bf642c3796b04694e20f082343113b229 100644 --- a/src/coord/View.js +++ b/src/coord/View.js @@ -3,13 +3,11 @@ * Mapping given x, y to transformd view x, y */ -import { - util as zrUtil, - vector, - matrix, - BoundingRect, - Transformable -} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import * as vector from 'zrender/core/vector'; +import * as matrix from 'zrender/core/matrix'; +import BoundingRect from 'zrender/core/BoundingRect'; +import Transformable from 'zrender/mixin/Transformable'; var v2ApplyTransform = vector.applyTransform; diff --git a/src/coord/axisDefault.js b/src/coord/axisDefault.js index bddf9b9316cc1e6a341b27191274eb621d29d146..df0b03794c21f0e8ad61e2c3d1e5dd445bf9d9b6 100644 --- a/src/coord/axisDefault.js +++ b/src/coord/axisDefault.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var defaultOption = { show: true, diff --git a/src/coord/axisHelper.js b/src/coord/axisHelper.js index dfefebc076956a5509e6763572fdd7c579a75b38..5033d148684cc65a6029f4198b5b4ffe5d84c959 100644 --- a/src/coord/axisHelper.js +++ b/src/coord/axisHelper.js @@ -1,4 +1,5 @@ -import {util as zrUtil, contain} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import textContain from 'zrender/contain/text'; import OrdinalScale from '../scale/Ordinal'; import IntervalScale from '../scale/Interval'; import Scale from '../scale/Scale'; @@ -201,7 +202,7 @@ export function getAxisLabelInterval(tickCoords, labels, font, isAxisHorizontal) for (var i = 0; i < tickCoords.length; i += step) { var tickCoord = tickCoords[i]; - var rect = contain.text.getBoundingRect( + var rect = textContain.getBoundingRect( labels[i], font, 'center', 'top' ); rect[isAxisHorizontal ? 'x' : 'y'] += tickCoord; diff --git a/src/coord/axisModelCommonMixin.js b/src/coord/axisModelCommonMixin.js index 46578b82ab9fa4a4b8189ae4ce8464bb9fde1808..debaeb5871b317226747cf9269cabefd9a3075ca 100644 --- a/src/coord/axisModelCommonMixin.js +++ b/src/coord/axisModelCommonMixin.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as axisHelper from './axisHelper'; function getName(obj) { diff --git a/src/coord/axisModelCreator.js b/src/coord/axisModelCreator.js index f8e91d1fab1ced24ade14795388d305722d5cfa1..1f70bacc2b0d3a113f6615c8e04957e627e1a0f1 100644 --- a/src/coord/axisModelCreator.js +++ b/src/coord/axisModelCreator.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import axisDefault from './axisDefault'; import ComponentModel from '../model/Component'; import { diff --git a/src/coord/calendar/Calendar.js b/src/coord/calendar/Calendar.js index cfafedefa31f7b60402ee0cf24576228cd4aff43..f7d4d2a81813a5e7627ed9b998af655ba8bb5599 100644 --- a/src/coord/calendar/Calendar.js +++ b/src/coord/calendar/Calendar.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as layout from '../../util/layout'; import * as numberUtil from '../../util/number'; import CoordinateSystem from '../../CoordinateSystem'; diff --git a/src/coord/calendar/CalendarModel.js b/src/coord/calendar/CalendarModel.js index 6418e0b2edafacec553f8ceb89c30659423a4f5b..39ac269917dde3be0bb8c49cfd0ddd92d80aa2e5 100644 --- a/src/coord/calendar/CalendarModel.js +++ b/src/coord/calendar/CalendarModel.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import ComponentModel from '../../model/Component'; import { getLayoutParams, diff --git a/src/coord/calendar/prepareCustom.js b/src/coord/calendar/prepareCustom.js index 5f9f263918150e08d060bd87cb139273f71548af..44366a911f6398a07632d8f66c90315306be153f 100644 --- a/src/coord/calendar/prepareCustom.js +++ b/src/coord/calendar/prepareCustom.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export default function (coordSys) { var rect = coordSys.getRect(); diff --git a/src/coord/cartesian/Axis2D.js b/src/coord/cartesian/Axis2D.js index 2379b3951d7f44b67b0a84de20fe42933151e0e4..2646f12f36c63cc02e6645bd7282f6afceec3a92 100644 --- a/src/coord/cartesian/Axis2D.js +++ b/src/coord/cartesian/Axis2D.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Axis from '../Axis'; /** diff --git a/src/coord/cartesian/AxisModel.js b/src/coord/cartesian/AxisModel.js index 884c5ef609759b1393840df40c7052bffb2db224..34bd67219cf589904c7040786a77821b93f087cd 100644 --- a/src/coord/cartesian/AxisModel.js +++ b/src/coord/cartesian/AxisModel.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import ComponentModel from '../../model/Component'; import axisModelCreator from '../axisModelCreator'; import axisModelCommonMixin from '../axisModelCommonMixin'; diff --git a/src/coord/cartesian/Cartesian.js b/src/coord/cartesian/Cartesian.js index a12a9f3c40baf9c5f5d09ad0da598f0bf16c1a4f..317bbe6111e30e61a9ae8ed0141f0b80e142fb59 100644 --- a/src/coord/cartesian/Cartesian.js +++ b/src/coord/cartesian/Cartesian.js @@ -4,7 +4,7 @@ * */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; function dimAxisMapper(dim) { return this._axes[dim]; diff --git a/src/coord/cartesian/Cartesian2D.js b/src/coord/cartesian/Cartesian2D.js index 2ec8ba49477bd1fa4df9ae5a85e775abf6e434ff..41bac4250e1de62c60f00a99e5334b7f6e237aec 100644 --- a/src/coord/cartesian/Cartesian2D.js +++ b/src/coord/cartesian/Cartesian2D.js @@ -1,5 +1,5 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Cartesian from './Cartesian'; function Cartesian2D(name) { diff --git a/src/coord/cartesian/Grid.js b/src/coord/cartesian/Grid.js index 12855ee6f0305135e2e4a0f014f26766f5e83bfc..c13768bb8a1c7eebc1bf24e4a712ae0b572644a8 100644 --- a/src/coord/cartesian/Grid.js +++ b/src/coord/cartesian/Grid.js @@ -4,7 +4,7 @@ * TODO Default cartesian */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {getLayoutRect} from '../../util/layout'; import * as axisHelper from '../../coord/axisHelper'; import Cartesian2D from './Cartesian2D'; diff --git a/src/coord/cartesian/prepareCustom.js b/src/coord/cartesian/prepareCustom.js index 4af6bae137bf449bdf232e1c04c4b0ff67c8643c..52159813b1794b8355c46fe73096b0448ceefc08 100644 --- a/src/coord/cartesian/prepareCustom.js +++ b/src/coord/cartesian/prepareCustom.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; function dataToCoordSize(dataSize, dataItem) { // dataItem is necessary in log axis. diff --git a/src/coord/geo/Geo.js b/src/coord/geo/Geo.js index 1da1da50c233cbdd65bd5a0d0390adf3c7c99e2d..55154de6deb267f6ef1930cedc9a405ea813c33a 100644 --- a/src/coord/geo/Geo.js +++ b/src/coord/geo/Geo.js @@ -1,4 +1,5 @@ -import {util as zrUtil, BoundingRect} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import BoundingRect from 'zrender/core/BoundingRect'; import parseGeoJson from './parseGeoJson'; import View from '../View'; diff --git a/src/coord/geo/GeoModel.js b/src/coord/geo/GeoModel.js index 11f31845ac221e8857e7a737a83c9e318738b926..f45daae34fc669b4a1cf6870a25f2f2f27c1a272 100644 --- a/src/coord/geo/GeoModel.js +++ b/src/coord/geo/GeoModel.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as modelUtil from '../../util/model'; import ComponentModel from '../../model/Component'; import Model from '../../model/Model'; diff --git a/src/coord/geo/Region.js b/src/coord/geo/Region.js index 28b4334d2a9ad3860456d57c95c9a94680f9dd79..f01dd4a6f508b9f84d7183a95adef08262cdc75c 100644 --- a/src/coord/geo/Region.js +++ b/src/coord/geo/Region.js @@ -2,12 +2,10 @@ * @module echarts/coord/geo/Region */ -import { - contain, - BoundingRect, - bbox, - vector as vec2 -} from 'zrender'; +import BoundingRect from 'zrender/core/BoundingRect'; +import * as bbox from 'zrender/core/bbox'; +import * as vec2 from 'zrender/core/vector'; +import polygonContain from 'zrender/contain/polygon'; /** * @param {string} name @@ -103,10 +101,10 @@ Region.prototype = { } var exterior = geometries[i].exterior; var interiors = geometries[i].interiors; - if (contain.polygon.contain(exterior, coord[0], coord[1])) { + if (polygonContain.contain(exterior, coord[0], coord[1])) { // Not in the region if point is in the hole. for (var k = 0; k < (interiors ? interiors.length : 0); k++) { - if (contain.polygon.contain(interiors[k])) { + if (polygonContain.contain(interiors[k])) { continue loopGeo; } } diff --git a/src/coord/geo/fix/geoCoord.js b/src/coord/geo/fix/geoCoord.js index 397cbde790fbc59a46352c49cf28c72d58288d0a..72e79fc9fc5f5422531be0b1d5639e3a0930fc6a 100644 --- a/src/coord/geo/fix/geoCoord.js +++ b/src/coord/geo/fix/geoCoord.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var geoCoordMap = { 'Russia': [100, 60], diff --git a/src/coord/geo/fix/nanhai.js b/src/coord/geo/fix/nanhai.js index 42dd001aa63436ae67521ca5019a7efc49661df5..2bcf5ff66968dbfe40eee554857a6b63591b9086 100644 --- a/src/coord/geo/fix/nanhai.js +++ b/src/coord/geo/fix/nanhai.js @@ -1,6 +1,6 @@ // Fix for 南海诸岛 -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Region from '../Region'; var geoCoord = [126, 25]; diff --git a/src/coord/geo/fix/textCoord.js b/src/coord/geo/fix/textCoord.js index d5b815924ee2396e34f5d885c0d382cf88c3a878..67ec0876b5c531ae638f1016325eb5733646114d 100644 --- a/src/coord/geo/fix/textCoord.js +++ b/src/coord/geo/fix/textCoord.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var coordsOffsetMap = { '南海诸岛' : [32, 80], diff --git a/src/coord/geo/geoCreator.js b/src/coord/geo/geoCreator.js index 5589f33585bc0bbb782dc1504404e4e2b4f5d1b5..844717452ca44c4b7ca9ebf4978a835f4fca536a 100644 --- a/src/coord/geo/geoCreator.js +++ b/src/coord/geo/geoCreator.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Geo from './Geo'; import * as layout from '../../util/layout'; import * as numberUtil from '../../util/number'; diff --git a/src/coord/geo/parseGeoJson.js b/src/coord/geo/parseGeoJson.js index 9e3124f5dedec8c2f84bb0419cd02c4c87a12f9e..567ff66f1dac85ec12dd55b16728e3058e8d321b 100644 --- a/src/coord/geo/parseGeoJson.js +++ b/src/coord/geo/parseGeoJson.js @@ -3,7 +3,7 @@ * @module echarts/coord/geo/parseGeoJson */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Region from './Region'; function decode(json) { diff --git a/src/coord/geo/prepareCustom.js b/src/coord/geo/prepareCustom.js index 7eddbbe84f0768a31dfcbe183c51e5d8fbb3ba00..be2b900164d4b5ee5d676e4bede0b6625075cd57 100644 --- a/src/coord/geo/prepareCustom.js +++ b/src/coord/geo/prepareCustom.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; function dataToCoordSize(dataSize, dataItem) { dataItem = dataItem || [0, 0]; diff --git a/src/coord/parallel/AxisModel.js b/src/coord/parallel/AxisModel.js index 45c22d0d817937681f6c373f31e573b4a6bb38b5..4afa3f4428bf61ffdf1c58aa0d019c13fc4cf81b 100644 --- a/src/coord/parallel/AxisModel.js +++ b/src/coord/parallel/AxisModel.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import ComponentModel from '../../model/Component'; import makeStyleMapper from '../../model/mixin/makeStyleMapper'; import axisModelCreator from '../axisModelCreator'; diff --git a/src/coord/parallel/Parallel.js b/src/coord/parallel/Parallel.js index 1e093666b65efb5ca04c23f3e8322342ac3ebdec..83dfb647a1c9a2927631e358a31220027e9c9a5e 100644 --- a/src/coord/parallel/Parallel.js +++ b/src/coord/parallel/Parallel.js @@ -3,7 +3,8 @@ * */ -import {util as zrUtil, matrix} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import * as matrix from 'zrender/core/matrix'; import * as layoutUtil from '../../util/layout'; import * as axisHelper from '../../coord/axisHelper'; import ParallelAxis from './ParallelAxis'; diff --git a/src/coord/parallel/ParallelAxis.js b/src/coord/parallel/ParallelAxis.js index 5c99e7fbf25d9095ebabe066948be956306ff614..bba8121bbceb5b1e979c1770b3a75604340fae44 100644 --- a/src/coord/parallel/ParallelAxis.js +++ b/src/coord/parallel/ParallelAxis.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Axis from '../Axis'; /** diff --git a/src/coord/parallel/ParallelModel.js b/src/coord/parallel/ParallelModel.js index a8f31b77d0f9afa4bcafb034846624409cedab5f..ee104fa34101b888db28896f882ebb20cbc026f9 100644 --- a/src/coord/parallel/ParallelModel.js +++ b/src/coord/parallel/ParallelModel.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Component from '../../model/Component'; import './AxisModel'; diff --git a/src/coord/parallel/parallelPreprocessor.js b/src/coord/parallel/parallelPreprocessor.js index 04876e977c88a10976aa0d7b71748450354271c5..36bc68c01ac2fc6bc7c248dc5af2a599c6dccd7a 100644 --- a/src/coord/parallel/parallelPreprocessor.js +++ b/src/coord/parallel/parallelPreprocessor.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as modelUtil from '../../util/model'; export default function (option) { diff --git a/src/coord/polar/AngleAxis.js b/src/coord/polar/AngleAxis.js index a7ff019ddfeb2cb00b666664a0dccc8277179380..25f09020aaae8b98b7787f699849a863a586c874 100644 --- a/src/coord/polar/AngleAxis.js +++ b/src/coord/polar/AngleAxis.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Axis from '../Axis'; function AngleAxis(scale, angleExtent) { diff --git a/src/coord/polar/AxisModel.js b/src/coord/polar/AxisModel.js index 28919b469eea3f5bba03f3e8dc381bcf49268eb4..27d5057de96a6ffb514baab4ff8e4db5f3c6a585 100644 --- a/src/coord/polar/AxisModel.js +++ b/src/coord/polar/AxisModel.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import ComponentModel from '../../model/Component'; import axisModelCreator from '../axisModelCreator'; import axisModelCommonMixin from '../axisModelCommonMixin'; diff --git a/src/coord/polar/RadiusAxis.js b/src/coord/polar/RadiusAxis.js index 976c2057fe04d79a0c44a0364ca3ea3c848daa59..1e82205c5a459f5b8291393b0c531dd88d63f78f 100644 --- a/src/coord/polar/RadiusAxis.js +++ b/src/coord/polar/RadiusAxis.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Axis from '../Axis'; function RadiusAxis(scale, radiusExtent) { diff --git a/src/coord/polar/polarCreator.js b/src/coord/polar/polarCreator.js index b5368d5347d0ff5e7a24b86ec6df2364c846c301..1858d27eb4f2716bb03e350ef65bcfdbf65e6d50 100644 --- a/src/coord/polar/polarCreator.js +++ b/src/coord/polar/polarCreator.js @@ -1,6 +1,6 @@ // TODO Axis scale -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Polar from './Polar'; import {parsePercent} from '../../util/number'; import { diff --git a/src/coord/polar/prepareCustom.js b/src/coord/polar/prepareCustom.js index 7ac2ce579ee4e47bdc948466bea1155c12af0811..e3c5883ddc8b034942563e99f4f794cf5c73d95c 100644 --- a/src/coord/polar/prepareCustom.js +++ b/src/coord/polar/prepareCustom.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; function dataToCoordSize(dataSize, dataItem) { // dataItem is necessary in log axis. diff --git a/src/coord/radar/IndicatorAxis.js b/src/coord/radar/IndicatorAxis.js index ad637b4a0916bef5ce8c309e546d2031330f14ef..4342131c56473767fb0598ad80e6ee5926657779 100644 --- a/src/coord/radar/IndicatorAxis.js +++ b/src/coord/radar/IndicatorAxis.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Axis from '../Axis'; function IndicatorAxis(dim, scale, radiusExtent) { diff --git a/src/coord/radar/Radar.js b/src/coord/radar/Radar.js index dcc4e4dd6dbc7024ef45f9c95e7f14d4b5755b05..87a531dec652eb2e1d02c08fbb5abb190f4b2012 100644 --- a/src/coord/radar/Radar.js +++ b/src/coord/radar/Radar.js @@ -1,6 +1,6 @@ // TODO clockwise -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import IndicatorAxis from './IndicatorAxis'; import IntervalScale from '../../scale/Interval'; import * as numberUtil from '../../util/number'; diff --git a/src/coord/radar/RadarModel.js b/src/coord/radar/RadarModel.js index b65280ac95cdb343a5669f94bbb6d26f4b5b7c73..67c647ab9bfdb08c7cf54a5df63271e2a9b6e90f 100644 --- a/src/coord/radar/RadarModel.js +++ b/src/coord/radar/RadarModel.js @@ -1,5 +1,5 @@ import * as echarts from '../../echarts'; -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import axisDefault from '../axisDefault'; import Model from '../../model/Model'; import axisModelCommonMixin from '../axisModelCommonMixin'; diff --git a/src/coord/single/AxisModel.js b/src/coord/single/AxisModel.js index d8466dbe8e9eee140ea2ee1470f0a7e7b3fcaea2..32aee6f94fe0cf80c3484eb39fac175e22e986b7 100644 --- a/src/coord/single/AxisModel.js +++ b/src/coord/single/AxisModel.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import ComponentModel from '../../model/Component'; import axisModelCreator from '../axisModelCreator'; import axisModelCommonMixin from '../axisModelCommonMixin'; diff --git a/src/coord/single/SingleAxis.js b/src/coord/single/SingleAxis.js index e14b9f39a29dd808049c23022911705dc058c3fe..b8069fa3234d1dd029792255842c9afa380dd352 100644 --- a/src/coord/single/SingleAxis.js +++ b/src/coord/single/SingleAxis.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Axis from '../Axis'; /** diff --git a/src/coord/single/prepareCustom.js b/src/coord/single/prepareCustom.js index 2c9202e87b2c5ce1dc4975c99762653105370635..cbf7d55eccdaf58597809edac624a712106ad41b 100644 --- a/src/coord/single/prepareCustom.js +++ b/src/coord/single/prepareCustom.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; function dataToCoordSize(dataSize, dataItem) { // dataItem is necessary in log axis. diff --git a/src/data/Graph.js b/src/data/Graph.js index 76ad98079586b88222df7ddcab4fb272591b3e41..049b1d7ea912c6d80f2ec4aac6f88a08dc182d9b 100644 --- a/src/data/Graph.js +++ b/src/data/Graph.js @@ -5,7 +5,7 @@ * @author Yi Shen(https://www.github.com/pissang) */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; // id may be function name of Object, add a prefix to avoid this problem. function generateNodeKey (id) { diff --git a/src/data/List.js b/src/data/List.js index 887b43d207d2af38846f7b3f3917e8fadcf47dcd..a0ea03f999c4ede3ab8a8d86dc2a5e950b9e6d3f 100644 --- a/src/data/List.js +++ b/src/data/List.js @@ -3,7 +3,7 @@ * @module echarts/data/List */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Model from '../model/Model'; import DataDiffer from './DataDiffer'; import * as modelUtil from '../util/model'; diff --git a/src/data/Tree.js b/src/data/Tree.js index 79b240d99d9ee6343d372786c00d2ee423358c65..aacdd8c6a281ebc7b630c391c18e8cf392ffcd6e 100644 --- a/src/data/Tree.js +++ b/src/data/Tree.js @@ -4,7 +4,7 @@ * @module echarts/data/Tree */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Model from '../model/Model'; import List from './List'; import linkList from './helper/linkList'; diff --git a/src/data/helper/completeDimensions.js b/src/data/helper/completeDimensions.js index 05ce563fd177d23e503859f3cce73bf53c82cddc..bf86f64cd77cbe922b63aabff089b6e2164079ab 100644 --- a/src/data/helper/completeDimensions.js +++ b/src/data/helper/completeDimensions.js @@ -2,7 +2,7 @@ * Complete dimensions by data (guess dimension). */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {normalizeToArray} from '../../util/model'; var each = zrUtil.each; diff --git a/src/data/helper/linkList.js b/src/data/helper/linkList.js index 9736e1c5362e992e30ec5b9e2256947eb201b811..223cd02d6f4a4208928e2a472eb85bd1afe4f4bf 100644 --- a/src/data/helper/linkList.js +++ b/src/data/helper/linkList.js @@ -2,7 +2,7 @@ * Link lists and struct (graph or tree) */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var each = zrUtil.each; diff --git a/src/echarts.js b/src/echarts.js index baf72131673a93bd6583722a36771c454c1990e4..8177979e36a5519e5490c746d88693ac84572898 100644 --- a/src/echarts.js +++ b/src/echarts.js @@ -22,7 +22,12 @@ if (typeof __DEV__ === 'undefined') { * https://github.com/ecomfe/echarts/blob/master/LICENSE.txt */ -import zrender from 'zrender'; +import * as zrender from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import * as colorTool from 'zrender/tool/color'; +import env from 'zrender/core/env'; +import timsort from 'zrender/core/timsort'; +import Eventful from 'zrender/mixin/Eventful'; import GlobalModel from './model/Global'; import ExtensionAPI from './ExtensionAPI'; import CoordinateSystemManager from './CoordinateSystem'; @@ -41,12 +46,6 @@ import seriesColor from './visual/seriesColor'; import loadingDefault from './loading/default'; import * as ecHelper from './helper'; -var zrUtil = zrender.util; -var colorTool = zrender.color; -var Eventful = zrender.Eventful; -var timsort = zrender.timsort; - -var env = zrender.env; var each = zrUtil.each; var parseClassType = ComponentModel.parseClassType; diff --git a/src/helper.js b/src/helper.js index 17303b509a8dce11dda9c6b8158591cdf58a01a4..c4a97459cad4a085e007802d69bf604d048de47f 100644 --- a/src/helper.js +++ b/src/helper.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import createListFromArray from './chart/helper/createListFromArray'; import * as axisHelper from './coord/axisHelper'; import axisModelCommonMixin from './coord/axisModelCommonMixin'; diff --git a/src/layout/barGrid.js b/src/layout/barGrid.js index 3917256443ac0fe794640e85aa2db58353cc4091..0681dfb0422fd06a03d858fe1742301571ead3a9 100644 --- a/src/layout/barGrid.js +++ b/src/layout/barGrid.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {parsePercent} from '../util/number'; var STACK_PREFIX = '__ec_stack_'; diff --git a/src/layout/barPolar.js b/src/layout/barPolar.js index 067a8789048ca4e8e60ddee33e8431f0a9e8939b..cab6a94cd756ac69e91089ce07ea9b2132175f3f 100644 --- a/src/layout/barPolar.js +++ b/src/layout/barPolar.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {parsePercent} from '../util/number'; function getSeriesStackId(seriesModel) { diff --git a/src/loading/default.js b/src/loading/default.js index 4880cc02ff9b6c544694f9e1b1db395256aecbf1..61ad4c365b86c0f1be243179015d7a99d35d2896 100644 --- a/src/loading/default.js +++ b/src/loading/default.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from '../util/graphic'; var PI = Math.PI; diff --git a/src/model/Component.js b/src/model/Component.js index 442b7d9af6112c350524b4500fbf87540e83556e..29b06c39c34977b17abc86367ccb23b414854ae5 100644 --- a/src/model/Component.js +++ b/src/model/Component.js @@ -4,7 +4,7 @@ * @module echarts/model/Component */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Model from './Model'; import * as componentUtil from '../util/component'; import * as clazzUtil from '../util/clazz'; diff --git a/src/model/Global.js b/src/model/Global.js index 577df9e387aa22dee4291149d2d1636695fe780d..6386d867235fb5a8ba6a803a1d300f17b5482e66 100644 --- a/src/model/Global.js +++ b/src/model/Global.js @@ -18,7 +18,7 @@ * `mergeOption` in module:echarts/model/OptionManager. */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as modelUtil from '../util/model'; import Model from './Model'; import ComponentModel from './Component'; diff --git a/src/model/Model.js b/src/model/Model.js index a98288b310e9cc8693ba5c86fb131ffa5331f655..cb293bdfaeae8c27afe15ac4745e9d6d3bc10979 100644 --- a/src/model/Model.js +++ b/src/model/Model.js @@ -2,7 +2,8 @@ * @module echarts/model/Model */ -import {util as zrUtil, env} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import env from 'zrender/core/env'; import * as clazzUtil from '../util/clazz'; import lineStyleMixin from './mixin/lineStyle'; diff --git a/src/model/OptionManager.js b/src/model/OptionManager.js index 430f5627b693f2358ad1d58a6f2282966e3a269a..bde77b52292e9544929589ec29b9ac8fce784af7 100644 --- a/src/model/OptionManager.js +++ b/src/model/OptionManager.js @@ -5,7 +5,7 @@ */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as modelUtil from '../util/model'; import ComponentModel from './Component'; diff --git a/src/model/Series.js b/src/model/Series.js index cb373252f37148df7f907e85b7f717a0cb0a48fd..e0de99230ca7d9ca0d7ed55c1c5f38b3706c5543 100644 --- a/src/model/Series.js +++ b/src/model/Series.js @@ -1,4 +1,5 @@ -import {util as zrUtil, env} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import env from 'zrender/core/env'; import { formatTime, encodeHTML, diff --git a/src/model/mixin/makeStyleMapper.js b/src/model/mixin/makeStyleMapper.js index 67329e203aa22fcd3d1a18a30ace3afc85200269..2843a59466a42cf9958849ad65f7becf8fb52c34 100644 --- a/src/model/mixin/makeStyleMapper.js +++ b/src/model/mixin/makeStyleMapper.js @@ -1,6 +1,6 @@ // TODO Parse shadow style // TODO Only shallow path support -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; export default function (properties) { // Normalize diff --git a/src/model/mixin/textStyle.js b/src/model/mixin/textStyle.js index 322479f9d1d7919283e3c8cc36e52359a4b54f78..842640b23c8572b616b0976880c9e5836c05efca 100644 --- a/src/model/mixin/textStyle.js +++ b/src/model/mixin/textStyle.js @@ -1,4 +1,4 @@ -import {contain} from 'zrender'; +import * as textContain from 'zrender/contain/text'; import * as graphicUtil from '../../util/graphic'; var PATH_COLOR = ['textStyle', 'color']; @@ -31,7 +31,7 @@ export default { }, getTextRect: function (text) { - return contain.text.getBoundingRect( + return textContain.getBoundingRect( text, this.getFont(), this.getShallow('align'), diff --git a/src/preprocessor/backwardCompat.js b/src/preprocessor/backwardCompat.js index c7a345e232a9bace102e4558437d87f994ebfac9..ac14a5925842a59a25b4f95ddf330fe197b37296 100644 --- a/src/preprocessor/backwardCompat.js +++ b/src/preprocessor/backwardCompat.js @@ -1,6 +1,6 @@ // Compatitable with 2.0 -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import compatStyle from './helper/compatStyle'; function get(opt, path) { diff --git a/src/preprocessor/helper/compatStyle.js b/src/preprocessor/helper/compatStyle.js index 0f9abfe0e685f8e19c8ada84ee762bc595c02eec..81c9ce41b328371d6e472e1a7a3418c9ffe8ee68 100644 --- a/src/preprocessor/helper/compatStyle.js +++ b/src/preprocessor/helper/compatStyle.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as modelUtil from '../../util/model'; var each = zrUtil.each; diff --git a/src/scale/Log.js b/src/scale/Log.js index 8407b5d6180f81edd9a14e54a5f368fb2d301033..789f726e6f6aade87c943657dbd9277b1f5c8db9 100644 --- a/src/scale/Log.js +++ b/src/scale/Log.js @@ -3,7 +3,7 @@ * @module echarts/scale/Log */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Scale from './Scale'; import * as numberUtil from '../util/number'; diff --git a/src/scale/Ordinal.js b/src/scale/Ordinal.js index 0d4e5bac012a0ca3322618b1fe43350015ef80f4..6ca6e7fcffd32d1736c70f8f511f80bd9c943b69 100644 --- a/src/scale/Ordinal.js +++ b/src/scale/Ordinal.js @@ -7,7 +7,7 @@ // FIXME only one data -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Scale from './Scale'; var scaleProto = Scale.prototype; diff --git a/src/scale/Time.js b/src/scale/Time.js index 14398b467ce4d4e4b89991e56eb2f3451db3e9d7..dd472a89b6d3730a0e8ed403fafdd36992632dea 100644 --- a/src/scale/Time.js +++ b/src/scale/Time.js @@ -8,7 +8,7 @@ // (2) By default, the input data string (e.g., '2011-01-02') should be displayed // as its original time, without any time difference. -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as numberUtil from '../util/number'; import * as formatUtil from '../util/format'; import scaleHelper from './helper'; diff --git a/src/util/animation.js b/src/util/animation.js index 89d4b30e6c391f048698980499aff027d0edf95f..459b259bbd00046a2748c64644f93dc60fd3a4bd 100644 --- a/src/util/animation.js +++ b/src/util/animation.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; /** * @param {number} [time=500] Time in ms diff --git a/src/util/array/nest.js b/src/util/array/nest.js index 47c6a19dfc6b58b34157ba663b6bdeedbb565aa7..e83e795b4fb2aeccfbf0d8d53c84c3a7c8e35da2 100644 --- a/src/util/array/nest.js +++ b/src/util/array/nest.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; /** * nest helper used to group by the array. diff --git a/src/util/clazz.js b/src/util/clazz.js index 6a50ddedb62593ec2da6d613eae12c370e326508..5f9d23dea5c8aeffa83f981219b6c8949d769aeb 100644 --- a/src/util/clazz.js +++ b/src/util/clazz.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var TYPE_DELIMITER = '.'; var IS_CONTAINER = '___EC__COMPONENT__CONTAINER___'; diff --git a/src/util/component.js b/src/util/component.js index 8c18ede5034fbc7c07d6ad1fb1ea40b350d48384..291e50990da8e9781339010ae2da16db89e73ec0 100644 --- a/src/util/component.js +++ b/src/util/component.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import {parseClassType} from './clazz'; var base = 0; diff --git a/src/util/format.js b/src/util/format.js index b6c8379e2694640c75d40a7dd5fcbf7c19bcc058..eea47eeac0604c4d24e94f363a931a35f0283641 100644 --- a/src/util/format.js +++ b/src/util/format.js @@ -1,4 +1,5 @@ -import {util as zrUtil, contain} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import textContain from 'zrender/contain/text'; import * as numberUtil from './number'; /** @@ -177,6 +178,6 @@ export function capitalFirst(str) { return str ? str.charAt(0).toUpperCase() + str.substr(1) : str; } -export var truncateText = contain.text.truncateText; +export var truncateText = textContain.truncateText; -export var getTextRect = contain.text.getBoundingRect; +export var getTextRect = textContain.getBoundingRect; diff --git a/src/util/graphic.js b/src/util/graphic.js index 705fe849ef6ad82a12ea7aea6a0d23bb5cb2e9eb..03eca82a03123155dd35d12cc809a68edcfdc66f 100644 --- a/src/util/graphic.js +++ b/src/util/graphic.js @@ -1,13 +1,11 @@ -import { - util as zrUtil, - path as pathTool, - color as colorTool, - matrix, - vector, - Path, - Transformable, - Image -} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import * as pathTool from 'zrender/tool/path'; +import * as colorTool from 'zrender/tool/color'; +import * as matrix from 'zrender/core/matrix'; +import * as vector from 'zrender/core/vector'; +import Path from 'zrender/graphic/Path'; +import Transformable from 'zrender/mixin/Transformable'; +import Image from 'zrender/graphic/Image'; var round = Math.round; var mathMax = Math.max; diff --git a/src/util/layout.js b/src/util/layout.js index 6893d55d7d131862ed71be5330570b935a72e503..5939b50decd3086f8df8629d413c74016e5844da 100644 --- a/src/util/layout.js +++ b/src/util/layout.js @@ -1,9 +1,7 @@ // Layout helpers for each component positioning -import { - util as zrUtil, - BoundingRect -} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import BoundingRect from 'zrender/core/BoundingRect'; import {parsePercent} from './number'; import * as formatUtil from './format'; diff --git a/src/util/model.js b/src/util/model.js index 384d8964b3f72f3b7fd1e0388b5d6b5db2ef87b3..a1ba5c8aac9a17dc1fa31dd0504dac6f5e8dc326 100644 --- a/src/util/model.js +++ b/src/util/model.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as formatUtil from './format'; import nubmerUtil from './number'; import Model from '../model/Model'; diff --git a/src/util/number.js b/src/util/number.js index e64b9909f2322f04401bb527a4ad481f0fd4efbd..51d35831d2b66c45932125006a6350a5c8c4814f 100644 --- a/src/util/number.js +++ b/src/util/number.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var RADIAN_EPSILON = 1e-4; diff --git a/src/util/symbol.js b/src/util/symbol.js index 9b51d3520808a628b3afd82d2467fc2cd54b50ac..e132caab0dc7b8dc187ec24ef45b85f4a333dec7 100644 --- a/src/util/symbol.js +++ b/src/util/symbol.js @@ -1,8 +1,8 @@ // Symbol factory -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import * as graphic from './graphic'; -import {BoundingRect} from 'zrender'; +import BoundingRect from 'zrender/core/BoundingRect'; /** * Triangle shape diff --git a/src/view/Chart.js b/src/view/Chart.js index 3efd859b3245628a5d9ea25a7b8ca238fe31eb16..cc31065b014cff882f3d97f5fffb624ff7bf9a90 100644 --- a/src/view/Chart.js +++ b/src/view/Chart.js @@ -1,4 +1,4 @@ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import Group from 'zrender/container/Group'; import * as componentUtil from '../util/component'; import * as clazzUtil from '../util/clazz'; diff --git a/src/visual/VisualMapping.js b/src/visual/VisualMapping.js index c656d2b40e62fd70546f37a8e9145e1c6fd77077..6c66502719235f32a1de574a24c81d7fe72245e3 100644 --- a/src/visual/VisualMapping.js +++ b/src/visual/VisualMapping.js @@ -1,7 +1,5 @@ -import { - util as zrUtil, - color as zrColor -} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; +import * as zrColor from 'zrender/tool/color'; import {linearMap} from '../util/number'; var each = zrUtil.each; diff --git a/src/visual/visualDefault.js b/src/visual/visualDefault.js index b08d6c9f57700e620bda38e016ca833d3fa478f2..8ba7d51065ce8e33dade7954d778ed0ca4813113 100644 --- a/src/visual/visualDefault.js +++ b/src/visual/visualDefault.js @@ -2,7 +2,7 @@ * @file Visual mapping. */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; var visualDefault = { diff --git a/src/visual/visualSolution.js b/src/visual/visualSolution.js index 352d7ac1bcc3e25a24ddf12f2cbf7f13dc5563ce..e309ea82dc195bac782813008edb0e7f893db094 100644 --- a/src/visual/visualSolution.js +++ b/src/visual/visualSolution.js @@ -2,7 +2,7 @@ * @file Visual solution, for consistent option specification. */ -import {util as zrUtil} from 'zrender'; +import * as zrUtil from 'zrender/core/util'; import VisualMapping from './VisualMapping'; var each = zrUtil.each;