You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/01/14 03:24:02 UTC
[incubator-echarts] 01/01: ts: try zrender ts version.
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch ts-zr
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit f6bfe2d3c3eb9ad6c75ac9007eaeb97cfc6d99d9
Author: pissang <bm...@gmail.com>
AuthorDate: Tue Jan 14 11:22:59 2020 +0800
ts: try zrender ts version.
---
build/addHeader.js | 2 +-
.../babel-plugin-transform-modules-commonjs-ec.js | 736 +++++++++++++++++++++
build/babel-plugin-transform-remove-dev.js | 33 +
build/build.js | 4 +-
build/helper.js | 265 ++++++++
build/pre-publish.js | 2 +-
build/rollup-plugin-ec-remove-dev.js | 2 +-
echarts.all.js | 4 +-
echarts.common.js | 4 +-
index.common.js | 2 +-
index.js | 2 +-
src/CoordinateSystem.js | 2 +-
src/ExtensionAPI.js | 2 +-
src/action/createDataSelectAction.js | 2 +-
src/action/geoRoam.js | 2 +-
src/chart/bar.js | 2 +-
src/chart/bar/BarView.js | 6 +-
src/chart/bar/PictorialBarView.js | 2 +-
src/chart/boxplot/BoxplotSeries.js | 2 +-
src/chart/boxplot/BoxplotView.js | 4 +-
src/chart/boxplot/boxplotLayout.js | 2 +-
src/chart/candlestick/CandlestickSeries.js | 2 +-
src/chart/candlestick/CandlestickView.js | 4 +-
src/chart/candlestick/candlestickLayout.js | 2 +-
src/chart/candlestick/preprocessor.js | 2 +-
src/chart/chord/chordCircularLayout.js | 2 +-
src/chart/custom.js | 2 +-
src/chart/effectScatter/EffectScatterView.js | 2 +-
src/chart/funnel/FunnelSeries.js | 2 +-
src/chart/funnel/FunnelView.js | 2 +-
src/chart/gauge/PointerPath.js | 2 +-
src/chart/graph/GraphSeries.js | 2 +-
src/chart/graph/GraphView.js | 2 +-
src/chart/graph/adjustEdge.js | 4 +-
src/chart/graph/circularLayoutHelper.js | 2 +-
src/chart/graph/createView.js | 2 +-
src/chart/graph/forceHelper.js | 2 +-
src/chart/graph/forceLayout.js | 4 +-
src/chart/graph/simpleLayout.js | 2 +-
src/chart/graph/simpleLayoutHelper.js | 2 +-
src/chart/heatmap/HeatmapLayer.js | 2 +-
src/chart/heatmap/HeatmapView.js | 2 +-
src/chart/helper/EffectLine.js | 6 +-
src/chart/helper/EffectPolyline.js | 4 +-
src/chart/helper/EffectSymbol.js | 2 +-
src/chart/helper/LargeLineDraw.js | 6 +-
src/chart/helper/LargeSymbolDraw.js | 2 +-
src/chart/helper/Line.js | 4 +-
src/chart/helper/LineDraw.js | 2 +-
src/chart/helper/LinePath.js | 2 +-
src/chart/helper/Polyline.js | 2 +-
src/chart/helper/Symbol.js | 2 +-
src/chart/helper/SymbolDraw.js | 2 +-
src/chart/helper/createGraphFromNodeEdge.js | 2 +-
src/chart/helper/createGraphFromNodeMatrix.js | 2 +-
src/chart/helper/createListFromArray.js | 2 +-
src/chart/helper/createListSimply.js | 2 +-
src/chart/helper/treeHelper.js | 2 +-
src/chart/helper/whiskerBoxCommon.js | 2 +-
src/chart/line/LineView.js | 2 +-
src/chart/line/helper.js | 2 +-
src/chart/line/lineAnimationDiff.js | 4 +-
src/chart/line/poly.js | 6 +-
src/chart/lines/LinesSeries.js | 2 +-
src/chart/map/MapSeries.js | 2 +-
src/chart/map/MapView.js | 2 +-
src/chart/map/backwardCompat.js | 2 +-
src/chart/map/mapDataStatistic.js | 2 +-
src/chart/map/mapSymbolLayout.js | 2 +-
src/chart/parallel/ParallelSeries.js | 2 +-
src/chart/pictorialBar.js | 2 +-
src/chart/pie.js | 2 +-
src/chart/pie/PieSeries.js | 2 +-
src/chart/pie/PieView.js | 2 +-
src/chart/pie/labelLayout.js | 2 +-
src/chart/pie/pieLayout.js | 2 +-
src/chart/radar/RadarSeries.js | 2 +-
src/chart/radar/RadarView.js | 2 +-
src/chart/radar/backwardCompat.js | 2 +-
src/chart/radar/radarLayout.js | 2 +-
src/chart/sankey/SankeyView.js | 2 +-
src/chart/sankey/sankeyLayout.js | 2 +-
src/chart/sankey/sankeyVisual.js | 2 +-
src/chart/scatter.js | 2 +-
src/chart/sunburst.js | 2 +-
src/chart/sunburst/SunburstPiece.js | 2 +-
src/chart/sunburst/SunburstSeries.js | 2 +-
src/chart/sunburst/SunburstView.js | 2 +-
src/chart/sunburst/sunburstLayout.js | 2 +-
src/chart/themeRiver/ThemeRiverSeries.js | 2 +-
src/chart/themeRiver/ThemeRiverView.js | 2 +-
src/chart/themeRiver/themeRiverLayout.js | 2 +-
src/chart/themeRiver/themeRiverVisual.js | 2 +-
src/chart/tree/TreeView.js | 4 +-
src/chart/treemap/Breadcrumb.js | 2 +-
src/chart/treemap/TreemapSeries.js | 2 +-
src/chart/treemap/TreemapView.js | 6 +-
src/chart/treemap/helper.js | 2 +-
src/chart/treemap/treemapLayout.js | 4 +-
src/chart/treemap/treemapVisual.js | 4 +-
src/component/axis/AngleAxisView.js | 2 +-
src/component/axis/AxisBuilder.js | 6 +-
src/component/axis/CartesianAxisView.js | 2 +-
src/component/axis/ParallelAxisView.js | 2 +-
src/component/axis/RadiusAxisView.js | 2 +-
src/component/axis/SingleAxisView.js | 2 +-
src/component/axis/axisSplitHelper.js | 2 +-
src/component/axisPointer.js | 2 +-
src/component/axisPointer/BaseAxisPointer.js | 4 +-
src/component/axisPointer/PolarAxisPointer.js | 2 +-
src/component/axisPointer/axisTrigger.js | 2 +-
src/component/axisPointer/findPointFromSeries.js | 2 +-
src/component/axisPointer/globalListener.js | 4 +-
src/component/axisPointer/modelHelper.js | 2 +-
src/component/axisPointer/viewHelper.js | 6 +-
src/component/brush/BrushModel.js | 2 +-
src/component/brush/BrushView.js | 2 +-
src/component/brush/preprocessor.js | 2 +-
src/component/brush/selector.js | 4 +-
src/component/brush/visualEncoding.js | 4 +-
src/component/calendar/CalendarView.js | 2 +-
src/component/dataZoom/AxisProxy.js | 2 +-
src/component/dataZoom/DataZoomModel.js | 4 +-
src/component/dataZoom/InsideZoomView.js | 2 +-
src/component/dataZoom/SliderZoomView.js | 4 +-
src/component/dataZoom/dataZoomAction.js | 2 +-
src/component/dataZoom/dataZoomProcessor.js | 2 +-
src/component/dataZoom/helper.js | 2 +-
src/component/dataZoom/history.js | 2 +-
src/component/dataZoom/roams.js | 2 +-
src/component/geo.js | 2 +-
src/component/graphic.js | 2 +-
src/component/gridSimple.js | 2 +-
src/component/helper/BrushController.js | 4 +-
src/component/helper/BrushTargetManager.js | 2 +-
src/component/helper/MapDraw.js | 2 +-
src/component/helper/RoamController.js | 6 +-
src/component/helper/brushHelper.js | 2 +-
src/component/helper/selectableMixin.js | 2 +-
src/component/legend/LegendModel.js | 2 +-
src/component/legend/LegendView.js | 2 +-
src/component/legend/ScrollableLegendView.js | 2 +-
src/component/legend/legendAction.js | 2 +-
src/component/marker/MarkAreaView.js | 4 +-
src/component/marker/MarkLineView.js | 2 +-
src/component/marker/MarkPointView.js | 2 +-
src/component/marker/MarkerModel.js | 4 +-
src/component/marker/MarkerView.js | 2 +-
src/component/marker/markerHelper.js | 2 +-
src/component/parallel.js | 2 +-
src/component/polar.js | 2 +-
src/component/radar/RadarView.js | 2 +-
src/component/timeline/SliderTimelineModel.js | 2 +-
src/component/timeline/SliderTimelineView.js | 6 +-
src/component/timeline/TimelineAxis.js | 2 +-
src/component/timeline/TimelineModel.js | 2 +-
src/component/timeline/preprocessor.js | 2 +-
src/component/timeline/timelineAction.js | 2 +-
src/component/title.js | 2 +-
src/component/toolbox/ToolboxModel.js | 2 +-
src/component/toolbox/ToolboxView.js | 4 +-
src/component/toolbox/feature/Brush.js | 2 +-
src/component/toolbox/feature/DataView.js | 4 +-
src/component/toolbox/feature/DataZoom.js | 2 +-
src/component/toolbox/feature/MagicType.js | 2 +-
src/component/toolbox/feature/SaveAsImage.js | 2 +-
src/component/tooltip/TooltipContent.js | 10 +-
src/component/tooltip/TooltipRichContent.js | 6 +-
src/component/tooltip/TooltipView.js | 4 +-
src/component/visualMap/ContinuousModel.js | 2 +-
src/component/visualMap/ContinuousView.js | 6 +-
src/component/visualMap/PiecewiseModel.js | 2 +-
src/component/visualMap/PiecewiseView.js | 2 +-
src/component/visualMap/VisualMapModel.js | 4 +-
src/component/visualMap/VisualMapView.js | 2 +-
src/component/visualMap/helper.js | 2 +-
src/component/visualMap/preprocessor.js | 2 +-
src/component/visualMap/visualEncoding.js | 2 +-
src/coord/Axis.js | 2 +-
src/coord/View.js | 10 +-
src/coord/axisDefault.js | 2 +-
src/coord/axisHelper.js | 4 +-
src/coord/axisModelCommonMixin.js | 2 +-
src/coord/axisModelCreator.js | 2 +-
src/coord/axisTickLabelBuilder.js | 4 +-
src/coord/calendar/Calendar.js | 2 +-
src/coord/calendar/CalendarModel.js | 2 +-
src/coord/cartesian/Axis2D.js | 2 +-
src/coord/cartesian/AxisModel.js | 2 +-
src/coord/cartesian/Cartesian.js | 2 +-
src/coord/cartesian/Cartesian2D.js | 4 +-
src/coord/cartesian/Grid.js | 2 +-
src/coord/cartesian/cartesianAxisHelper.js | 2 +-
src/coord/cartesian/prepareCustom.js | 2 +-
src/coord/geo/Geo.js | 6 +-
src/coord/geo/GeoModel.js | 2 +-
src/coord/geo/Region.js | 8 +-
src/coord/geo/fix/diaoyuIsland.js | 2 +-
src/coord/geo/fix/nanhai.js | 2 +-
src/coord/geo/geoCreator.js | 2 +-
src/coord/geo/geoJSONLoader.js | 2 +-
src/coord/geo/geoSVGLoader.js | 10 +-
src/coord/geo/geoSourceManager.js | 4 +-
src/coord/geo/mapDataStorage.js | 4 +-
src/coord/geo/parseGeoJson.js | 2 +-
src/coord/geo/prepareCustom.js | 2 +-
src/coord/parallel/AxisModel.js | 2 +-
src/coord/parallel/Parallel.js | 4 +-
src/coord/parallel/ParallelAxis.js | 2 +-
src/coord/parallel/ParallelModel.js | 2 +-
src/coord/parallel/parallelPreprocessor.js | 2 +-
src/coord/polar/AngleAxis.js | 4 +-
src/coord/polar/AxisModel.js | 2 +-
src/coord/polar/RadiusAxis.js | 2 +-
src/coord/polar/polarCreator.js | 2 +-
src/coord/polar/prepareCustom.js | 2 +-
src/coord/radar/IndicatorAxis.js | 2 +-
src/coord/radar/Radar.js | 2 +-
src/coord/radar/RadarModel.js | 2 +-
src/coord/single/AxisModel.js | 2 +-
src/coord/single/Single.js | 2 +-
src/coord/single/SingleAxis.js | 2 +-
src/coord/single/prepareCustom.js | 2 +-
src/coord/single/singleAxisHelper.js | 2 +-
src/data/DataDimensionInfo.js | 2 +-
src/data/Graph.js | 2 +-
src/data/List.js | 2 +-
src/data/OrdinalMeta.js | 2 +-
src/data/Source.js | 2 +-
src/data/Tree.js | 2 +-
src/data/helper/completeDimensions.js | 2 +-
src/data/helper/dataProvider.js | 2 +-
src/data/helper/dataStackHelper.js | 2 +-
src/data/helper/dimensionHelper.js | 2 +-
src/data/helper/linkList.js | 2 +-
src/data/helper/sourceHelper.js | 2 +-
src/echarts.js | 14 +-
src/export.js | 12 +-
src/helper.js | 2 +-
src/layout/barGrid.js | 2 +-
src/layout/barPolar.js | 2 +-
src/layout/points.js | 2 +-
src/loading/default.js | 2 +-
src/model/Component.js | 2 +-
src/model/Global.js | 2 +-
src/model/Model.js | 4 +-
src/model/OptionManager.js | 2 +-
src/model/Series.js | 4 +-
src/model/mixin/makeStyleMapper.js | 2 +-
src/model/mixin/textStyle.js | 2 +-
src/model/referHelper.js | 2 +-
src/preprocessor/backwardCompat.js | 2 +-
src/preprocessor/helper/compatStyle.js | 2 +-
src/processor/dataStack.js | 2 +-
src/scale/Log.js | 2 +-
src/scale/Ordinal.js | 2 +-
src/scale/Time.js | 2 +-
src/stream/Scheduler.js | 2 +-
src/stream/task.js | 2 +-
src/util/animation.js | 2 +-
src/util/clazz.js | 2 +-
src/util/component.js | 2 +-
src/util/format.js | 6 +-
src/util/graphic.js | 62 +-
src/util/layout.js | 4 +-
src/util/model.js | 4 +-
src/util/number.js | 2 +-
src/util/symbol.js | 6 +-
src/view/Chart.js | 4 +-
src/view/Component.js | 2 +-
src/visual/VisualMapping.js | 4 +-
src/visual/aria.js | 2 +-
src/visual/dataColor.js | 2 +-
src/visual/seriesColor.js | 4 +-
src/visual/symbol.js | 2 +-
src/visual/visualDefault.js | 2 +-
src/visual/visualSolution.js | 2 +-
test/force2.html | 2 +-
278 files changed, 1433 insertions(+), 399 deletions(-)
diff --git a/build/addHeader.js b/build/addHeader.js
index 1599ffc..d5b614c 100644
--- a/build/addHeader.js
+++ b/build/addHeader.js
@@ -21,7 +21,7 @@
const fs = require('fs');
const preamble = require('./preamble');
const pathTool = require('path');
-const {color} = require('zrender/build/helper');
+const {color} = require('./helper');
// In the `.headerignore`, each line is a pattern in RegExp.
// all relative path (based on the echarts base directory) is tested.
diff --git a/build/babel-plugin-transform-modules-commonjs-ec.js b/build/babel-plugin-transform-modules-commonjs-ec.js
new file mode 100644
index 0000000..70259e6
--- /dev/null
+++ b/build/babel-plugin-transform-modules-commonjs-ec.js
@@ -0,0 +1,736 @@
+/**
+ * Both used by zrender and echarts.
+ */
+
+const assert = require('assert');
+const nodePath = require('path');
+const basename = nodePath.basename;
+const extname = nodePath.extname;
+
+const babelTypes = require('@babel/types');
+const babelTemplate = require('@babel/template');
+
+const helperModuleTransforms = require('@babel/helper-module-transforms');
+const isModule = helperModuleTransforms.isModule;
+const isSideEffectImport = helperModuleTransforms.isSideEffectImport;
+const ensureStatementsHoisted = helperModuleTransforms.ensureStatementsHoisted;
+
+
+module.exports = function ({types, template}, options) {
+ return {
+ visitor: {
+ Program: {
+ exit(path) {
+ // For now this requires unambiguous rather that just sourceType
+ // because Babel currently parses all files as sourceType:module.
+ if (!isModule(path, true /* requireUnambiguous */)) {
+ return;
+ }
+
+ // Rename the bindings auto-injected into the scope so there is no
+ // risk of conflict between the bindings.
+ path.scope.rename('exports');
+ path.scope.rename('module');
+ path.scope.rename('require');
+ path.scope.rename('__filename');
+ path.scope.rename('__dirname');
+
+ const meta = rewriteModuleStatementsAndPrepare(path);
+
+ let headers = [];
+ let tails = [];
+ const checkExport = createExportChecker();
+
+ for (const [source, metadata] of meta.source) {
+ headers.push(...buildRequireStatements(types, source, metadata));
+ headers.push(...buildNamespaceInitStatements(meta, metadata, checkExport));
+ }
+
+ tails.push(...buildLocalExportStatements(meta, checkExport));
+
+ ensureStatementsHoisted(headers);
+ // FIXME ensure tail?
+
+ path.unshiftContainer('body', headers);
+ path.pushContainer('body', tails);
+
+ checkAssignOrUpdateExport(path, meta);
+ }
+ }
+ }
+ };
+};
+
+
+/**
+ * Remove all imports and exports from the file, and return all metadata
+ * needed to reconstruct the module's behavior.
+ * @return {ModuleMetadata}
+ */
+function normalizeModuleAndLoadMetadata(programPath) {
+
+ nameAnonymousExports(programPath);
+
+ const {local, source} = getModuleMetadata(programPath);
+
+ removeModuleDeclarations(programPath);
+
+ // Reuse the imported namespace name if there is one.
+ for (const [, metadata] of source) {
+ if (metadata.importsNamespace.size > 0) {
+ // This is kind of gross. If we stop using `loose: true` we should
+ // just make this destructuring assignment.
+ metadata.name = metadata.importsNamespace.values().next().value;
+ }
+ }
+
+ return {
+ exportName: 'exports',
+ exportNameListName: null,
+ local,
+ source
+ };
+}
+
+/**
+ * Get metadata about the imports and exports present in this module.
+ */
+function getModuleMetadata(programPath) {
+ const localData = getLocalExportMetadata(programPath);
+
+ const sourceData = new Map();
+ const getData = sourceNode => {
+ const source = sourceNode.value;
+
+ let data = sourceData.get(source);
+ if (!data) {
+ data = {
+ name: programPath.scope.generateUidIdentifier(
+ basename(source, extname(source))
+ ).name,
+
+ interop: 'none',
+
+ loc: null,
+
+ // Data about the requested sources and names.
+ imports: new Map(),
+ // importsNamespace: import * as util from './a/b/util';
+ importsNamespace: new Set(),
+
+ // Metadata about data that is passed directly from source to export.
+ reexports: new Map(),
+ reexportNamespace: new Set(),
+ reexportAll: null,
+ };
+ sourceData.set(source, data);
+ }
+ return data;
+ };
+
+ programPath.get('body').forEach(child => {
+ if (child.isImportDeclaration()) {
+ const data = getData(child.node.source);
+ if (!data.loc) {
+ data.loc = child.node.loc;
+ }
+
+ child.get('specifiers').forEach(spec => {
+ if (spec.isImportDefaultSpecifier()) {
+ const localName = spec.get('local').node.name;
+
+ data.imports.set(localName, 'default');
+
+ const reexport = localData.get(localName);
+ if (reexport) {
+ localData.delete(localName);
+
+ reexport.names.forEach(name => {
+ data.reexports.set(name, 'default');
+ });
+ }
+ }
+ else if (spec.isImportNamespaceSpecifier()) {
+ const localName = spec.get('local').node.name;
+
+ assert(
+ data.importsNamespace.size === 0,
+ `Duplicate import namespace: ${localName}`
+ );
+ data.importsNamespace.add(localName);
+
+ const reexport = localData.get(localName);
+ if (reexport) {
+ localData.delete(localName);
+
+ reexport.names.forEach(name => {
+ data.reexportNamespace.add(name);
+ });
+ }
+ }
+ else if (spec.isImportSpecifier()) {
+ const importName = spec.get('imported').node.name;
+ const localName = spec.get('local').node.name;
+
+ data.imports.set(localName, importName);
+
+ const reexport = localData.get(localName);
+ if (reexport) {
+ localData.delete(localName);
+
+ reexport.names.forEach(name => {
+ data.reexports.set(name, importName);
+ });
+ }
+ }
+ });
+ }
+ else if (child.isExportAllDeclaration()) {
+ const data = getData(child.node.source);
+ if (!data.loc) {
+ data.loc = child.node.loc;
+ }
+
+ data.reexportAll = {
+ loc: child.node.loc,
+ };
+ }
+ else if (child.isExportNamedDeclaration() && child.node.source) {
+ const data = getData(child.node.source);
+ if (!data.loc) {
+ data.loc = child.node.loc;
+ }
+
+ child.get('specifiers').forEach(spec => {
+ if (!spec.isExportSpecifier()) {
+ throw spec.buildCodeFrameError('Unexpected export specifier type');
+ }
+ const importName = spec.get('local').node.name;
+ const exportName = spec.get('exported').node.name;
+
+ data.reexports.set(exportName, importName);
+
+ if (exportName === '__esModule') {
+ throw exportName.buildCodeFrameError('Illegal export "__esModule".');
+ }
+ });
+ }
+ });
+
+ for (const metadata of sourceData.values()) {
+ if (metadata.importsNamespace.size > 0) {
+ metadata.interop = 'namespace';
+ continue;
+ }
+ let needsDefault = false;
+ let needsNamed = false;
+ for (const importName of metadata.imports.values()) {
+ if (importName === 'default') {
+ needsDefault = true;
+ }
+ else {
+ needsNamed = true;
+ }
+ }
+ for (const importName of metadata.reexports.values()) {
+ if (importName === 'default') {
+ needsDefault = true;
+ }
+ else {
+ needsNamed = true;
+ }
+ }
+
+ if (needsDefault && needsNamed) {
+ // TODO(logan): Using the namespace interop here is unfortunate. Revisit.
+ metadata.interop = 'namespace';
+ }
+ else if (needsDefault) {
+ metadata.interop = 'default';
+ }
+ }
+
+ return {
+ local: localData,
+ source: sourceData,
+ };
+}
+
+/**
+ * Get metadata about local variables that are exported.
+ * @return {Map<string, LocalExportMetadata>}
+ */
+function getLocalExportMetadata(programPath){
+ const bindingKindLookup = new Map();
+
+ programPath.get('body').forEach(child => {
+ let kind;
+ if (child.isImportDeclaration()) {
+ kind = 'import';
+ }
+ else {
+ if (child.isExportDefaultDeclaration()) {
+ child = child.get('declaration');
+ }
+ if (child.isExportNamedDeclaration() && child.node.declaration) {
+ child = child.get('declaration');
+ }
+
+ if (child.isFunctionDeclaration()) {
+ kind = 'hoisted';
+ }
+ else if (child.isClassDeclaration()) {
+ kind = 'block';
+ }
+ else if (child.isVariableDeclaration({ kind: 'var' })) {
+ kind = 'var';
+ }
+ else if (child.isVariableDeclaration()) {
+ kind = 'block';
+ }
+ else {
+ return;
+ }
+ }
+
+ Object.keys(child.getOuterBindingIdentifiers()).forEach(name => {
+ bindingKindLookup.set(name, kind);
+ });
+ });
+
+ const localMetadata = new Map();
+ const getLocalMetadata = idPath => {
+ const localName = idPath.node.name;
+ let metadata = localMetadata.get(localName);
+ if (!metadata) {
+ const kind = bindingKindLookup.get(localName);
+
+ if (kind === undefined) {
+ throw idPath.buildCodeFrameError(`Exporting local "${localName}", which is not declared.`);
+ }
+
+ metadata = {
+ names: [],
+ kind,
+ };
+ localMetadata.set(localName, metadata);
+ }
+ return metadata;
+ };
+
+ programPath.get('body').forEach(child => {
+ if (child.isExportNamedDeclaration() && !child.node.source) {
+ if (child.node.declaration) {
+ const declaration = child.get('declaration');
+ const ids = declaration.getOuterBindingIdentifierPaths();
+ Object.keys(ids).forEach(name => {
+ if (name === '__esModule') {
+ throw declaration.buildCodeFrameError('Illegal export "__esModule".');
+ }
+
+ getLocalMetadata(ids[name]).names.push(name);
+ });
+ }
+ else {
+ child.get('specifiers').forEach(spec => {
+ const local = spec.get('local');
+ const exported = spec.get('exported');
+
+ if (exported.node.name === '__esModule') {
+ throw exported.buildCodeFrameError('Illegal export "__esModule".');
+ }
+
+ getLocalMetadata(local).names.push(exported.node.name);
+ });
+ }
+ }
+ else if (child.isExportDefaultDeclaration()) {
+ const declaration = child.get('declaration');
+ if (
+ declaration.isFunctionDeclaration() ||
+ declaration.isClassDeclaration()
+ ) {
+ getLocalMetadata(declaration.get('id')).names.push('default');
+ }
+ else {
+ // These should have been removed by the nameAnonymousExports() call.
+ throw declaration.buildCodeFrameError('Unexpected default expression export.');
+ }
+ }
+ });
+
+ return localMetadata;
+}
+
+/**
+ * Ensure that all exported values have local binding names.
+ */
+function nameAnonymousExports(programPath) {
+ // Name anonymous exported locals.
+ programPath.get('body').forEach(child => {
+ if (!child.isExportDefaultDeclaration()) {
+ return;
+ }
+
+ // export default foo;
+ const declaration = child.get('declaration');
+ if (declaration.isFunctionDeclaration()) {
+ if (!declaration.node.id) {
+ declaration.node.id = declaration.scope.generateUidIdentifier('default');
+ }
+ }
+ else if (declaration.isClassDeclaration()) {
+ if (!declaration.node.id) {
+ declaration.node.id = declaration.scope.generateUidIdentifier('default');
+ }
+ }
+ else {
+ const id = declaration.scope.generateUidIdentifier('default');
+ const namedDecl = babelTypes.exportNamedDeclaration(null, [
+ babelTypes.exportSpecifier(babelTypes.identifier(id.name), babelTypes.identifier('default')),
+ ]);
+ namedDecl._blockHoist = child.node._blockHoist;
+
+ const varDecl = babelTypes.variableDeclaration('var', [
+ babelTypes.variableDeclarator(id, declaration.node),
+ ]);
+ varDecl._blockHoist = child.node._blockHoist;
+
+ child.replaceWithMultiple([namedDecl, varDecl]);
+ }
+ });
+}
+
+function removeModuleDeclarations(programPath) {
+ programPath.get('body').forEach(child => {
+ if (child.isImportDeclaration()) {
+ child.remove();
+ }
+ else if (child.isExportNamedDeclaration()) {
+ if (child.node.declaration) {
+ child.node.declaration._blockHoist = child.node._blockHoist;
+ child.replaceWith(child.node.declaration);
+ }
+ else {
+ child.remove();
+ }
+ }
+ else if (child.isExportDefaultDeclaration()) {
+ // export default foo;
+ const declaration = child.get('declaration');
+ if (
+ declaration.isFunctionDeclaration() ||
+ declaration.isClassDeclaration()
+ ) {
+ declaration._blockHoist = child.node._blockHoist;
+ child.replaceWith(declaration);
+ }
+ else {
+ // These should have been removed by the nameAnonymousExports() call.
+ throw declaration.buildCodeFrameError('Unexpected default expression export.');
+ }
+ }
+ else if (child.isExportAllDeclaration()) {
+ child.remove();
+ }
+ });
+}
+
+
+
+
+
+
+
+
+/**
+ * Perform all of the generic ES6 module rewriting needed to handle initial
+ * module processing. This function will rewrite the majority of the given
+ * program to reference the modules described by the returned metadata,
+ * and returns a list of statements for use when initializing the module.
+ */
+function rewriteModuleStatementsAndPrepare(path) {
+ path.node.sourceType = 'script';
+
+ const meta = normalizeModuleAndLoadMetadata(path);
+
+ return meta;
+}
+
+/**
+ * Create the runtime initialization statements for a given requested source.
+ * These will initialize all of the runtime import/export logic that
+ * can't be handled statically by the statements created by
+ * buildExportInitializationStatements().
+ */
+function buildNamespaceInitStatements(meta, metadata, checkExport) {
+ const statements = [];
+ const {localImportName, localImportDefaultName} = getLocalImportName(metadata);
+
+ for (const exportName of metadata.reexportNamespace) {
+ // Assign export to namespace object.
+ checkExport(exportName);
+ statements.push(buildExport({exportName, localName: localImportName}));
+ }
+
+ // Source code:
+ // import {color2 as color2Alias, color3, color4, color5} from 'xxx';
+ // export {default as b} from 'xxx';
+ // export {color2Alias};
+ // export {color3};
+ // let color5Renamed = color5
+ // export {color5Renamed};
+ // Only two entries in metadata.reexports:
+ // 'color2Alias' => 'color2'
+ // 'color3' => 'color3',
+ // 'b' => 'default'
+ //
+ // And consider:
+ // export {default as defaultAsBB} from './xx/yy';
+ // export {exportSingle} from './xx/yy';
+ // No entries in metadata.imports, and 'default' exists in metadata.reexports.
+ for (const entry of metadata.reexports.entries()) {
+ const exportName = entry[0];
+ checkExport(exportName);
+ statements.push(
+ (localImportDefaultName || entry[1] === 'default')
+ ? buildExport({exportName, localName: localImportName})
+ : buildExport({exportName, namespace: localImportName, propName: entry[1]})
+ );
+ }
+
+ if (metadata.reexportAll) {
+ const statement = buildNamespaceReexport(
+ meta,
+ metadata.name,
+ checkExport
+ );
+ statement.loc = metadata.reexportAll.loc;
+
+ // Iterate props creating getter for each prop.
+ statements.push(statement);
+ }
+
+ return statements;
+}
+
+/**
+ * Create a re-export initialization loop for a specific imported namespace.
+ */
+function buildNamespaceReexport(meta, namespace, checkExport) {
+ checkExport();
+ return babelTemplate.statement(`
+ (function() {
+ for (var key in NAMESPACE) {
+ if (NAMESPACE == null || !NAMESPACE.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;
+ VERIFY_NAME_LIST;
+ exports[key] = NAMESPACE[key];
+ }
+ })();
+ `)({
+ NAMESPACE: namespace,
+ VERIFY_NAME_LIST: meta.exportNameListName
+ ? babelTemplate.statement(`
+ if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;
+ `)({EXPORTS_LIST: meta.exportNameListName})
+ : null
+ });
+}
+
+function buildRequireStatements(types, source, metadata) {
+ let headers = [];
+
+ const loadExpr = types.callExpression(
+ types.identifier('require'),
+ // replace `require('./src/xxx')` to `require('./lib/xxx')`
+ // for echarts and zrender in old npm or webpack.
+ [types.stringLiteral(source.replace('/src/', '/lib/'))]
+ );
+
+ // side effect import: import 'xxx';
+ if (isSideEffectImport(metadata)) {
+ let header = types.expressionStatement(loadExpr);
+ header.loc = metadata.loc;
+ headers.push(header);
+ }
+ else {
+ const {localImportName, localImportDefaultName} = getLocalImportName(metadata);
+
+ let reqHeader = types.variableDeclaration('var', [
+ types.variableDeclarator(
+ types.identifier(localImportName),
+ loadExpr
+ )
+ ]);
+
+ reqHeader.loc = metadata.loc;
+ headers.push(reqHeader);
+
+ if (!localImportDefaultName) {
+ // src:
+ // import {someInZrUtil1 as someInZrUtil1Alias, zz} from 'zrender/core/util';
+ // metadata.imports:
+ // Map { 'someInZrUtil1Alias' => 'someInZrUtil1', 'zz' => 'zz' }
+ for (const importEntry of metadata.imports) {
+ headers.push(
+ babelTemplate.statement(`var IMPORTNAME = NAMESPACE.PROPNAME;`)({
+ NAMESPACE: localImportName,
+ IMPORTNAME: importEntry[0],
+ PROPNAME: importEntry[1]
+ })
+ );
+ }
+ }
+ }
+
+ return headers;
+}
+
+function getLocalImportName(metadata) {
+ const localImportDefaultName = getDefaultName(metadata.imports);
+
+ assert(
+ !localImportDefaultName || metadata.imports.size === 1,
+ 'Forbiden that both import default and others.'
+ );
+
+ return {
+ localImportName: localImportDefaultName || metadata.name,
+ localImportDefaultName
+ };
+}
+
+function getDefaultName(map) {
+ for (const entry of map) {
+ if (entry[1] === 'default') {
+ return entry[0];
+ }
+ }
+}
+
+function buildLocalExportStatements(meta, checkExport) {
+ let tails = [];
+
+ // All local export, for example:
+ // Map {
+ // 'localVarMame' => {
+ // names: [ 'exportName1', 'exportName2' ],
+ // kind: 'var'
+ // },
+ for (const localEntry of meta.local) {
+ for (const exportName of localEntry[1].names) {
+ checkExport(exportName);
+ tails.push(buildExport({exportName, localName: localEntry[0]}));
+ }
+ }
+
+ return tails;
+}
+
+function createExportChecker() {
+ let someHasBeenExported;
+ return function checkExport(exportName) {
+ assert(
+ !someHasBeenExported || exportName !== 'default',
+ `Forbiden that both export default and others.`
+ );
+ someHasBeenExported = true;
+ };
+}
+
+function buildExport({exportName, namespace, propName, localName}) {
+ const exportDefault = exportName === 'default';
+
+ const head = exportDefault ? 'module.exports' : `exports.${exportName}`;
+
+ let opt = {};
+ // FIXME
+ // Does `PRIORITY`, `LOCATION_PARAMS` recognised as babel-template placeholder?
+ // We have to do this for workaround temporarily.
+ if (/^[A-Z0-9_]+$/.test(localName)) {
+ opt[localName] = localName;
+ }
+
+ return babelTemplate.statement(
+ localName
+ ? `${head} = ${localName};`
+ : `${head} = ${namespace}.${propName};`
+ )(opt);
+}
+
+/**
+ * Consider this case:
+ * export var a;
+ * function inject(b) {
+ * a = b;
+ * }
+ * It will be transpiled to:
+ * var a;
+ * exports.a = 1;
+ * function inject(b) {
+ * a = b;
+ * }
+ * That is a wrong transpilation, because the `export.a` will not
+ * be assigned as `b` when `inject` called.
+ * Of course, it can be transpiled correctly as:
+ * var _locals = {};
+ * var a;
+ * Object.defineProperty(exports, 'a', {
+ * get: function () { return _locals[a]; }
+ * };
+ * exports.a = a;
+ * function inject(b) {
+ * _locals[a] = b;
+ * }
+ * But it is not ES3 compatible.
+ * So we just forbiden this usage here.
+ */
+function checkAssignOrUpdateExport(programPath, meta) {
+
+ let visitor = {
+ // Include:
+ // `a++;` (no `path.get('left')`)
+ // `x += 1212`;
+ UpdateExpression: {
+ exit: function exit(path, scope) {
+ // console.log(arguments);
+ let left = path.get('left');
+ if (left && left.isIdentifier()) {
+ asertNotAssign(path, left.node.name);
+ }
+ }
+ },
+ // Include:
+ // `x = 5;` (`x` is an identifier.)
+ // `c.d = 3;` (but `c.d` is not an identifier.)
+ // `y = function () {}`
+ // Exclude:
+ // `var x = 121;`
+ // `export var x = 121;`
+ AssignmentExpression: {
+ exit: function exit(path) {
+ let left = path.get('left');
+ if (left.isIdentifier()) {
+ asertNotAssign(path, left.node.name);
+ }
+ }
+ }
+ };
+
+ function asertNotAssign(path, localName) {
+ // Ignore variables that is not in global scope.
+ if (programPath.scope.getBinding(localName) !== path.scope.getBinding(localName)) {
+ return;
+ }
+ for (const localEntry of meta.local) {
+ assert(
+ localName !== localEntry[0],
+ `An exported variable \`${localEntry[0]}\` is forbiden to be assigned.`
+ );
+ }
+ }
+
+ programPath.traverse(visitor);
+}
+
+
diff --git a/build/babel-plugin-transform-remove-dev.js b/build/babel-plugin-transform-remove-dev.js
new file mode 100644
index 0000000..035b8ee
--- /dev/null
+++ b/build/babel-plugin-transform-remove-dev.js
@@ -0,0 +1,33 @@
+/**
+ * Both used by zrender and echarts.
+ */
+
+module.exports = function ({types, template}, options) {
+ return {
+ visitor: {
+ IfStatement: {
+ exit(path) {
+ removeDEV(path);
+ }
+ }
+ }
+ };
+};
+
+module.exports.recheckDEV = function (code) {
+ let result = code.match(/.if\s*\([^()]*__DEV__/);
+ if (result
+ && result[0].indexOf('`if') < 0
+ && result[0].indexOf('if (typeof __DEV__') < 0
+ ) {
+ throw new Error('__DEV__ is not removed.');
+ }
+};
+
+function removeDEV(path) {
+ if (path.node.test.name === '__DEV__') {
+ path.remove();
+ }
+}
+
+
diff --git a/build/build.js b/build/build.js
index bd252a2..a8f8bac 100755
--- a/build/build.js
+++ b/build/build.js
@@ -24,10 +24,10 @@ const fs = require('fs');
const {resolve} = require('path');
const config = require('./config.js');
const commander = require('commander');
-const {build, watch, color} = require('zrender/build/helper');
+const {build, watch, color} = require('./helper');
const ecLangPlugin = require('./rollup-plugin-ec-lang');
const prePublish = require('./pre-publish');
-const recheckDEV = require('zrender/build/babel-plugin-transform-remove-dev').recheckDEV;
+const recheckDEV = require('./babel-plugin-transform-remove-dev').recheckDEV;
function run() {
diff --git a/build/helper.js b/build/helper.js
new file mode 100644
index 0000000..e580770
--- /dev/null
+++ b/build/helper.js
@@ -0,0 +1,265 @@
+/**
+ * Both used by zrender and echarts.
+ */
+
+const assert = require('assert');
+const rollup = require('rollup');
+const path = require('path');
+const fs = require('fs');
+const fsExtra = require('fs-extra');
+const babel = require('@babel/core');
+const esm2cjsPlugin = require('./babel-plugin-transform-modules-commonjs-ec');
+const removeDEVPlugin = require('./babel-plugin-transform-remove-dev');
+
+/**
+ * @param {Array.<Object>} configs A list of rollup configs:
+ * See: <https://rollupjs.org/#big-list-of-options>
+ * For example:
+ * [
+ * {
+ * ...inputOptions,
+ * output: [outputOptions],
+ * watch: {chokidar, include, exclude}
+ * },
+ * ...
+ * ]
+ * @return {Promise}
+ */
+exports.build = function (configs) {
+ return new Promise(function (promiseResolve, promiseReject) {
+ let index = 0;
+
+ buildSingle();
+
+ function buildSingle() {
+ let singleConfig = configs[index++];
+
+ if (!singleConfig) {
+ promiseResolve();
+ return;
+ }
+
+ console.log(
+ color('fgCyan', 'dim')('\nBundles '),
+ color('fgCyan')(singleConfig.input),
+ color('fgCyan', 'dim')('=>'),
+ color('fgCyan')(singleConfig.output.file),
+ color('fgCyan', 'dim')(' ...')
+ );
+
+ rollup
+ .rollup(singleConfig)
+ .then(function (bundle) {
+ return bundle.write(singleConfig.output);
+ })
+ .then(function () {
+ console.log(
+ color('fgGreen', 'dim')('Created '),
+ color('fgGreen')(singleConfig.output.file),
+ color('fgGreen', 'dim')(' successfully.')
+ );
+ buildSingle();
+ })
+ .catch(function (err) {
+ console.log(color('fgRed')(err));
+ promiseReject();
+ });
+ }
+ });
+};
+
+/**
+ * @param {Object} singleConfig A single rollup config:
+ * See: <https://rollupjs.org/#big-list-of-options>
+ * For example:
+ * {
+ * ...inputOptions,
+ * output: [outputOptions],
+ * watch: {chokidar, include, exclude}
+ * }
+ */
+exports.watch = function (singleConfig) {
+ let watcher = rollup.watch(singleConfig);
+
+ watcher.on('event', function (event) {
+ // event.code can be one of:
+ // START — the watcher is (re)starting
+ // BUNDLE_START — building an individual bundle
+ // BUNDLE_END — finished building a bundle
+ // END — finished building all bundles
+ // ERROR — encountered an error while bundling
+ // FATAL — encountered an unrecoverable error
+ if (event.code !== 'START' && event.code !== 'END') {
+ console.log(
+ color('fgBlue')('[' + getTimeString() + ']'),
+ color('dim')('build'),
+ event.code.replace(/_/g, ' ').toLowerCase()
+ );
+ }
+ if (event.code === 'ERROR' || event.code === 'FATAL') {
+ printCodeError(event.error);
+ }
+ if (event.code === 'BUNDLE_END') {
+ printWatchResult(event);
+ }
+ });
+};
+
+/**
+ * @param {string} srcDir Absolute directory path.
+ * @param {Function} [cb] Params: {
+ * fileName: like 'some.js', without dir path.
+ * relativePath: relative to srcDir.
+ * absolutePath
+ * }
+ */
+exports.travelSrcDir = function (srcDir, cb) {
+ assert(fs.statSync(srcDir).isDirectory());
+
+ const regDir = /^[^.].*$/;
+ const regSrc = /^[^.].*[.]js$/;
+
+ doTravelSrcDir('.');
+
+ function doTravelSrcDir(relativePath) {
+ const absolutePath = path.resolve(srcDir, relativePath);
+
+ fs.readdirSync(absolutePath).forEach(fileName => {
+ const childAbsolutePath = path.resolve(absolutePath, fileName);
+ const stat = fs.statSync(childAbsolutePath);
+ if (stat.isDirectory()) {
+ if (regDir.test(fileName)) {
+ doTravelSrcDir(path.join(relativePath, fileName));
+ }
+ }
+ else if (stat.isFile()) {
+ if (regSrc.test(fileName)) {
+ cb({fileName, relativePath, absolutePath: childAbsolutePath});
+ }
+ }
+ });
+ }
+};
+
+
+/**
+ * @param {string} [opt]
+ * @param {string} [opt.inputPath] Absolute input path.
+ * @param {string} [opt.outputPath] Absolute output path.
+ * @param {string} [opt.preamble]
+ * @param {Function} [opt.transform]
+ * @param {Function} [opt.reserveDEV]
+ */
+exports.prePulishSrc = function ({inputPath, outputPath, preamble, transform, reserveDEV}) {
+ assert(inputPath && outputPath);
+
+ console.log(
+ color('fgGreen', 'dim')('[transform] '),
+ color('fgGreen')(inputPath),
+ color('fgGreen', 'dim')('...')
+ );
+
+ let plugins = [];
+
+ !reserveDEV && plugins.push(removeDEVPlugin);
+ plugins.push(esm2cjsPlugin);
+
+ let {code} = babel.transformFileSync(inputPath, {
+ plugins: plugins
+ });
+
+ !reserveDEV && removeDEVPlugin.recheckDEV(code);
+
+ if (transform) {
+ code = transform({code, inputPath, outputPath});
+ }
+
+ if (preamble) {
+ code = preamble + code;
+ }
+
+ fsExtra.ensureFileSync(outputPath);
+ fs.writeFileSync(outputPath, code, {encoding:'utf-8'});
+};
+
+function printWatchResult(event) {
+ console.log(
+ color('fgGreen', 'dim')('Created'),
+ color('fgGreen')(event.output.join(', ')),
+ color('fgGreen', 'dim')('in'),
+ color('fgGreen')(event.duration),
+ color('fgGreen', 'dim')('ms.')
+ );
+}
+
+function printCodeError(error) {
+ console.log('\n' + color()(error.code));
+ if (error.code === 'PARSE_ERROR') {
+ console.log(
+ color()('line'),
+ color('fgCyan')(error.loc.line),
+ color()('column'),
+ color('fgCyan')(error.loc.column),
+ color()('in'),
+ color('fgCyan')(error.loc.file)
+ );
+ }
+ if (error.frame) {
+ console.log('\n' + color('fgRed')(error.frame));
+ }
+ console.log(color('dim')('\n' + error.stack));
+}
+
+function getTimeString() {
+ return (new Date()).toLocaleString();
+}
+
+const COLOR_RESET = '\x1b[0m';
+const COLOR_MAP = {
+ bright: '\x1b[1m',
+ dim: '\x1b[2m',
+ underscore: '\x1b[4m',
+ blink: '\x1b[5m',
+ reverse: '\x1b[7m',
+ hidden: '\x1b[8m',
+
+ fgBlack: '\x1b[30m',
+ fgRed: '\x1b[31m',
+ fgGreen: '\x1b[32m',
+ fgYellow: '\x1b[33m',
+ fgBlue: '\x1b[34m',
+ fgMagenta: '\x1b[35m',
+ fgCyan: '\x1b[36m',
+ fgWhite: '\x1b[37m',
+
+ bgBlack: '\x1b[40m',
+ bgRed: '\x1b[41m',
+ bgGreen: '\x1b[42m',
+ bgYellow: '\x1b[43m',
+ bgBlue: '\x1b[44m',
+ bgMagenta: '\x1b[45m',
+ bgCyan: '\x1b[46m',
+ bgWhite: '\x1b[47m'
+};
+
+/**
+ * Print colored text with `console.log`.
+ *
+ * Usage:
+ * let color = require('colorConsole');
+ * color('fgCyan')('some text'); // cyan text.
+ * color('fgCyan', 'bright')('some text'); // bright cyan text.
+ * color('fgCyan', 'bgRed')('some text') // cyan text and red background.
+ */
+let color = exports.color = function () {
+ let prefix = [];
+ for (let i = 0; i < arguments.length; i++) {
+ let color = COLOR_MAP[arguments[i]];
+ color && prefix.push(color);
+ }
+ prefix = prefix.join('');
+
+ return function (text) {
+ return prefix + text + COLOR_RESET;
+ };
+};
diff --git a/build/pre-publish.js b/build/pre-publish.js
index 3b87cdb..16bf34e 100644
--- a/build/pre-publish.js
+++ b/build/pre-publish.js
@@ -26,7 +26,7 @@
const path = require('path');
const fsExtra = require('fs-extra');
-const {color, travelSrcDir, prePulishSrc} = require('zrender/build/helper');
+const {color, travelSrcDir, prePulishSrc} = require('./helper');
const ecDir = path.resolve(__dirname, '..');
const srcDir = path.resolve(__dirname, '../src');
diff --git a/build/rollup-plugin-ec-remove-dev.js b/build/rollup-plugin-ec-remove-dev.js
index a38ebbb..b394a46 100644
--- a/build/rollup-plugin-ec-remove-dev.js
+++ b/build/rollup-plugin-ec-remove-dev.js
@@ -32,7 +32,7 @@
*/
const babel = require('@babel/core');
-const removeDEVPlugin = require('zrender/build/babel-plugin-transform-remove-dev');
+const removeDEVPlugin = require('./babel-plugin-transform-remove-dev');
/**
* @param {Object} [opt]
diff --git a/echarts.all.js b/echarts.all.js
index f801b1d..4906da2 100644
--- a/echarts.all.js
+++ b/echarts.all.js
@@ -267,7 +267,7 @@ import './src/component/visualMapPiecewise';
// Provide IE 6,7,8 compatibility.
-import 'zrender/src/vml/vml';
+// import 'zrender/src/vml/vml';
// Render via SVG rather than canvas.
-import 'zrender/src/svg/svg';
+import 'zrender/esm/svg/svg';
diff --git a/echarts.common.js b/echarts.common.js
index 224b026..f7631e6 100644
--- a/echarts.common.js
+++ b/echarts.common.js
@@ -40,5 +40,5 @@ import './src/component/markArea';
import './src/component/dataZoom';
import './src/component/toolbox';
-import 'zrender/src/vml/vml';
-import 'zrender/src/svg/svg';
\ No newline at end of file
+// import 'zrender/src/vml/vml';
+import 'zrender/esm/svg/svg';
\ No newline at end of file
diff --git a/index.common.js b/index.common.js
index 28b776d..2dfcac5 100644
--- a/index.common.js
+++ b/index.common.js
@@ -68,6 +68,6 @@ require("./lib/component/dataZoom");
require("./lib/component/toolbox");
-require("zrender/lib/vml/vml");
+// require("zrender/lib/vml/vml");
require("zrender/lib/svg/svg");
\ No newline at end of file
diff --git a/index.js b/index.js
index 842d8cd..2e9522a 100644
--- a/index.js
+++ b/index.js
@@ -130,6 +130,6 @@ require("./lib/component/visualMapContinuous");
require("./lib/component/visualMapPiecewise");
-require("zrender/lib/vml/vml");
+// require("zrender/lib/vml/vml");
require("zrender/lib/svg/svg");
\ No newline at end of file
diff --git a/src/CoordinateSystem.js b/src/CoordinateSystem.js
index cec2173..37c211f 100644
--- a/src/CoordinateSystem.js
+++ b/src/CoordinateSystem.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
var coordinateSystemCreators = {};
diff --git a/src/ExtensionAPI.js b/src/ExtensionAPI.js
index 80b552e..dac9941 100644
--- a/src/ExtensionAPI.js
+++ b/src/ExtensionAPI.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
var echartsAPIList = [
'getDom', 'getZr', 'getWidth', 'getHeight', 'getDevicePixelRatio', 'dispatchAction', 'isDisposed',
diff --git a/src/action/createDataSelectAction.js b/src/action/createDataSelectAction.js
index a628bcc..6c13e45 100644
--- a/src/action/createDataSelectAction.js
+++ b/src/action/createDataSelectAction.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 8824610..66aa745 100644
--- a/src/action/geoRoam.js
+++ b/src/action/geoRoam.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {updateCenterAndZoom} from './roamHelper';
/**
diff --git a/src/chart/bar.js b/src/chart/bar.js
index db4bbef..c334c7c 100644
--- a/src/chart/bar.js
+++ b/src/chart/bar.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {layout, largeLayout} from '../layout/barGrid';
import '../coord/cartesian/Grid';
diff --git a/src/chart/bar/BarView.js b/src/chart/bar/BarView.js
index 18c5e2a..4b8f10b 100644
--- a/src/chart/bar/BarView.js
+++ b/src/chart/bar/BarView.js
@@ -19,13 +19,13 @@
import {__DEV__} from '../../config';
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as graphic from '../../util/graphic';
import {setLabel} from './helper';
import Model from '../../model/Model';
import barItemStyle from './barItemStyle';
-import Path from 'zrender/src/graphic/Path';
-import Group from 'zrender/src/container/Group';
+import Path from 'zrender/esm/graphic/Path';
+import Group from 'zrender/esm/container/Group';
import {throttle} from '../../util/throttle';
import {createClipPath} from '../helper/createClipPathFromCoordSys';
import Sausage from '../../util/shape/sausage';
diff --git a/src/chart/bar/PictorialBarView.js b/src/chart/bar/PictorialBarView.js
index 0ac9a31..0fd670f 100644
--- a/src/chart/bar/PictorialBarView.js
+++ b/src/chart/bar/PictorialBarView.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 934c92a..2f52008 100644
--- a/src/chart/boxplot/BoxplotSeries.js
+++ b/src/chart/boxplot/BoxplotSeries.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 ca30985..b5f4b32 100644
--- a/src/chart/boxplot/BoxplotView.js
+++ b/src/chart/boxplot/BoxplotView.js
@@ -17,10 +17,10 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import ChartView from '../../view/Chart';
import * as graphic from '../../util/graphic';
-import Path from 'zrender/src/graphic/Path';
+import Path from 'zrender/esm/graphic/Path';
// Update common properties
var NORMAL_ITEM_STYLE_PATH = ['itemStyle'];
diff --git a/src/chart/boxplot/boxplotLayout.js b/src/chart/boxplot/boxplotLayout.js
index ce56bb9..ef48a23 100644
--- a/src/chart/boxplot/boxplotLayout.js
+++ b/src/chart/boxplot/boxplotLayout.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 4276643..991a8fe 100644
--- a/src/chart/candlestick/CandlestickSeries.js
+++ b/src/chart/candlestick/CandlestickSeries.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 de5f19e..e4599bf 100644
--- a/src/chart/candlestick/CandlestickView.js
+++ b/src/chart/candlestick/CandlestickView.js
@@ -17,10 +17,10 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import ChartView from '../../view/Chart';
import * as graphic from '../../util/graphic';
-import Path from 'zrender/src/graphic/Path';
+import Path from 'zrender/esm/graphic/Path';
import {createClipPath} from '../helper/createClipPathFromCoordSys';
var NORMAL_ITEM_STYLE_PATH = ['itemStyle'];
diff --git a/src/chart/candlestick/candlestickLayout.js b/src/chart/candlestick/candlestickLayout.js
index 9cdd3d6..98c04cb 100644
--- a/src/chart/candlestick/candlestickLayout.js
+++ b/src/chart/candlestick/candlestickLayout.js
@@ -22,7 +22,7 @@
import {subPixelOptimize} from '../../util/graphic';
import createRenderPlanner from '../helper/createRenderPlanner';
import {parsePercent} from '../../util/number';
-import {retrieve2} from 'zrender/src/core/util';
+import {retrieve2} from 'zrender/esm/core/util';
var LargeArr = typeof Float32Array !== 'undefined' ? Float32Array : Array;
diff --git a/src/chart/candlestick/preprocessor.js b/src/chart/candlestick/preprocessor.js
index e2c2f0a..092bb31 100644
--- a/src/chart/candlestick/preprocessor.js
+++ b/src/chart/candlestick/preprocessor.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
export default function (option) {
if (!option || !zrUtil.isArray(option.series)) {
diff --git a/src/chart/chord/chordCircularLayout.js b/src/chart/chord/chordCircularLayout.js
index af16e40..768c673 100644
--- a/src/chart/chord/chordCircularLayout.js
+++ b/src/chart/chord/chordCircularLayout.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {parsePercent} from '../../util/number';
/**
diff --git a/src/chart/custom.js b/src/chart/custom.js
index c1dd8be..50affa3 100644
--- a/src/chart/custom.js
+++ b/src/chart/custom.js
@@ -18,7 +18,7 @@
*/
import {__DEV__} from '../config';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as graphicUtil from '../util/graphic';
import {getDefaultLabel} from './helper/labelHelper';
import createListFromArray from './helper/createListFromArray';
diff --git a/src/chart/effectScatter/EffectScatterView.js b/src/chart/effectScatter/EffectScatterView.js
index 6812197..86ea1f5 100644
--- a/src/chart/effectScatter/EffectScatterView.js
+++ b/src/chart/effectScatter/EffectScatterView.js
@@ -20,7 +20,7 @@
import * as echarts from '../../echarts';
import SymbolDraw from '../helper/SymbolDraw';
import EffectSymbol from '../helper/EffectSymbol';
-import * as matrix from 'zrender/src/core/matrix';
+import * as matrix from 'zrender/esm/core/matrix';
import pointsLayout from '../../layout/points';
diff --git a/src/chart/funnel/FunnelSeries.js b/src/chart/funnel/FunnelSeries.js
index d57de1f..a3763fb 100644
--- a/src/chart/funnel/FunnelSeries.js
+++ b/src/chart/funnel/FunnelSeries.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import createListSimply from '../helper/createListSimply';
import {defaultEmphasis} from '../../util/model';
import {makeSeriesEncodeForNameBased} from '../../data/helper/sourceHelper';
diff --git a/src/chart/funnel/FunnelView.js b/src/chart/funnel/FunnelView.js
index bb9a078..a7b97c4 100644
--- a/src/chart/funnel/FunnelView.js
+++ b/src/chart/funnel/FunnelView.js
@@ -18,7 +18,7 @@
*/
import * as graphic from '../../util/graphic';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import ChartView from '../../view/Chart';
/**
diff --git a/src/chart/gauge/PointerPath.js b/src/chart/gauge/PointerPath.js
index 6ac57e8..dc54a98 100644
--- a/src/chart/gauge/PointerPath.js
+++ b/src/chart/gauge/PointerPath.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import Path from 'zrender/src/graphic/Path';
+import Path from 'zrender/esm/graphic/Path';
export default Path.extend({
diff --git a/src/chart/graph/GraphSeries.js b/src/chart/graph/GraphSeries.js
index 47d9fd9..489e5a1 100644
--- a/src/chart/graph/GraphSeries.js
+++ b/src/chart/graph/GraphSeries.js
@@ -19,7 +19,7 @@
import * as echarts from '../../echarts';
import List from '../../data/List';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 8ad9aef..35cbf14 100644
--- a/src/chart/graph/GraphView.js
+++ b/src/chart/graph/GraphView.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 dc40767..4fc2b2d 100644
--- a/src/chart/graph/adjustEdge.js
+++ b/src/chart/graph/adjustEdge.js
@@ -17,8 +17,8 @@
* under the License.
*/
-import * as curveTool from 'zrender/src/core/curve';
-import * as vec2 from 'zrender/src/core/vector';
+import * as curveTool from 'zrender/esm/core/curve';
+import * as vec2 from 'zrender/esm/core/vector';
import {getSymbolSize} from './graphHelper';
var v1 = [];
diff --git a/src/chart/graph/circularLayoutHelper.js b/src/chart/graph/circularLayoutHelper.js
index 3552c62..9ff64c9 100644
--- a/src/chart/graph/circularLayoutHelper.js
+++ b/src/chart/graph/circularLayoutHelper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as vec2 from 'zrender/src/core/vector';
+import * as vec2 from 'zrender/esm/core/vector';
import {getSymbolSize, getNodeGlobalScale} from './graphHelper';
var PI = Math.PI;
diff --git a/src/chart/graph/createView.js b/src/chart/graph/createView.js
index fc65a03..347cb09 100644
--- a/src/chart/graph/createView.js
+++ b/src/chart/graph/createView.js
@@ -20,7 +20,7 @@
// FIXME Where to create the simple view coordinate system
import View from '../../coord/View';
import {getLayoutRect} from '../../util/layout';
-import * as bbox from 'zrender/src/core/bbox';
+import * as bbox from 'zrender/esm/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 a50fa58..f687680 100644
--- a/src/chart/graph/forceHelper.js
+++ b/src/chart/graph/forceHelper.js
@@ -27,7 +27,7 @@
* </licenses/LICENSE-d3>).
*/
-import * as vec2 from 'zrender/src/core/vector';
+import * as vec2 from 'zrender/esm/core/vector';
var scaleAndAdd = vec2.scaleAndAdd;
diff --git a/src/chart/graph/forceLayout.js b/src/chart/graph/forceLayout.js
index e61555a..492ca7d 100644
--- a/src/chart/graph/forceLayout.js
+++ b/src/chart/graph/forceLayout.js
@@ -21,8 +21,8 @@ import {forceLayout} from './forceHelper';
import {simpleLayout} from './simpleLayoutHelper';
import {circularLayout} from './circularLayoutHelper';
import {linearMap} from '../../util/number';
-import * as vec2 from 'zrender/src/core/vector';
-import * as zrUtil from 'zrender/src/core/util';
+import * as vec2 from 'zrender/esm/core/vector';
+import * as zrUtil from 'zrender/esm/core/util';
export default function (ecModel) {
ecModel.eachSeriesByType('graph', function (graphSeries) {
diff --git a/src/chart/graph/simpleLayout.js b/src/chart/graph/simpleLayout.js
index 1cc70bd..b865c75 100644
--- a/src/chart/graph/simpleLayout.js
+++ b/src/chart/graph/simpleLayout.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import {each} from 'zrender/src/core/util';
+import {each} from 'zrender/esm/core/util';
import {simpleLayout, simpleLayoutEdge} from './simpleLayoutHelper';
export default function (ecModel, api) {
diff --git a/src/chart/graph/simpleLayoutHelper.js b/src/chart/graph/simpleLayoutHelper.js
index 83d026c..4901248 100644
--- a/src/chart/graph/simpleLayoutHelper.js
+++ b/src/chart/graph/simpleLayoutHelper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as vec2 from 'zrender/src/core/vector';
+import * as vec2 from 'zrender/esm/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 41ab17b..9cf87fc 100644
--- a/src/chart/heatmap/HeatmapLayer.js
+++ b/src/chart/heatmap/HeatmapLayer.js
@@ -19,7 +19,7 @@
/* global Uint8ClampedArray */
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
var GRADIENT_LEVELS = 256;
diff --git a/src/chart/heatmap/HeatmapView.js b/src/chart/heatmap/HeatmapView.js
index be99ac4..d334981 100644
--- a/src/chart/heatmap/HeatmapView.js
+++ b/src/chart/heatmap/HeatmapView.js
@@ -21,7 +21,7 @@ import {__DEV__} from '../../config';
import * as echarts from '../../echarts';
import * as graphic from '../../util/graphic';
import HeatmapLayer from './HeatmapLayer';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 7a6c19c..6ea8b04 100644
--- a/src/chart/helper/EffectLine.js
+++ b/src/chart/helper/EffectLine.js
@@ -24,10 +24,10 @@
import * as graphic from '../../util/graphic';
import Line from './Line';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {createSymbol} from '../../util/symbol';
-import * as vec2 from 'zrender/src/core/vector';
-import * as curveUtil from 'zrender/src/core/curve';
+import * as vec2 from 'zrender/esm/core/vector';
+import * as curveUtil from 'zrender/esm/core/curve';
/**
* @constructor
diff --git a/src/chart/helper/EffectPolyline.js b/src/chart/helper/EffectPolyline.js
index fcadfab..d68440c 100644
--- a/src/chart/helper/EffectPolyline.js
+++ b/src/chart/helper/EffectPolyline.js
@@ -23,9 +23,9 @@
*/
import Polyline from './Polyline';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import EffectLine from './EffectLine';
-import * as vec2 from 'zrender/src/core/vector';
+import * as vec2 from 'zrender/esm/core/vector';
/**
* @constructor
diff --git a/src/chart/helper/EffectSymbol.js b/src/chart/helper/EffectSymbol.js
index 1f3a5e2..e044fb7 100644
--- a/src/chart/helper/EffectSymbol.js
+++ b/src/chart/helper/EffectSymbol.js
@@ -22,7 +22,7 @@
* @module echarts/chart/helper/EffectSymbol
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 94f3e95..7f39980 100644
--- a/src/chart/helper/LargeLineDraw.js
+++ b/src/chart/helper/LargeLineDraw.js
@@ -20,9 +20,9 @@
// TODO Batch by color
import * as graphic from '../../util/graphic';
-import IncrementalDisplayable from 'zrender/src/graphic/IncrementalDisplayable';
-import * as lineContain from 'zrender/src/contain/line';
-import * as quadraticContain from 'zrender/src/contain/quadratic';
+import IncrementalDisplayable from 'zrender/esm/graphic/IncrementalDisplayable';
+import * as lineContain from 'zrender/esm/contain/line';
+import * as quadraticContain from 'zrender/esm/contain/quadratic';
var LargeLineShape = graphic.extendShape({
diff --git a/src/chart/helper/LargeSymbolDraw.js b/src/chart/helper/LargeSymbolDraw.js
index 8db5332..3fa2b79 100644
--- a/src/chart/helper/LargeSymbolDraw.js
+++ b/src/chart/helper/LargeSymbolDraw.js
@@ -23,7 +23,7 @@
import * as graphic from '../../util/graphic';
import {createSymbol} from '../../util/symbol';
-import IncrementalDisplayable from 'zrender/src/graphic/IncrementalDisplayable';
+import IncrementalDisplayable from 'zrender/esm/graphic/IncrementalDisplayable';
var BOOST_SIZE_THRESHOLD = 4;
diff --git a/src/chart/helper/Line.js b/src/chart/helper/Line.js
index f2b2d8e..29e2470 100644
--- a/src/chart/helper/Line.js
+++ b/src/chart/helper/Line.js
@@ -21,8 +21,8 @@
* @module echarts/chart/helper/Line
*/
-import * as zrUtil from 'zrender/src/core/util';
-import * as vector from 'zrender/src/core/vector';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as vector from 'zrender/esm/core/vector';
import * as symbolUtil from '../../util/symbol';
import LinePath from './LinePath';
import * as graphic from '../../util/graphic';
diff --git a/src/chart/helper/LineDraw.js b/src/chart/helper/LineDraw.js
index 707957a..242e52d 100644
--- a/src/chart/helper/LineDraw.js
+++ b/src/chart/helper/LineDraw.js
@@ -23,7 +23,7 @@
import * as graphic from '../../util/graphic';
import LineGroup from './Line';
-// import IncrementalDisplayable from 'zrender/src/graphic/IncrementalDisplayable';
+// import IncrementalDisplayable from 'zrender/esm/graphic/IncrementalDisplayable';
/**
* @alias module:echarts/component/marker/LineDraw
diff --git a/src/chart/helper/LinePath.js b/src/chart/helper/LinePath.js
index 7256973..e4b7706 100644
--- a/src/chart/helper/LinePath.js
+++ b/src/chart/helper/LinePath.js
@@ -22,7 +22,7 @@
*/
import * as graphic from '../../util/graphic';
-import * as vec2 from 'zrender/src/core/vector';
+import * as vec2 from 'zrender/esm/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 eb897e4..22d0fc1 100644
--- a/src/chart/helper/Polyline.js
+++ b/src/chart/helper/Polyline.js
@@ -22,7 +22,7 @@
*/
import * as graphic from '../../util/graphic';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
/**
* @constructor
diff --git a/src/chart/helper/Symbol.js b/src/chart/helper/Symbol.js
index a1a0a94..bca963e 100644
--- a/src/chart/helper/Symbol.js
+++ b/src/chart/helper/Symbol.js
@@ -21,7 +21,7 @@
* @module echarts/chart/helper/Symbol
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {createSymbol} from '../../util/symbol';
import * as graphic from '../../util/graphic';
import {parsePercent} from '../../util/number';
diff --git a/src/chart/helper/SymbolDraw.js b/src/chart/helper/SymbolDraw.js
index 6d87295..1cfbeaf 100644
--- a/src/chart/helper/SymbolDraw.js
+++ b/src/chart/helper/SymbolDraw.js
@@ -23,7 +23,7 @@
import * as graphic from '../../util/graphic';
import SymbolClz from './Symbol';
-import { isObject } from 'zrender/src/core/util';
+import { isObject } from 'zrender/esm/core/util';
/**
* @constructor
diff --git a/src/chart/helper/createGraphFromNodeEdge.js b/src/chart/helper/createGraphFromNodeEdge.js
index e78087e..be33f6b 100644
--- a/src/chart/helper/createGraphFromNodeEdge.js
+++ b/src/chart/helper/createGraphFromNodeEdge.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 0ef96c6..76b0c7f 100644
--- a/src/chart/helper/createGraphFromNodeMatrix.js
+++ b/src/chart/helper/createGraphFromNodeMatrix.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 2b6cadc..abfc3f7 100644
--- a/src/chart/helper/createListFromArray.js
+++ b/src/chart/helper/createListFromArray.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import List from '../../data/List';
import createDimensions from '../../data/helper/createDimensions';
import {SOURCE_FORMAT_ORIGINAL} from '../../data/helper/sourceType';
diff --git a/src/chart/helper/createListSimply.js b/src/chart/helper/createListSimply.js
index ce7ce05..a9e9f14 100644
--- a/src/chart/helper/createListSimply.js
+++ b/src/chart/helper/createListSimply.js
@@ -20,7 +20,7 @@
import createDimensions from '../../data/helper/createDimensions';
import List from '../../data/List';
-import {extend, isArray} from 'zrender/src/core/util';
+import {extend, isArray} from 'zrender/esm/core/util';
/**
* [Usage]:
diff --git a/src/chart/helper/treeHelper.js b/src/chart/helper/treeHelper.js
index 0abc1c4..575ee37 100644
--- a/src/chart/helper/treeHelper.js
+++ b/src/chart/helper/treeHelper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
export function retrieveTargetInfo(payload, validPayloadTypes, seriesModel) {
if (payload && zrUtil.indexOf(validPayloadTypes, payload.type) >= 0) {
diff --git a/src/chart/helper/whiskerBoxCommon.js b/src/chart/helper/whiskerBoxCommon.js
index 7a9a42a..218e649 100644
--- a/src/chart/helper/whiskerBoxCommon.js
+++ b/src/chart/helper/whiskerBoxCommon.js
@@ -19,7 +19,7 @@
import createListSimply from '../helper/createListSimply';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {getDimensionTypeByAxis} from '../../data/helper/dimensionHelper';
import {makeSeriesEncodeForAxisCoordSys} from '../../data/helper/sourceHelper';
diff --git a/src/chart/line/LineView.js b/src/chart/line/LineView.js
index 639cbf6..7f24eb7 100644
--- a/src/chart/line/LineView.js
+++ b/src/chart/line/LineView.js
@@ -20,7 +20,7 @@
// FIXME step not support polar
import {__DEV__} from '../../config';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import SymbolDraw from '../helper/SymbolDraw';
import SymbolClz from '../helper/Symbol';
import lineAnimationDiff from './lineAnimationDiff';
diff --git a/src/chart/line/helper.js b/src/chart/line/helper.js
index 46f4966..84b47dd 100644
--- a/src/chart/line/helper.js
+++ b/src/chart/line/helper.js
@@ -18,7 +18,7 @@
*/
import {isDimensionStacked} from '../../data/helper/dataStackHelper';
-import {map} from 'zrender/src/core/util';
+import {map} from 'zrender/esm/core/util';
/**
* @param {Object} coordSys
diff --git a/src/chart/line/lineAnimationDiff.js b/src/chart/line/lineAnimationDiff.js
index 5e7d479..217cd5c 100644
--- a/src/chart/line/lineAnimationDiff.js
+++ b/src/chart/line/lineAnimationDiff.js
@@ -19,8 +19,8 @@
import {prepareDataCoordInfo, getStackedOnPoint} from './helper';
-// var arrayDiff = require('zrender/src/core/arrayDiff');
-// 'zrender/src/core/arrayDiff' has been used before, but it did
+// var arrayDiff = require('zrender/esm/core/arrayDiff');
+// 'zrender/esm/core/arrayDiff' has been used before, but it did
// not do well in performance when roam with fixed dataZoom window.
// function convertToIntId(newIdList, oldIdList) {
diff --git a/src/chart/line/poly.js b/src/chart/line/poly.js
index df50c24..56453c9 100644
--- a/src/chart/line/poly.js
+++ b/src/chart/line/poly.js
@@ -19,9 +19,9 @@
// Poly path support NaN point
-import Path from 'zrender/src/graphic/Path';
-import * as vec2 from 'zrender/src/core/vector';
-import fixClipWithShadow from 'zrender/src/graphic/helper/fixClipWithShadow';
+import Path from 'zrender/esm/graphic/Path';
+import * as vec2 from 'zrender/esm/core/vector';
+import fixClipWithShadow from 'zrender/esm/graphic/helper/fixClipWithShadow';
var vec2Min = vec2.min;
var vec2Max = vec2.max;
diff --git a/src/chart/lines/LinesSeries.js b/src/chart/lines/LinesSeries.js
index 047f0b6..b6d5272 100644
--- a/src/chart/lines/LinesSeries.js
+++ b/src/chart/lines/LinesSeries.js
@@ -22,7 +22,7 @@
import {__DEV__} from '../../config';
import SeriesModel from '../../model/Series';
import List from '../../data/List';
-import { concatArray, mergeAll, map } from 'zrender/src/core/util';
+import { concatArray, mergeAll, map } from 'zrender/esm/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 606928b..101b726 100644
--- a/src/chart/map/MapSeries.js
+++ b/src/chart/map/MapSeries.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import createListSimply from '../helper/createListSimply';
import SeriesModel from '../../model/Series';
import {encodeHTML, addCommas} from '../../util/format';
diff --git a/src/chart/map/MapView.js b/src/chart/map/MapView.js
index bcf9694..4c5294e 100644
--- a/src/chart/map/MapView.js
+++ b/src/chart/map/MapView.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 f0844e8..1e83f7a 100644
--- a/src/chart/map/backwardCompat.js
+++ b/src/chart/map/backwardCompat.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
export default function (option) {
// Save geoCoord
diff --git a/src/chart/map/mapDataStatistic.js b/src/chart/map/mapDataStatistic.js
index 438bbeb..1d76dfc 100644
--- a/src/chart/map/mapDataStatistic.js
+++ b/src/chart/map/mapDataStatistic.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
// FIXME 公用?
/**
diff --git a/src/chart/map/mapSymbolLayout.js b/src/chart/map/mapSymbolLayout.js
index 8e96800..10b5d7e 100644
--- a/src/chart/map/mapSymbolLayout.js
+++ b/src/chart/map/mapSymbolLayout.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
export default function (ecModel) {
diff --git a/src/chart/parallel/ParallelSeries.js b/src/chart/parallel/ParallelSeries.js
index da08ccc..1466f3e 100644
--- a/src/chart/parallel/ParallelSeries.js
+++ b/src/chart/parallel/ParallelSeries.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import {each, createHashMap} from 'zrender/src/core/util';
+import {each, createHashMap} from 'zrender/esm/core/util';
import SeriesModel from '../../model/Series';
import createListFromArray from '../helper/createListFromArray';
diff --git a/src/chart/pictorialBar.js b/src/chart/pictorialBar.js
index 975e4d9..c619962 100644
--- a/src/chart/pictorialBar.js
+++ b/src/chart/pictorialBar.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import '../coord/cartesian/Grid';
import './bar/PictorialBarSeries';
diff --git a/src/chart/pie.js b/src/chart/pie.js
index 35d3dea..59b8847 100644
--- a/src/chart/pie.js
+++ b/src/chart/pie.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import './pie/PieSeries';
import './pie/PieView';
diff --git a/src/chart/pie/PieSeries.js b/src/chart/pie/PieSeries.js
index 935eacd..acb2e9a 100644
--- a/src/chart/pie/PieSeries.js
+++ b/src/chart/pie/PieSeries.js
@@ -19,7 +19,7 @@
import * as echarts from '../../echarts';
import createListSimply from '../helper/createListSimply';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as modelUtil from '../../util/model';
import {getPercentWithPrecision} from '../../util/number';
import dataSelectableMixin from '../../component/helper/selectableMixin';
diff --git a/src/chart/pie/PieView.js b/src/chart/pie/PieView.js
index dc9f635..3862469 100644
--- a/src/chart/pie/PieView.js
+++ b/src/chart/pie/PieView.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 7b16651..0f3d6df 100644
--- a/src/chart/pie/labelLayout.js
+++ b/src/chart/pie/labelLayout.js
@@ -19,7 +19,7 @@
// FIXME emphasis label position is not same with normal label position
-import * as textContain from 'zrender/src/contain/text';
+import * as textContain from 'zrender/esm/contain/text';
import {parsePercent} from '../../util/number';
var RADIAN = Math.PI / 180;
diff --git a/src/chart/pie/pieLayout.js b/src/chart/pie/pieLayout.js
index b60382b..b9f76a5 100644
--- a/src/chart/pie/pieLayout.js
+++ b/src/chart/pie/pieLayout.js
@@ -21,7 +21,7 @@
import {parsePercent, linearMap} from '../../util/number';
import * as layout from '../../util/layout';
import labelLayout from './labelLayout';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
var PI2 = Math.PI * 2;
var RADIAN = Math.PI / 180;
diff --git a/src/chart/radar/RadarSeries.js b/src/chart/radar/RadarSeries.js
index ba713d0..8df2735 100644
--- a/src/chart/radar/RadarSeries.js
+++ b/src/chart/radar/RadarSeries.js
@@ -19,7 +19,7 @@
import SeriesModel from '../../model/Series';
import createListSimply from '../helper/createListSimply';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {encodeHTML} from '../../util/format';
import LegendVisualProvider from '../../visual/LegendVisualProvider';
diff --git a/src/chart/radar/RadarView.js b/src/chart/radar/RadarView.js
index ac9c7d9..a236fc0 100644
--- a/src/chart/radar/RadarView.js
+++ b/src/chart/radar/RadarView.js
@@ -19,7 +19,7 @@
import * as echarts from '../../echarts';
import * as graphic from '../../util/graphic';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 4cba89f..82d20b6 100644
--- a/src/chart/radar/backwardCompat.js
+++ b/src/chart/radar/backwardCompat.js
@@ -18,7 +18,7 @@
*/
// Backward compat for radar chart in 2
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
export default function (option) {
var polarOptArr = option.polar;
diff --git a/src/chart/radar/radarLayout.js b/src/chart/radar/radarLayout.js
index 0092f49..1d5dcdd 100644
--- a/src/chart/radar/radarLayout.js
+++ b/src/chart/radar/radarLayout.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
export default function (ecModel) {
ecModel.eachSeriesByType('radar', function (seriesModel) {
diff --git a/src/chart/sankey/SankeyView.js b/src/chart/sankey/SankeyView.js
index 4af153c..aed47f4 100644
--- a/src/chart/sankey/SankeyView.js
+++ b/src/chart/sankey/SankeyView.js
@@ -19,7 +19,7 @@
import * as graphic from '../../util/graphic';
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
var nodeOpacityPath = ['itemStyle', 'opacity'];
var hoverNodeOpacityPath = ['emphasis', 'itemStyle', 'opacity'];
diff --git a/src/chart/sankey/sankeyLayout.js b/src/chart/sankey/sankeyLayout.js
index f776e53..4ec6d39 100644
--- a/src/chart/sankey/sankeyLayout.js
+++ b/src/chart/sankey/sankeyLayout.js
@@ -18,7 +18,7 @@
*/
import * as layout from '../../util/layout';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {groupData} from '../../util/model';
export default function (ecModel, api, payload) {
diff --git a/src/chart/sankey/sankeyVisual.js b/src/chart/sankey/sankeyVisual.js
index 668a5ee..367ed34 100644
--- a/src/chart/sankey/sankeyVisual.js
+++ b/src/chart/sankey/sankeyVisual.js
@@ -18,7 +18,7 @@
*/
import VisualMapping from '../../visual/VisualMapping';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 87bbd3a..50d6d4f 100644
--- a/src/chart/scatter.js
+++ b/src/chart/scatter.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../echarts';
-// import * as zrUtil from 'zrender/src/core/util';
+// import * as zrUtil from 'zrender/esm/core/util';
import './scatter/ScatterSeries';
import './scatter/ScatterView';
diff --git a/src/chart/sunburst.js b/src/chart/sunburst.js
index 2f7edd8..4c8547c 100644
--- a/src/chart/sunburst.js
+++ b/src/chart/sunburst.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import './sunburst/SunburstSeries';
import './sunburst/SunburstView';
diff --git a/src/chart/sunburst/SunburstPiece.js b/src/chart/sunburst/SunburstPiece.js
index 79ca4c3..3295d37 100644
--- a/src/chart/sunburst/SunburstPiece.js
+++ b/src/chart/sunburst/SunburstPiece.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as graphic from '../../util/graphic';
var NodeHighlightPolicy = {
diff --git a/src/chart/sunburst/SunburstSeries.js b/src/chart/sunburst/SunburstSeries.js
index e3b192e..304f152 100644
--- a/src/chart/sunburst/SunburstSeries.js
+++ b/src/chart/sunburst/SunburstSeries.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import SeriesModel from '../../model/Series';
import Tree from '../../data/Tree';
import {wrapTreePathInfo} from '../helper/treeHelper';
diff --git a/src/chart/sunburst/SunburstView.js b/src/chart/sunburst/SunburstView.js
index 2d9d037..21d50b8 100644
--- a/src/chart/sunburst/SunburstView.js
+++ b/src/chart/sunburst/SunburstView.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import ChartView from '../../view/Chart';
import SunburstPiece from './SunburstPiece';
import DataDiffer from '../../data/DataDiffer';
diff --git a/src/chart/sunburst/sunburstLayout.js b/src/chart/sunburst/sunburstLayout.js
index ae39073..7d0d40e 100644
--- a/src/chart/sunburst/sunburstLayout.js
+++ b/src/chart/sunburst/sunburstLayout.js
@@ -19,7 +19,7 @@
import { parsePercent } from '../../util/number';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
// var PI2 = Math.PI * 2;
var RADIAN = Math.PI / 180;
diff --git a/src/chart/themeRiver/ThemeRiverSeries.js b/src/chart/themeRiver/ThemeRiverSeries.js
index 2552a7a..225d815 100644
--- a/src/chart/themeRiver/ThemeRiverSeries.js
+++ b/src/chart/themeRiver/ThemeRiverSeries.js
@@ -21,7 +21,7 @@ import SeriesModel from '../../model/Series';
import createDimensions from '../../data/helper/createDimensions';
import {getDimensionTypeByAxis} from '../../data/helper/dimensionHelper';
import List from '../../data/List';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {groupData} from '../../util/model';
import {encodeHTML} from '../../util/format';
import LegendVisualProvider from '../../visual/LegendVisualProvider';
diff --git a/src/chart/themeRiver/ThemeRiverView.js b/src/chart/themeRiver/ThemeRiverView.js
index be835a8..9022a92 100644
--- a/src/chart/themeRiver/ThemeRiverView.js
+++ b/src/chart/themeRiver/ThemeRiverView.js
@@ -20,7 +20,7 @@
import * as echarts from '../../echarts';
import {Polygon} from '../line/poly';
import * as graphic from '../../util/graphic';
-import {bind, extend} from 'zrender/src/core/util';
+import {bind, extend} from 'zrender/esm/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 dd8ab6f..a8ca022 100644
--- a/src/chart/themeRiver/themeRiverLayout.js
+++ b/src/chart/themeRiver/themeRiverLayout.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as numberUtil from '../../util/number';
export default function (ecModel, api) {
diff --git a/src/chart/themeRiver/themeRiverVisual.js b/src/chart/themeRiver/themeRiverVisual.js
index f5b5f4c..686b758 100644
--- a/src/chart/themeRiver/themeRiverVisual.js
+++ b/src/chart/themeRiver/themeRiverVisual.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import {createHashMap} from 'zrender/src/core/util';
+import {createHashMap} from 'zrender/esm/core/util';
export default function (ecModel) {
ecModel.eachSeriesByType('themeRiver', function (seriesModel) {
diff --git a/src/chart/tree/TreeView.js b/src/chart/tree/TreeView.js
index 6662eac..084069f 100644
--- a/src/chart/tree/TreeView.js
+++ b/src/chart/tree/TreeView.js
@@ -17,12 +17,12 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as graphic from '../../util/graphic';
import SymbolClz from '../helper/Symbol';
import {radialCoordinate} from './layoutHelper';
import * as echarts from '../../echarts';
-import * as bbox from 'zrender/src/core/bbox';
+import * as bbox from 'zrender/esm/core/bbox';
import View from '../../coord/View';
import * as roamHelper from '../../component/helper/roamHelper';
import RoamController from '../../component/helper/RoamController';
diff --git a/src/chart/treemap/Breadcrumb.js b/src/chart/treemap/Breadcrumb.js
index 41e355a..a96c623 100644
--- a/src/chart/treemap/Breadcrumb.js
+++ b/src/chart/treemap/Breadcrumb.js
@@ -19,7 +19,7 @@
import * as graphic from '../../util/graphic';
import * as layout from '../../util/layout';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {wrapTreePathInfo} from '../helper/treeHelper';
var TEXT_PADDING = 8;
diff --git a/src/chart/treemap/TreemapSeries.js b/src/chart/treemap/TreemapSeries.js
index be917ba..d998766 100644
--- a/src/chart/treemap/TreemapSeries.js
+++ b/src/chart/treemap/TreemapSeries.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 bf4b2ce..dc10a58 100644
--- a/src/chart/treemap/TreemapView.js
+++ b/src/chart/treemap/TreemapView.js
@@ -18,14 +18,14 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as graphic from '../../util/graphic';
import DataDiffer from '../../data/DataDiffer';
import * as helper from '../helper/treeHelper';
import Breadcrumb from './Breadcrumb';
import RoamController from '../../component/helper/RoamController';
-import BoundingRect from 'zrender/src/core/BoundingRect';
-import * as matrix from 'zrender/src/core/matrix';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
+import * as matrix from 'zrender/esm/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 541dae5..433424e 100644
--- a/src/chart/treemap/helper.js
+++ b/src/chart/treemap/helper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
export function retrieveTargetInfo(payload, seriesModel) {
if (payload
diff --git a/src/chart/treemap/treemapLayout.js b/src/chart/treemap/treemapLayout.js
index c7da8e2..568a017 100644
--- a/src/chart/treemap/treemapLayout.js
+++ b/src/chart/treemap/treemapLayout.js
@@ -27,8 +27,8 @@
* </licenses/LICENSE-d3>).
*/
-import * as zrUtil from 'zrender/src/core/util';
-import BoundingRect from 'zrender/src/core/BoundingRect';
+import * as zrUtil from 'zrender/esm/core/util';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
import {parsePercent, MAX_SAFE_INTEGER} from '../../util/number';
import * as layout from '../../util/layout';
import * as helper from '../helper/treeHelper';
diff --git a/src/chart/treemap/treemapVisual.js b/src/chart/treemap/treemapVisual.js
index 560f510..319218d 100644
--- a/src/chart/treemap/treemapVisual.js
+++ b/src/chart/treemap/treemapVisual.js
@@ -18,8 +18,8 @@
*/
import VisualMapping from '../../visual/VisualMapping';
-import * as zrColor from 'zrender/src/tool/color';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrColor from 'zrender/esm/tool/color';
+import * as zrUtil from 'zrender/esm/core/util';
var isArray = zrUtil.isArray;
diff --git a/src/component/axis/AngleAxisView.js b/src/component/axis/AngleAxisView.js
index 1675547..93a2700 100644
--- a/src/component/axis/AngleAxisView.js
+++ b/src/component/axis/AngleAxisView.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 149d17f..e25846a 100644
--- a/src/component/axis/AxisBuilder.js
+++ b/src/component/axis/AxisBuilder.js
@@ -17,14 +17,14 @@
* under the License.
*/
-import {retrieve, defaults, extend, each} from 'zrender/src/core/util';
+import {retrieve, defaults, extend, each} from 'zrender/esm/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 {createSymbol} from '../../util/symbol';
-import * as matrixUtil from 'zrender/src/core/matrix';
-import {applyTransform as v2ApplyTransform} from 'zrender/src/core/vector';
+import * as matrixUtil from 'zrender/esm/core/matrix';
+import {applyTransform as v2ApplyTransform} from 'zrender/esm/core/vector';
import {shouldShowAllLabels} from '../../coord/axisHelper';
diff --git a/src/component/axis/CartesianAxisView.js b/src/component/axis/CartesianAxisView.js
index 25cb65a..fc01cdd 100644
--- a/src/component/axis/CartesianAxisView.js
+++ b/src/component/axis/CartesianAxisView.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 ccc3f6f..1e430c1 100644
--- a/src/component/axis/ParallelAxisView.js
+++ b/src/component/axis/ParallelAxisView.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 e5e6575..ffedbfb 100644
--- a/src/component/axis/RadiusAxisView.js
+++ b/src/component/axis/RadiusAxisView.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 cec2c1f..77c1e6e 100644
--- a/src/component/axis/SingleAxisView.js
+++ b/src/component/axis/SingleAxisView.js
@@ -18,7 +18,7 @@
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import AxisBuilder from './AxisBuilder';
import * as graphic from '../../util/graphic';
import * as singleAxisHelper from '../../coord/single/singleAxisHelper';
diff --git a/src/component/axis/axisSplitHelper.js b/src/component/axis/axisSplitHelper.js
index 34ef562..7ac7c40 100644
--- a/src/component/axis/axisSplitHelper.js
+++ b/src/component/axis/axisSplitHelper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as graphic from '../../util/graphic';
diff --git a/src/component/axisPointer.js b/src/component/axisPointer.js
index 7877103..1391385 100644
--- a/src/component/axisPointer.js
+++ b/src/component/axisPointer.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 f97ee57..fecc8e9 100644
--- a/src/component/axisPointer/BaseAxisPointer.js
+++ b/src/component/axisPointer/BaseAxisPointer.js
@@ -17,11 +17,11 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as clazzUtil from '../../util/clazz';
import * as graphic from '../../util/graphic';
import * as axisPointerModelHelper from './modelHelper';
-import * as eventTool from 'zrender/src/core/event';
+import * as eventTool from 'zrender/esm/core/event';
import * as throttleUtil from '../../util/throttle';
import {makeInner} from '../../util/model';
diff --git a/src/component/axisPointer/PolarAxisPointer.js b/src/component/axisPointer/PolarAxisPointer.js
index 33d9e7b..cbd5071 100644
--- a/src/component/axisPointer/PolarAxisPointer.js
+++ b/src/component/axisPointer/PolarAxisPointer.js
@@ -21,7 +21,7 @@ import * as formatUtil from '../../util/format';
import BaseAxisPointer from './BaseAxisPointer';
import * as graphic from '../../util/graphic';
import * as viewHelper from './viewHelper';
-import * as matrix from 'zrender/src/core/matrix';
+import * as matrix from 'zrender/esm/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 5f51b76..20ec4ea 100644
--- a/src/component/axisPointer/axisTrigger.js
+++ b/src/component/axisPointer/axisTrigger.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {makeInner} 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 764c49d..8f076a5 100644
--- a/src/component/axisPointer/findPointFromSeries.js
+++ b/src/component/axisPointer/findPointFromSeries.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as modelUtil from '../../util/model';
/**
diff --git a/src/component/axisPointer/globalListener.js b/src/component/axisPointer/globalListener.js
index 6cfd469..e3e5ed3 100644
--- a/src/component/axisPointer/globalListener.js
+++ b/src/component/axisPointer/globalListener.js
@@ -17,8 +17,8 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-import env from 'zrender/src/core/env';
+import * as zrUtil from 'zrender/esm/core/util';
+import env from 'zrender/esm/core/env';
import {makeInner} from '../../util/model';
var inner = makeInner();
diff --git a/src/component/axisPointer/modelHelper.js b/src/component/axisPointer/modelHelper.js
index c9e193e..8e1c877 100644
--- a/src/component/axisPointer/modelHelper.js
+++ b/src/component/axisPointer/modelHelper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 74b5c7f..16c5c43 100644
--- a/src/component/axisPointer/viewHelper.js
+++ b/src/component/axisPointer/viewHelper.js
@@ -17,11 +17,11 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as graphic from '../../util/graphic';
-import * as textContain from 'zrender/src/contain/text';
+import * as textContain from 'zrender/esm/contain/text';
import * as formatUtil from '../../util/format';
-import * as matrix from 'zrender/src/core/matrix';
+import * as matrix from 'zrender/esm/core/matrix';
import * as axisHelper from '../../coord/axisHelper';
import AxisBuilder from '../axis/AxisBuilder';
diff --git a/src/component/brush/BrushModel.js b/src/component/brush/BrushModel.js
index 85da245..ce0ae93 100644
--- a/src/component/brush/BrushModel.js
+++ b/src/component/brush/BrushModel.js
@@ -19,7 +19,7 @@
import {__DEV__} from '../../config';
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 bd0f486..82beb65 100644
--- a/src/component/brush/BrushView.js
+++ b/src/component/brush/BrushView.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import BrushController from '../helper/BrushController';
import {layoutCovers} from './visualEncoding';
diff --git a/src/component/brush/preprocessor.js b/src/component/brush/preprocessor.js
index 78c971c..fd0a149 100644
--- a/src/component/brush/preprocessor.js
+++ b/src/component/brush/preprocessor.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 a4a1d09..3ecfb6a 100644
--- a/src/component/brush/selector.js
+++ b/src/component/brush/selector.js
@@ -17,8 +17,8 @@
* under the License.
*/
-import * as polygonContain from 'zrender/src/contain/polygon';
-import BoundingRect from 'zrender/src/core/BoundingRect';
+import * as polygonContain from 'zrender/esm/contain/polygon';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
import {linePolygonIntersect} from '../../util/graphic';
// Key of the first level is brushType: `line`, `rect`, `polygon`.
diff --git a/src/component/brush/visualEncoding.js b/src/component/brush/visualEncoding.js
index 5f8677d..a78e46b 100644
--- a/src/component/brush/visualEncoding.js
+++ b/src/component/brush/visualEncoding.js
@@ -18,8 +18,8 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
-import BoundingRect from 'zrender/src/core/BoundingRect';
+import * as zrUtil from 'zrender/esm/core/util';
+import BoundingRect from 'zrender/esm/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 13ea942..21f204c 100644
--- a/src/component/calendar/CalendarView.js
+++ b/src/component/calendar/CalendarView.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 0a2256d..dea1fcd 100644
--- a/src/component/dataZoom/AxisProxy.js
+++ b/src/component/dataZoom/AxisProxy.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as numberUtil from '../../util/number';
import * as helper from './helper';
import sliderMove from '../helper/sliderMove';
diff --git a/src/component/dataZoom/DataZoomModel.js b/src/component/dataZoom/DataZoomModel.js
index 97521d9..ff2ea03 100644
--- a/src/component/dataZoom/DataZoomModel.js
+++ b/src/component/dataZoom/DataZoomModel.js
@@ -19,8 +19,8 @@
import {__DEV__} from '../../config';
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
-import env from 'zrender/src/core/env';
+import * as zrUtil from 'zrender/esm/core/util';
+import env from 'zrender/esm/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 da0867b..2de680d 100644
--- a/src/component/dataZoom/InsideZoomView.js
+++ b/src/component/dataZoom/InsideZoomView.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 abfd922..3c9cf2a 100644
--- a/src/component/dataZoom/SliderZoomView.js
+++ b/src/component/dataZoom/SliderZoomView.js
@@ -17,8 +17,8 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-import * as eventTool from 'zrender/src/core/event';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as eventTool from 'zrender/esm/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 b227e11..5f49074 100644
--- a/src/component/dataZoom/dataZoomAction.js
+++ b/src/component/dataZoom/dataZoomAction.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as helper from './helper';
diff --git a/src/component/dataZoom/dataZoomProcessor.js b/src/component/dataZoom/dataZoomProcessor.js
index cfd1406..76ad815 100644
--- a/src/component/dataZoom/dataZoomProcessor.js
+++ b/src/component/dataZoom/dataZoomProcessor.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import {createHashMap, each} from 'zrender/src/core/util';
+import {createHashMap, each} from 'zrender/esm/core/util';
echarts.registerProcessor({
diff --git a/src/component/dataZoom/helper.js b/src/component/dataZoom/helper.js
index 910f0f9..85ab731 100644
--- a/src/component/dataZoom/helper.js
+++ b/src/component/dataZoom/helper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as formatUtil from '../../util/format';
diff --git a/src/component/dataZoom/history.js b/src/component/dataZoom/history.js
index f686bc4..619c2ef 100644
--- a/src/component/dataZoom/history.js
+++ b/src/component/dataZoom/history.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
var each = zrUtil.each;
diff --git a/src/component/dataZoom/roams.js b/src/component/dataZoom/roams.js
index ddcba96..b0e4e2a 100644
--- a/src/component/dataZoom/roams.js
+++ b/src/component/dataZoom/roams.js
@@ -23,7 +23,7 @@
// pan or zoom, only dispatch one action for those data zoom
// components.
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 0fcad46..ffab625 100644
--- a/src/component/geo.js
+++ b/src/component/geo.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import '../coord/geo/GeoModel';
import '../coord/geo/geoCreator';
diff --git a/src/component/graphic.js b/src/component/graphic.js
index e689db1..6e7f256 100644
--- a/src/component/graphic.js
+++ b/src/component/graphic.js
@@ -19,7 +19,7 @@
import {__DEV__} from '../config';
import * as echarts from '../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 2c1194c..d61622b 100644
--- a/src/component/gridSimple.js
+++ b/src/component/gridSimple.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 c8fb8cd..2b05019 100644
--- a/src/component/helper/BrushController.js
+++ b/src/component/helper/BrushController.js
@@ -18,8 +18,8 @@
*/
import {__DEV__} from '../../config';
-import * as zrUtil from 'zrender/src/core/util';
-import Eventful from 'zrender/src/mixin/Eventful';
+import * as zrUtil from 'zrender/esm/core/util';
+import Eventful from 'zrender/esm/core/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 846b370..8a1f614 100644
--- a/src/component/helper/BrushTargetManager.js
+++ b/src/component/helper/BrushTargetManager.js
@@ -18,7 +18,7 @@
*/
import {__DEV__} from '../../config';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 d1943c0..374d4f7 100644
--- a/src/component/helper/MapDraw.js
+++ b/src/component/helper/MapDraw.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 2124837..8b3fcc4 100644
--- a/src/component/helper/RoamController.js
+++ b/src/component/helper/RoamController.js
@@ -17,9 +17,9 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-import Eventful from 'zrender/src/mixin/Eventful';
-import * as eventTool from 'zrender/src/core/event';
+import * as zrUtil from 'zrender/esm/core/util';
+import Eventful from 'zrender/esm/core/Eventful';
+import * as eventTool from 'zrender/esm/core/event';
import * as interactionMutex from './interactionMutex';
/**
diff --git a/src/component/helper/brushHelper.js b/src/component/helper/brushHelper.js
index 7aff44c..6b1f468 100644
--- a/src/component/helper/brushHelper.js
+++ b/src/component/helper/brushHelper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import BoundingRect from 'zrender/src/core/BoundingRect';
+import BoundingRect from 'zrender/esm/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 f18ee1c..7cb103c 100644
--- a/src/component/helper/selectableMixin.js
+++ b/src/component/helper/selectableMixin.js
@@ -23,7 +23,7 @@
* And each data item will use `selected` to toggle itself selected status
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
export default {
diff --git a/src/component/legend/LegendModel.js b/src/component/legend/LegendModel.js
index f49cb55..22644a7 100644
--- a/src/component/legend/LegendModel.js
+++ b/src/component/legend/LegendModel.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import Model from '../../model/Model';
import {isNameSpecified} from '../../util/model';
import lang from '../../lang';
diff --git a/src/component/legend/LegendView.js b/src/component/legend/LegendView.js
index e63bf78..88ad759 100644
--- a/src/component/legend/LegendView.js
+++ b/src/component/legend/LegendView.js
@@ -19,7 +19,7 @@
import {__DEV__} from '../../config';
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 8962f6b..1386a49 100644
--- a/src/component/legend/ScrollableLegendView.js
+++ b/src/component/legend/ScrollableLegendView.js
@@ -21,7 +21,7 @@
* Separate legend and scrollable legend to reduce package size.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 d95156f..11b529b 100644
--- a/src/component/legend/legendAction.js
+++ b/src/component/legend/legendAction.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
function legendSelectActionHandler(methodName, payload, ecModel) {
var selectedMap = {};
diff --git a/src/component/marker/MarkAreaView.js b/src/component/marker/MarkAreaView.js
index ec1ae7b..f5bf3e3 100644
--- a/src/component/marker/MarkAreaView.js
+++ b/src/component/marker/MarkAreaView.js
@@ -19,8 +19,8 @@
// TODO Better on polar
-import * as zrUtil from 'zrender/src/core/util';
-import * as colorUtil from 'zrender/src/tool/color';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as colorUtil from 'zrender/esm/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 eb75ee7..fff64d9 100644
--- a/src/component/marker/MarkLineView.js
+++ b/src/component/marker/MarkLineView.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 2edd302..9d7ba75 100644
--- a/src/component/marker/MarkPointView.js
+++ b/src/component/marker/MarkPointView.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 8c3a314..731102d 100644
--- a/src/component/marker/MarkerModel.js
+++ b/src/component/marker/MarkerModel.js
@@ -19,8 +19,8 @@
import {__DEV__} from '../../config';
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
-import env from 'zrender/src/core/env';
+import * as zrUtil from 'zrender/esm/core/util';
+import env from 'zrender/esm/core/env';
import * as modelUtil from '../../util/model';
import * as formatUtil from '../../util/format';
import dataFormatMixin from '../../model/mixin/dataFormat';
diff --git a/src/component/marker/MarkerView.js b/src/component/marker/MarkerView.js
index 67e7418..6c537f2 100644
--- a/src/component/marker/MarkerView.js
+++ b/src/component/marker/MarkerView.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
export default echarts.extendComponentView({
diff --git a/src/component/marker/markerHelper.js b/src/component/marker/markerHelper.js
index c571b85..ecdf95e 100644
--- a/src/component/marker/markerHelper.js
+++ b/src/component/marker/markerHelper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as numberUtil from '../../util/number';
import {isDimensionStacked} from '../../data/helper/dataStackHelper';
diff --git a/src/component/parallel.js b/src/component/parallel.js
index fffa8ae..336b261 100644
--- a/src/component/parallel.js
+++ b/src/component/parallel.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 398015c..cf4bdbf 100644
--- a/src/component/polar.js
+++ b/src/component/polar.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 8f7475c..17e5230 100644
--- a/src/component/radar/RadarView.js
+++ b/src/component/radar/RadarView.js
@@ -19,7 +19,7 @@
import {__DEV__} from '../../config';
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 a70bab3..5d1d064 100644
--- a/src/component/timeline/SliderTimelineModel.js
+++ b/src/component/timeline/SliderTimelineModel.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import TimelineModel from './TimelineModel';
import dataFormatMixin from '../../model/mixin/dataFormat';
diff --git a/src/component/timeline/SliderTimelineView.js b/src/component/timeline/SliderTimelineView.js
index f88c9da..2022b25 100644
--- a/src/component/timeline/SliderTimelineView.js
+++ b/src/component/timeline/SliderTimelineView.js
@@ -17,9 +17,9 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-import BoundingRect from 'zrender/src/core/BoundingRect';
-import * as matrix from 'zrender/src/core/matrix';
+import * as zrUtil from 'zrender/esm/core/util';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
+import * as matrix from 'zrender/esm/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 0dc6f27..beaf416 100644
--- a/src/component/timeline/TimelineAxis.js
+++ b/src/component/timeline/TimelineAxis.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import Axis from '../../coord/Axis';
/**
diff --git a/src/component/timeline/TimelineModel.js b/src/component/timeline/TimelineModel.js
index 9003667..4fdb0db 100644
--- a/src/component/timeline/TimelineModel.js
+++ b/src/component/timeline/TimelineModel.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 dc46ec7..ef7a073 100644
--- a/src/component/timeline/preprocessor.js
+++ b/src/component/timeline/preprocessor.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 86f1f28..1b2df25 100644
--- a/src/component/timeline/timelineAction.js
+++ b/src/component/timeline/timelineAction.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
echarts.registerAction(
diff --git a/src/component/title.js b/src/component/title.js
index 5dc5fff..97dfca8 100644
--- a/src/component/title.js
+++ b/src/component/title.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as echarts from '../echarts';
import * as graphic from '../util/graphic';
import {getLayoutRect} from '../util/layout';
diff --git a/src/component/toolbox/ToolboxModel.js b/src/component/toolbox/ToolboxModel.js
index f647409..76b7d22 100644
--- a/src/component/toolbox/ToolboxModel.js
+++ b/src/component/toolbox/ToolboxModel.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 25b079e..d7f971f 100644
--- a/src/component/toolbox/ToolboxView.js
+++ b/src/component/toolbox/ToolboxView.js
@@ -18,8 +18,8 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
-import * as textContain from 'zrender/src/contain/text';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as textContain from 'zrender/esm/contain/text';
import * as featureManager from './featureManager';
import * as graphic from '../../util/graphic';
import Model from '../../model/Model';
diff --git a/src/component/toolbox/feature/Brush.js b/src/component/toolbox/feature/Brush.js
index 16b2a49..9532d4f 100644
--- a/src/component/toolbox/feature/Brush.js
+++ b/src/component/toolbox/feature/Brush.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 a3206f8..bfe0ca2 100644
--- a/src/component/toolbox/feature/DataView.js
+++ b/src/component/toolbox/feature/DataView.js
@@ -18,8 +18,8 @@
*/
import * as echarts from '../../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
-import * as eventTool from 'zrender/src/core/event';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as eventTool from 'zrender/esm/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 2ef98f8..aa08212 100644
--- a/src/component/toolbox/feature/DataZoom.js
+++ b/src/component/toolbox/feature/DataZoom.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 326db37..7c7569b 100644
--- a/src/component/toolbox/feature/MagicType.js
+++ b/src/component/toolbox/feature/MagicType.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 d81a06d..304f11e 100644
--- a/src/component/toolbox/feature/SaveAsImage.js
+++ b/src/component/toolbox/feature/SaveAsImage.js
@@ -19,7 +19,7 @@
/* global Uint8Array */
-import env from 'zrender/src/core/env';
+import env from 'zrender/esm/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 6cdbc3f..45f0cf8 100644
--- a/src/component/tooltip/TooltipContent.js
+++ b/src/component/tooltip/TooltipContent.js
@@ -17,11 +17,11 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-import * as zrColor from 'zrender/src/tool/color';
-import * as eventUtil from 'zrender/src/core/event';
-import * as domUtil from 'zrender/src/core/dom';
-import env from 'zrender/src/core/env';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as zrColor from 'zrender/esm/tool/color';
+import * as eventUtil from 'zrender/esm/core/event';
+import * as domUtil from 'zrender/esm/core/dom';
+import env from 'zrender/esm/core/env';
import * as formatUtil from '../../util/format';
var each = zrUtil.each;
diff --git a/src/component/tooltip/TooltipRichContent.js b/src/component/tooltip/TooltipRichContent.js
index f6830ff..16a7aad 100644
--- a/src/component/tooltip/TooltipRichContent.js
+++ b/src/component/tooltip/TooltipRichContent.js
@@ -17,9 +17,9 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-// import Group from 'zrender/src/container/Group';
-import Text from 'zrender/src/graphic/Text';
+import * as zrUtil from 'zrender/esm/core/util';
+// import Group from 'zrender/esm/container/Group';
+import Text from 'zrender/esm/graphic/Text';
/**
* @alias module:echarts/component/tooltip/TooltipRichContent
diff --git a/src/component/tooltip/TooltipView.js b/src/component/tooltip/TooltipView.js
index 8fa9981..02890fc 100644
--- a/src/component/tooltip/TooltipView.js
+++ b/src/component/tooltip/TooltipView.js
@@ -18,8 +18,8 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
-import env from 'zrender/src/core/env';
+import * as zrUtil from 'zrender/esm/core/util';
+import env from 'zrender/esm/core/env';
import TooltipContent from './TooltipContent';
import TooltipRichContent from './TooltipRichContent';
import * as formatUtil from '../../util/format';
diff --git a/src/component/visualMap/ContinuousModel.js b/src/component/visualMap/ContinuousModel.js
index 840101c..6f267c8 100644
--- a/src/component/visualMap/ContinuousModel.js
+++ b/src/component/visualMap/ContinuousModel.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 a765203..951be92 100644
--- a/src/component/visualMap/ContinuousView.js
+++ b/src/component/visualMap/ContinuousView.js
@@ -17,9 +17,9 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-import LinearGradient from 'zrender/src/graphic/LinearGradient';
-import * as eventTool from 'zrender/src/core/event';
+import * as zrUtil from 'zrender/esm/core/util';
+import LinearGradient from 'zrender/esm/graphic/LinearGradient';
+import * as eventTool from 'zrender/esm/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 df03ed0..3e25b54 100644
--- a/src/component/visualMap/PiecewiseModel.js
+++ b/src/component/visualMap/PiecewiseModel.js
@@ -18,7 +18,7 @@
*/
import {__DEV__} from '../../config';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 eceb66f..da596d9 100644
--- a/src/component/visualMap/PiecewiseView.js
+++ b/src/component/visualMap/PiecewiseView.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 a40973e..9b3e8f9 100644
--- a/src/component/visualMap/VisualMapModel.js
+++ b/src/component/visualMap/VisualMapModel.js
@@ -18,8 +18,8 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
-import env from 'zrender/src/core/env';
+import * as zrUtil from 'zrender/esm/core/util';
+import env from 'zrender/esm/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 2c3e5c8..961dad1 100644
--- a/src/component/visualMap/VisualMapView.js
+++ b/src/component/visualMap/VisualMapView.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 4f35a11..4b7c012 100644
--- a/src/component/visualMap/helper.js
+++ b/src/component/visualMap/helper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {getLayoutRect} from '../../util/layout';
/**
diff --git a/src/component/visualMap/preprocessor.js b/src/component/visualMap/preprocessor.js
index 5975e13..5d7f886 100644
--- a/src/component/visualMap/preprocessor.js
+++ b/src/component/visualMap/preprocessor.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
var each = zrUtil.each;
diff --git a/src/component/visualMap/visualEncoding.js b/src/component/visualMap/visualEncoding.js
index 02a9e4e..d5643a1 100644
--- a/src/component/visualMap/visualEncoding.js
+++ b/src/component/visualMap/visualEncoding.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 e1efc45..95674cf 100644
--- a/src/coord/Axis.js
+++ b/src/coord/Axis.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import {each, map} from 'zrender/src/core/util';
+import {each, map} from 'zrender/esm/core/util';
import {linearMap, getPixelPrecision, round} from '../util/number';
import {
createAxisTicks,
diff --git a/src/coord/View.js b/src/coord/View.js
index 03c4b7d..ad8be44 100644
--- a/src/coord/View.js
+++ b/src/coord/View.js
@@ -22,11 +22,11 @@
* Mapping given x, y to transformd view x, y
*/
-import * as zrUtil from 'zrender/src/core/util';
-import * as vector from 'zrender/src/core/vector';
-import * as matrix from 'zrender/src/core/matrix';
-import BoundingRect from 'zrender/src/core/BoundingRect';
-import Transformable from 'zrender/src/mixin/Transformable';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as vector from 'zrender/esm/core/vector';
+import * as matrix from 'zrender/esm/core/matrix';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
+import Transformable from 'zrender/esm/core/Transformable';
var v2ApplyTransform = vector.applyTransform;
diff --git a/src/coord/axisDefault.js b/src/coord/axisDefault.js
index 90a00a0..3df2422 100644
--- a/src/coord/axisDefault.js
+++ b/src/coord/axisDefault.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
var defaultOption = {
show: true,
diff --git a/src/coord/axisHelper.js b/src/coord/axisHelper.js
index a0e2a13..f8b7ee1 100644
--- a/src/coord/axisHelper.js
+++ b/src/coord/axisHelper.js
@@ -18,7 +18,7 @@
*/
import {__DEV__} from '../config';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import OrdinalScale from '../scale/Ordinal';
import IntervalScale from '../scale/Interval';
import Scale from '../scale/Scale';
@@ -28,7 +28,7 @@ import {
makeColumnLayout,
retrieveColumnLayout
} from '../layout/barGrid';
-import BoundingRect from 'zrender/src/core/BoundingRect';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
import '../scale/Time';
import '../scale/Log';
diff --git a/src/coord/axisModelCommonMixin.js b/src/coord/axisModelCommonMixin.js
index 8b22438..b255d46 100644
--- a/src/coord/axisModelCommonMixin.js
+++ b/src/coord/axisModelCommonMixin.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
// import * as axisHelper from './axisHelper';
export default {
diff --git a/src/coord/axisModelCreator.js b/src/coord/axisModelCreator.js
index bd9116a..3a6b102 100644
--- a/src/coord/axisModelCreator.js
+++ b/src/coord/axisModelCreator.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import axisDefault from './axisDefault';
import ComponentModel from '../model/Component';
import {
diff --git a/src/coord/axisTickLabelBuilder.js b/src/coord/axisTickLabelBuilder.js
index f6ca367..97050ec 100644
--- a/src/coord/axisTickLabelBuilder.js
+++ b/src/coord/axisTickLabelBuilder.js
@@ -17,8 +17,8 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-import * as textContain from 'zrender/src/contain/text';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as textContain from 'zrender/esm/contain/text';
import {makeInner} from '../util/model';
import {
makeLabelFormatter,
diff --git a/src/coord/calendar/Calendar.js b/src/coord/calendar/Calendar.js
index 923841b..29691d9 100644
--- a/src/coord/calendar/Calendar.js
+++ b/src/coord/calendar/Calendar.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 496a456..8c0b99e 100644
--- a/src/coord/calendar/CalendarModel.js
+++ b/src/coord/calendar/CalendarModel.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import ComponentModel from '../../model/Component';
import {
getLayoutParams,
diff --git a/src/coord/cartesian/Axis2D.js b/src/coord/cartesian/Axis2D.js
index 9ac47ce..221da2a 100644
--- a/src/coord/cartesian/Axis2D.js
+++ b/src/coord/cartesian/Axis2D.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import Axis from '../Axis';
/**
diff --git a/src/coord/cartesian/AxisModel.js b/src/coord/cartesian/AxisModel.js
index 2f12602..d6066bf 100644
--- a/src/coord/cartesian/AxisModel.js
+++ b/src/coord/cartesian/AxisModel.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 37b30e8..1ebeba3 100644
--- a/src/coord/cartesian/Cartesian.js
+++ b/src/coord/cartesian/Cartesian.js
@@ -23,7 +23,7 @@
*
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
function dimAxisMapper(dim) {
return this._axes[dim];
diff --git a/src/coord/cartesian/Cartesian2D.js b/src/coord/cartesian/Cartesian2D.js
index a162d2e..980435f 100644
--- a/src/coord/cartesian/Cartesian2D.js
+++ b/src/coord/cartesian/Cartesian2D.js
@@ -18,8 +18,8 @@
*/
-import * as zrUtil from 'zrender/src/core/util';
-import BoundingRect from 'zrender/src/core/BoundingRect';
+import * as zrUtil from 'zrender/esm/core/util';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
import Cartesian from './Cartesian';
function Cartesian2D(name) {
diff --git a/src/coord/cartesian/Grid.js b/src/coord/cartesian/Grid.js
index 082e327..7ee8f32 100644
--- a/src/coord/cartesian/Grid.js
+++ b/src/coord/cartesian/Grid.js
@@ -24,7 +24,7 @@
*/
import {__DEV__} from '../../config';
-import {isObject, each, map, indexOf, retrieve} from 'zrender/src/core/util';
+import {isObject, each, map, indexOf, retrieve} from 'zrender/esm/core/util';
import {getLayoutRect} from '../../util/layout';
import {
createScaleByModel,
diff --git a/src/coord/cartesian/cartesianAxisHelper.js b/src/coord/cartesian/cartesianAxisHelper.js
index 85d4870..20895e6 100644
--- a/src/coord/cartesian/cartesianAxisHelper.js
+++ b/src/coord/cartesian/cartesianAxisHelper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
/**
* Can only be called after coordinate system creation stage.
diff --git a/src/coord/cartesian/prepareCustom.js b/src/coord/cartesian/prepareCustom.js
index 9b0a8e4..f5ae409 100644
--- a/src/coord/cartesian/prepareCustom.js
+++ b/src/coord/cartesian/prepareCustom.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 6a87274..e0e9b70 100644
--- a/src/coord/geo/Geo.js
+++ b/src/coord/geo/Geo.js
@@ -17,8 +17,8 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-import BoundingRect from 'zrender/src/core/BoundingRect';
+import * as zrUtil from 'zrender/esm/core/util';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
import View from '../View';
import geoSourceManager from './geoSourceManager';
@@ -57,7 +57,7 @@ function Geo(name, map, nameMap, invertLongitute) {
this.regions = source.regions;
/**
- * @type {module:zrender/src/core/BoundingRect}
+ * @type {module:zrender/esm/core/BoundingRect}
*/
this._rect = source.boundingRect;
}
diff --git a/src/coord/geo/GeoModel.js b/src/coord/geo/GeoModel.js
index 528b48a..323d563 100644
--- a/src/coord/geo/GeoModel.js
+++ b/src/coord/geo/GeoModel.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 997f395..0289000 100644
--- a/src/coord/geo/Region.js
+++ b/src/coord/geo/Region.js
@@ -21,10 +21,10 @@
* @module echarts/coord/geo/Region
*/
-import BoundingRect from 'zrender/src/core/BoundingRect';
-import * as bbox from 'zrender/src/core/bbox';
-import * as vec2 from 'zrender/src/core/vector';
-import * as polygonContain from 'zrender/src/contain/polygon';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
+import * as bbox from 'zrender/esm/core/bbox';
+import * as vec2 from 'zrender/esm/core/vector';
+import * as polygonContain from 'zrender/esm/contain/polygon';
/**
* @param {string|Region} name
diff --git a/src/coord/geo/fix/diaoyuIsland.js b/src/coord/geo/fix/diaoyuIsland.js
index 87b3f57..4af6b20 100644
--- a/src/coord/geo/fix/diaoyuIsland.js
+++ b/src/coord/geo/fix/diaoyuIsland.js
@@ -20,7 +20,7 @@
// Fix for 钓鱼岛
// var Region = require('../Region');
-// var zrUtil = require('zrender/src/core/util');
+// var zrUtil = require('zrender/esm/core/util');
// var geoCoord = [126, 25];
diff --git a/src/coord/geo/fix/nanhai.js b/src/coord/geo/fix/nanhai.js
index bdcfe18..0f33b96 100644
--- a/src/coord/geo/fix/nanhai.js
+++ b/src/coord/geo/fix/nanhai.js
@@ -19,7 +19,7 @@
// Fix for 南海诸岛
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import Region from '../Region';
var geoCoord = [126, 25];
diff --git a/src/coord/geo/geoCreator.js b/src/coord/geo/geoCreator.js
index 73b3346..6b2b0a1 100644
--- a/src/coord/geo/geoCreator.js
+++ b/src/coord/geo/geoCreator.js
@@ -19,7 +19,7 @@
import {__DEV__} from '../../config';
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import Geo from './Geo';
import * as layout from '../../util/layout';
import * as numberUtil from '../../util/number';
diff --git a/src/coord/geo/geoJSONLoader.js b/src/coord/geo/geoJSONLoader.js
index 381c1f9..bdd16f5 100644
--- a/src/coord/geo/geoJSONLoader.js
+++ b/src/coord/geo/geoJSONLoader.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import {each} from 'zrender/src/core/util';
+import {each} from 'zrender/esm/core/util';
import parseGeoJson from './parseGeoJson';
import {makeInner} from '../../util/model';
diff --git a/src/coord/geo/geoSVGLoader.js b/src/coord/geo/geoSVGLoader.js
index 98eab03..0650bb9 100644
--- a/src/coord/geo/geoSVGLoader.js
+++ b/src/coord/geo/geoSVGLoader.js
@@ -17,11 +17,11 @@
* under the License.
*/
-import {parseSVG, makeViewBoxTransform} from 'zrender/src/tool/parseSVG';
-import Group from 'zrender/src/container/Group';
-import Rect from 'zrender/src/graphic/shape/Rect';
-import {assert, createHashMap} from 'zrender/src/core/util';
-import BoundingRect from 'zrender/src/core/BoundingRect';
+import {parseSVG, makeViewBoxTransform} from 'zrender/esm/tool/parseSVG';
+import Group from 'zrender/esm/container/Group';
+import Rect from 'zrender/esm/graphic/shape/Rect';
+import {assert, createHashMap} from 'zrender/esm/core/util';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
import {makeInner} from '../../util/model';
var inner = makeInner();
diff --git a/src/coord/geo/geoSourceManager.js b/src/coord/geo/geoSourceManager.js
index 0de59c1..d0e812a 100644
--- a/src/coord/geo/geoSourceManager.js
+++ b/src/coord/geo/geoSourceManager.js
@@ -18,11 +18,11 @@
*/
import {__DEV__} from '../../config';
-import {each, createHashMap} from 'zrender/src/core/util';
+import {each, createHashMap} from 'zrender/esm/core/util';
import mapDataStorage from './mapDataStorage';
import geoJSONLoader from './geoJSONLoader';
import geoSVGLoader from './geoSVGLoader';
-import BoundingRect from 'zrender/src/core/BoundingRect';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
var loaders = {
geoJSON: geoJSONLoader,
diff --git a/src/coord/geo/mapDataStorage.js b/src/coord/geo/mapDataStorage.js
index 8f6de57..109c60e 100644
--- a/src/coord/geo/mapDataStorage.js
+++ b/src/coord/geo/mapDataStorage.js
@@ -18,8 +18,8 @@
*/
import {__DEV__} from '../../config';
-import {createHashMap, isString, isArray, each, assert} from 'zrender/src/core/util';
-import {parseXML} from 'zrender/src/tool/parseSVG';
+import {createHashMap, isString, isArray, each, assert} from 'zrender/esm/core/util';
+import {parseXML} from 'zrender/esm/tool/parseSVG';
var storage = createHashMap();
diff --git a/src/coord/geo/parseGeoJson.js b/src/coord/geo/parseGeoJson.js
index 3f91a27..d75b0f3 100644
--- a/src/coord/geo/parseGeoJson.js
+++ b/src/coord/geo/parseGeoJson.js
@@ -22,7 +22,7 @@
* @module echarts/coord/geo/parseGeoJson
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import Region from './Region';
function decode(json) {
diff --git a/src/coord/geo/prepareCustom.js b/src/coord/geo/prepareCustom.js
index 1cccc2b..3ec5d79 100644
--- a/src/coord/geo/prepareCustom.js
+++ b/src/coord/geo/prepareCustom.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 55e4ae9..c43ed18 100644
--- a/src/coord/parallel/AxisModel.js
+++ b/src/coord/parallel/AxisModel.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 b74d13b..69280f8 100644
--- a/src/coord/parallel/Parallel.js
+++ b/src/coord/parallel/Parallel.js
@@ -22,8 +22,8 @@
* <https://en.wikipedia.org/wiki/Parallel_coordinates>
*/
-import * as zrUtil from 'zrender/src/core/util';
-import * as matrix from 'zrender/src/core/matrix';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as matrix from 'zrender/esm/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 c37ab96..5c29578 100644
--- a/src/coord/parallel/ParallelAxis.js
+++ b/src/coord/parallel/ParallelAxis.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import Axis from '../Axis';
/**
diff --git a/src/coord/parallel/ParallelModel.js b/src/coord/parallel/ParallelModel.js
index 8e608ee..962f90b 100644
--- a/src/coord/parallel/ParallelModel.js
+++ b/src/coord/parallel/ParallelModel.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import Component from '../../model/Component';
import './AxisModel';
diff --git a/src/coord/parallel/parallelPreprocessor.js b/src/coord/parallel/parallelPreprocessor.js
index ff68d69..5e9e0de 100644
--- a/src/coord/parallel/parallelPreprocessor.js
+++ b/src/coord/parallel/parallelPreprocessor.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 1dae806..31fc293 100644
--- a/src/coord/polar/AngleAxis.js
+++ b/src/coord/polar/AngleAxis.js
@@ -17,8 +17,8 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-import * as textContain from 'zrender/src/contain/text';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as textContain from 'zrender/esm/contain/text';
import Axis from '../Axis';
import {makeInner} from '../../util/model';
diff --git a/src/coord/polar/AxisModel.js b/src/coord/polar/AxisModel.js
index 61b7d58..8bddc10 100644
--- a/src/coord/polar/AxisModel.js
+++ b/src/coord/polar/AxisModel.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 3f15e71..66b55d5 100644
--- a/src/coord/polar/RadiusAxis.js
+++ b/src/coord/polar/RadiusAxis.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 156f97f..39c3e23 100644
--- a/src/coord/polar/polarCreator.js
+++ b/src/coord/polar/polarCreator.js
@@ -20,7 +20,7 @@
// TODO Axis scale
import {__DEV__} from '../../config';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 e3382fe..f020245 100644
--- a/src/coord/polar/prepareCustom.js
+++ b/src/coord/polar/prepareCustom.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 8648186..5490f3f 100644
--- a/src/coord/radar/IndicatorAxis.js
+++ b/src/coord/radar/IndicatorAxis.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 b7e57ae..85cbd01 100644
--- a/src/coord/radar/Radar.js
+++ b/src/coord/radar/Radar.js
@@ -19,7 +19,7 @@
// TODO clockwise
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 c7e7196..4b9a948 100644
--- a/src/coord/radar/RadarModel.js
+++ b/src/coord/radar/RadarModel.js
@@ -18,7 +18,7 @@
*/
import * as echarts from '../../echarts';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 c11cb57..f0a05f6 100644
--- a/src/coord/single/AxisModel.js
+++ b/src/coord/single/AxisModel.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import ComponentModel from '../../model/Component';
import axisModelCreator from '../axisModelCreator';
import axisModelCommonMixin from '../axisModelCommonMixin';
diff --git a/src/coord/single/Single.js b/src/coord/single/Single.js
index de11a6f..d99572d 100644
--- a/src/coord/single/Single.js
+++ b/src/coord/single/Single.js
@@ -24,7 +24,7 @@
import SingleAxis from './SingleAxis';
import * as axisHelper from '../axisHelper';
import {getLayoutRect} from '../../util/layout';
-import {each} from 'zrender/src/core/util';
+import {each} from 'zrender/esm/core/util';
/**
* Create a single coordinates system.
diff --git a/src/coord/single/SingleAxis.js b/src/coord/single/SingleAxis.js
index 9ba9563..9b96f8d 100644
--- a/src/coord/single/SingleAxis.js
+++ b/src/coord/single/SingleAxis.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import Axis from '../Axis';
/**
diff --git a/src/coord/single/prepareCustom.js b/src/coord/single/prepareCustom.js
index a3ab002..5593778 100644
--- a/src/coord/single/prepareCustom.js
+++ b/src/coord/single/prepareCustom.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
function dataToCoordSize(dataSize, dataItem) {
// dataItem is necessary in log axis.
diff --git a/src/coord/single/singleAxisHelper.js b/src/coord/single/singleAxisHelper.js
index fa44fda..207fed0 100644
--- a/src/coord/single/singleAxisHelper.js
+++ b/src/coord/single/singleAxisHelper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
/**
* @param {Object} opt {labelInside}
diff --git a/src/data/DataDimensionInfo.js b/src/data/DataDimensionInfo.js
index 3bda37d..241b6f8 100644
--- a/src/data/DataDimensionInfo.js
+++ b/src/data/DataDimensionInfo.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
/**
* @class
diff --git a/src/data/Graph.js b/src/data/Graph.js
index 17b10b7..754d701 100644
--- a/src/data/Graph.js
+++ b/src/data/Graph.js
@@ -18,7 +18,7 @@
*/
import {__DEV__} from '../config';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {enableClassCheck} from '../util/clazz';
// id may be function name of Object, add a prefix to avoid this problem.
diff --git a/src/data/List.js b/src/data/List.js
index 7ec46e6..542c41a 100644
--- a/src/data/List.js
+++ b/src/data/List.js
@@ -25,7 +25,7 @@
*/
import {__DEV__} from '../config';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import Model from '../model/Model';
import DataDiffer from './DataDiffer';
import Source from './Source';
diff --git a/src/data/OrdinalMeta.js b/src/data/OrdinalMeta.js
index d20c1d1..0feacba 100644
--- a/src/data/OrdinalMeta.js
+++ b/src/data/OrdinalMeta.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import {createHashMap, isObject, map} from 'zrender/src/core/util';
+import {createHashMap, isObject, map} from 'zrender/esm/core/util';
/**
* @constructor
diff --git a/src/data/Source.js b/src/data/Source.js
index 55acf3a..261e1c1 100644
--- a/src/data/Source.js
+++ b/src/data/Source.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import {createHashMap, isTypedArray} from 'zrender/src/core/util';
+import {createHashMap, isTypedArray} from 'zrender/esm/core/util';
import {enableClassCheck} from '../util/clazz';
import {
SOURCE_FORMAT_ORIGINAL,
diff --git a/src/data/Tree.js b/src/data/Tree.js
index 85b41a2..cb86fb7 100644
--- a/src/data/Tree.js
+++ b/src/data/Tree.js
@@ -23,7 +23,7 @@
* @module echarts/data/Tree
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import Model from '../model/Model';
import linkList from './helper/linkList';
import List from './List';
diff --git a/src/data/helper/completeDimensions.js b/src/data/helper/completeDimensions.js
index 41fa8eb..ea819f0 100644
--- a/src/data/helper/completeDimensions.js
+++ b/src/data/helper/completeDimensions.js
@@ -22,7 +22,7 @@
* Use `echarts/data/helper/createDimensions` instead.
*/
-import {createHashMap, each, isString, defaults, extend, isObject, clone} from 'zrender/src/core/util';
+import {createHashMap, each, isString, defaults, extend, isObject, clone} from 'zrender/esm/core/util';
import {normalizeToArray} from '../../util/model';
import {guessOrdinal, BE_ORDINAL} from './sourceHelper';
import Source from '../Source';
diff --git a/src/data/helper/dataProvider.js b/src/data/helper/dataProvider.js
index bac6936..90b2961 100644
--- a/src/data/helper/dataProvider.js
+++ b/src/data/helper/dataProvider.js
@@ -22,7 +22,7 @@
// merge with defaultDimValueGetter?
import {__DEV__} from '../../config';
-import {isTypedArray, extend, assert, each, isObject} from 'zrender/src/core/util';
+import {isTypedArray, extend, assert, each, isObject} from 'zrender/esm/core/util';
import {getDataItemValue, isDataItemOption} from '../../util/model';
import {parseDate} from '../../util/number';
import Source from '../Source';
diff --git a/src/data/helper/dataStackHelper.js b/src/data/helper/dataStackHelper.js
index d0c9145..9c586e2 100644
--- a/src/data/helper/dataStackHelper.js
+++ b/src/data/helper/dataStackHelper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import {each, isString} from 'zrender/src/core/util';
+import {each, isString} from 'zrender/esm/core/util';
/**
* Note that it is too complicated to support 3d stack by value
diff --git a/src/data/helper/dimensionHelper.js b/src/data/helper/dimensionHelper.js
index b0e616c..82f9c9e 100644
--- a/src/data/helper/dimensionHelper.js
+++ b/src/data/helper/dimensionHelper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import {each, createHashMap, assert} from 'zrender/src/core/util';
+import {each, createHashMap, assert} from 'zrender/esm/core/util';
import { __DEV__ } from '../../config';
export var OTHER_DIMENSIONS = createHashMap([
diff --git a/src/data/helper/linkList.js b/src/data/helper/linkList.js
index a5a2385..ecf75e0 100644
--- a/src/data/helper/linkList.js
+++ b/src/data/helper/linkList.js
@@ -21,7 +21,7 @@
* Link lists and struct (graph or tree)
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
var each = zrUtil.each;
diff --git a/src/data/helper/sourceHelper.js b/src/data/helper/sourceHelper.js
index b58b01f..08297b7 100644
--- a/src/data/helper/sourceHelper.js
+++ b/src/data/helper/sourceHelper.js
@@ -30,7 +30,7 @@ import {
isArrayLike,
extend,
assert
-} from 'zrender/src/core/util';
+} from 'zrender/esm/core/util';
import Source from '../Source';
import {
diff --git a/src/echarts.js b/src/echarts.js
index 36a29cf..6354dcf 100644
--- a/src/echarts.js
+++ b/src/echarts.js
@@ -17,12 +17,12 @@
* under the License.
*/
import {__DEV__} from './config';
-import * as zrender from 'zrender/src/zrender';
-import * as zrUtil from 'zrender/src/core/util';
-import * as colorTool from 'zrender/src/tool/color';
-import env from 'zrender/src/core/env';
-import timsort from 'zrender/src/core/timsort';
-import Eventful from 'zrender/src/mixin/Eventful';
+import * as zrender from 'zrender/esm/zrender';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as colorTool from 'zrender/esm/tool/color';
+import env from 'zrender/esm/core/env';
+import timsort from 'zrender/esm/core/timsort';
+import Eventful from 'zrender/esm/core/Eventful';
import GlobalModel from './model/Global';
import ExtensionAPI from './ExtensionAPI';
import CoordinateSystemManager from './CoordinateSystem';
@@ -2041,7 +2041,7 @@ export function init(dom, theme, opts) {
// Check version
if ((zrender.version.replace('.', '') - 0) < (dependencies.zrender.replace('.', '') - 0)) {
throw new Error(
- 'zrender/src ' + zrender.version
+ 'zrender/esm ' + zrender.version
+ ' is too old for ECharts ' + version
+ '. Current version need ZRender '
+ dependencies.zrender + '+'
diff --git a/src/export.js b/src/export.js
index 6ddd62e..fa09b82 100644
--- a/src/export.js
+++ b/src/export.js
@@ -21,11 +21,11 @@
* Do not mount those modules on 'src/echarts' for better tree shaking.
*/
-import * as zrender from 'zrender/src/zrender';
-import * as matrix from 'zrender/src/core/matrix';
-import * as vector from 'zrender/src/core/vector';
-import * as zrUtil from 'zrender/src/core/util';
-import * as colorTool from 'zrender/src/tool/color';
+import * as zrender from 'zrender/esm/zrender';
+import * as matrix from 'zrender/esm/core/matrix';
+import * as vector from 'zrender/esm/core/vector';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as colorTool from 'zrender/esm/tool/color';
import * as graphicUtil from './util/graphic';
import * as numberUtil from './util/number';
import * as formatUtil from './util/format';
@@ -45,7 +45,7 @@ export {ecHelper as helper};
export {matrix};
export {vector};
export {colorTool as color};
-export {default as env} from 'zrender/src/core/env';
+export {default as env} from 'zrender/esm/core/env';
export {parseGeoJSON};
export var parseGeoJson = parseGeoJSON;
diff --git a/src/helper.js b/src/helper.js
index 43c55f6..ee6c672 100644
--- a/src/helper.js
+++ b/src/helper.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import createListFromArray from './chart/helper/createListFromArray';
// import createGraphFromNodeEdge from './chart/helper/createGraphFromNodeEdge';
import * as axisHelper from './coord/axisHelper';
diff --git a/src/layout/barGrid.js b/src/layout/barGrid.js
index e7947eb..484657c 100644
--- a/src/layout/barGrid.js
+++ b/src/layout/barGrid.js
@@ -19,7 +19,7 @@
/* global Float32Array */
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {parsePercent} from '../util/number';
import {isDimensionStacked} from '../data/helper/dataStackHelper';
import createRenderPlanner from '../chart/helper/createRenderPlanner';
diff --git a/src/layout/barPolar.js b/src/layout/barPolar.js
index 2aebd93..5c2e57f 100644
--- a/src/layout/barPolar.js
+++ b/src/layout/barPolar.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {parsePercent} from '../util/number';
import {isDimensionStacked} from '../data/helper/dataStackHelper';
diff --git a/src/layout/points.js b/src/layout/points.js
index ef85e7a..9bc2905 100644
--- a/src/layout/points.js
+++ b/src/layout/points.js
@@ -19,7 +19,7 @@
/* global Float32Array */
-import {map} from 'zrender/src/core/util';
+import {map} from 'zrender/esm/core/util';
import createRenderPlanner from '../chart/helper/createRenderPlanner';
import {isDimensionStacked} from '../data/helper/dataStackHelper';
diff --git a/src/loading/default.js b/src/loading/default.js
index 13d90d5..9137ad6 100644
--- a/src/loading/default.js
+++ b/src/loading/default.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 548d98e..cb374cb 100644
--- a/src/model/Component.js
+++ b/src/model/Component.js
@@ -23,7 +23,7 @@
* @module echarts/model/Component
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import Model from './Model';
import * as componentUtil from '../util/component';
import {enableClassManagement, parseClassType} from '../util/clazz';
diff --git a/src/model/Global.js b/src/model/Global.js
index dcc9a0b..161d0cd 100644
--- a/src/model/Global.js
+++ b/src/model/Global.js
@@ -41,7 +41,7 @@ import {__DEV__} from '../config';
import {
each, filter, map, isArray, indexOf, isObject, isString,
createHashMap, assert, clone, merge, extend, mixin
-} from 'zrender/src/core/util';
+} from 'zrender/esm/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 ee5c687..e92bbf9 100644
--- a/src/model/Model.js
+++ b/src/model/Model.js
@@ -21,8 +21,8 @@
* @module echarts/model/Model
*/
-import * as zrUtil from 'zrender/src/core/util';
-import env from 'zrender/src/core/env';
+import * as zrUtil from 'zrender/esm/core/util';
+import env from 'zrender/esm/core/env';
import {makeInner} from '../util/model';
import {enableClassExtend, enableClassCheck} from '../util/clazz';
diff --git a/src/model/OptionManager.js b/src/model/OptionManager.js
index f9b250c..3d9ffa8 100644
--- a/src/model/OptionManager.js
+++ b/src/model/OptionManager.js
@@ -24,7 +24,7 @@
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 98ef49c..b090c32 100644
--- a/src/model/Series.js
+++ b/src/model/Series.js
@@ -18,8 +18,8 @@
*/
import {__DEV__} from '../config';
-import * as zrUtil from 'zrender/src/core/util';
-import env from 'zrender/src/core/env';
+import * as zrUtil from 'zrender/esm/core/util';
+import env from 'zrender/esm/core/env';
import {
formatTime,
encodeHTML,
diff --git a/src/model/mixin/makeStyleMapper.js b/src/model/mixin/makeStyleMapper.js
index b4fdcfe..8560837 100644
--- a/src/model/mixin/makeStyleMapper.js
+++ b/src/model/mixin/makeStyleMapper.js
@@ -19,7 +19,7 @@
// TODO Parse shadow style
// TODO Only shallow path support
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
export default function (properties) {
// Normalize
diff --git a/src/model/mixin/textStyle.js b/src/model/mixin/textStyle.js
index 67ddb45..4b9fdb3 100644
--- a/src/model/mixin/textStyle.js
+++ b/src/model/mixin/textStyle.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as textContain from 'zrender/src/contain/text';
+import * as textContain from 'zrender/esm/contain/text';
import * as graphicUtil from '../../util/graphic';
var PATH_COLOR = ['textStyle', 'color'];
diff --git a/src/model/referHelper.js b/src/model/referHelper.js
index ec9dc8f..2880d83 100644
--- a/src/model/referHelper.js
+++ b/src/model/referHelper.js
@@ -27,7 +27,7 @@
// check: "modelHelper" of tooltip and "BrushTargetManager".
import {__DEV__} from '../config';
-import {createHashMap, retrieve, each} from 'zrender/src/core/util';
+import {createHashMap, retrieve, each} from 'zrender/esm/core/util';
/**
* @class
diff --git a/src/preprocessor/backwardCompat.js b/src/preprocessor/backwardCompat.js
index 50f09e8..1775ede 100644
--- a/src/preprocessor/backwardCompat.js
+++ b/src/preprocessor/backwardCompat.js
@@ -19,7 +19,7 @@
// Compatitable with 2.0
-import {each, isArray, isObject} from 'zrender/src/core/util';
+import {each, isArray, isObject} from 'zrender/esm/core/util';
import compatStyle from './helper/compatStyle';
import {normalizeToArray} from '../util/model';
diff --git a/src/preprocessor/helper/compatStyle.js b/src/preprocessor/helper/compatStyle.js
index c338d66..381a74a 100644
--- a/src/preprocessor/helper/compatStyle.js
+++ b/src/preprocessor/helper/compatStyle.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as modelUtil from '../../util/model';
var each = zrUtil.each;
diff --git a/src/processor/dataStack.js b/src/processor/dataStack.js
index 360dd21..4123112 100644
--- a/src/processor/dataStack.js
+++ b/src/processor/dataStack.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import {createHashMap, each} from 'zrender/src/core/util';
+import {createHashMap, each} from 'zrender/esm/core/util';
// (1) [Caution]: the logic is correct based on the premises:
// data processing stage is blocked in stream.
diff --git a/src/scale/Log.js b/src/scale/Log.js
index 30ed833..7fab814 100644
--- a/src/scale/Log.js
+++ b/src/scale/Log.js
@@ -22,7 +22,7 @@
* @module echarts/scale/Log
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/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 ef1246c..4dbbde7 100644
--- a/src/scale/Ordinal.js
+++ b/src/scale/Ordinal.js
@@ -26,7 +26,7 @@
// FIXME only one data
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import Scale from './Scale';
import OrdinalMeta from '../data/OrdinalMeta';
diff --git a/src/scale/Time.js b/src/scale/Time.js
index 7ce120d..519bb7e 100644
--- a/src/scale/Time.js
+++ b/src/scale/Time.js
@@ -38,7 +38,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 * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as numberUtil from '../util/number';
import * as formatUtil from '../util/format';
import * as scaleHelper from './helper';
diff --git a/src/stream/Scheduler.js b/src/stream/Scheduler.js
index ce34db5..86f028b 100644
--- a/src/stream/Scheduler.js
+++ b/src/stream/Scheduler.js
@@ -21,7 +21,7 @@
* @module echarts/stream/Scheduler
*/
-import {each, map, isFunction, createHashMap, noop} from 'zrender/src/core/util';
+import {each, map, isFunction, createHashMap, noop} from 'zrender/esm/core/util';
import {createTask} from './task';
import {getUID} from '../util/component';
import GlobalModel from '../model/Global';
diff --git a/src/stream/task.js b/src/stream/task.js
index 9981a6a..4cc3474 100644
--- a/src/stream/task.js
+++ b/src/stream/task.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import {assert, isArray} from 'zrender/src/core/util';
+import {assert, isArray} from 'zrender/esm/core/util';
import { __DEV__ } from '../config';
/**
diff --git a/src/util/animation.js b/src/util/animation.js
index 367de52..f859545 100644
--- a/src/util/animation.js
+++ b/src/util/animation.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
/**
* @param {number} [time=500] Time in ms
diff --git a/src/util/clazz.js b/src/util/clazz.js
index 738044a..6d1c027 100644
--- a/src/util/clazz.js
+++ b/src/util/clazz.js
@@ -18,7 +18,7 @@
*/
import {__DEV__} from '../config';
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
var TYPE_DELIMITER = '.';
var IS_CONTAINER = '___EC__COMPONENT__CONTAINER___';
diff --git a/src/util/component.js b/src/util/component.js
index 198b8c9..cc86c68 100644
--- a/src/util/component.js
+++ b/src/util/component.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import {parseClassType} from './clazz';
var base = 0;
diff --git a/src/util/format.js b/src/util/format.js
index d499d52..d13268f 100644
--- a/src/util/format.js
+++ b/src/util/format.js
@@ -17,10 +17,10 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-import * as textContain from 'zrender/src/contain/text';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as textContain from 'zrender/esm/contain/text';
import * as numberUtil from './number';
-// import Text from 'zrender/src/graphic/Text';
+// import Text from 'zrender/esm/graphic/Text';
/**
* 每三位默认加,格式化
diff --git a/src/util/graphic.js b/src/util/graphic.js
index 2720dac..d6a8628 100644
--- a/src/util/graphic.js
+++ b/src/util/graphic.js
@@ -17,31 +17,31 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-import * as pathTool from 'zrender/src/tool/path';
-import * as colorTool from 'zrender/src/tool/color';
-import * as matrix from 'zrender/src/core/matrix';
-import * as vector from 'zrender/src/core/vector';
-import Path from 'zrender/src/graphic/Path';
-import Transformable from 'zrender/src/mixin/Transformable';
-import ZImage from 'zrender/src/graphic/Image';
-import Group from 'zrender/src/container/Group';
-import Text from 'zrender/src/graphic/Text';
-import Circle from 'zrender/src/graphic/shape/Circle';
-import Sector from 'zrender/src/graphic/shape/Sector';
-import Ring from 'zrender/src/graphic/shape/Ring';
-import Polygon from 'zrender/src/graphic/shape/Polygon';
-import Polyline from 'zrender/src/graphic/shape/Polyline';
-import Rect from 'zrender/src/graphic/shape/Rect';
-import Line from 'zrender/src/graphic/shape/Line';
-import BezierCurve from 'zrender/src/graphic/shape/BezierCurve';
-import Arc from 'zrender/src/graphic/shape/Arc';
-import CompoundPath from 'zrender/src/graphic/CompoundPath';
-import LinearGradient from 'zrender/src/graphic/LinearGradient';
-import RadialGradient from 'zrender/src/graphic/RadialGradient';
-import BoundingRect from 'zrender/src/core/BoundingRect';
-import IncrementalDisplayable from 'zrender/src/graphic/IncrementalDisplayable';
-import * as subPixelOptimizeUtil from 'zrender/src/graphic/helper/subPixelOptimize';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as pathTool from 'zrender/esm/tool/path';
+import * as colorTool from 'zrender/esm/tool/color';
+import * as matrix from 'zrender/esm/core/matrix';
+import * as vector from 'zrender/esm/core/vector';
+import Path from 'zrender/esm/graphic/Path';
+import Transformable from 'zrender/esm/core/Transformable';
+import ZImage from 'zrender/esm/graphic/Image';
+import Group from 'zrender/esm/container/Group';
+import Text from 'zrender/esm/graphic/Text';
+import Circle from 'zrender/esm/graphic/shape/Circle';
+import Sector from 'zrender/esm/graphic/shape/Sector';
+import Ring from 'zrender/esm/graphic/shape/Ring';
+import Polygon from 'zrender/esm/graphic/shape/Polygon';
+import Polyline from 'zrender/esm/graphic/shape/Polyline';
+import Rect from 'zrender/esm/graphic/shape/Rect';
+import Line from 'zrender/esm/graphic/shape/Line';
+import BezierCurve from 'zrender/esm/graphic/shape/BezierCurve';
+import Arc from 'zrender/esm/graphic/shape/Arc';
+import CompoundPath from 'zrender/esm/graphic/CompoundPath';
+import LinearGradient from 'zrender/esm/graphic/LinearGradient';
+import RadialGradient from 'zrender/esm/graphic/RadialGradient';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
+import IncrementalDisplayable from 'zrender/esm/graphic/IncrementalDisplayable';
+import * as subPixelOptimizeUtil from 'zrender/esm/graphic/helper/subPixelOptimize';
var mathMax = Math.max;
@@ -620,7 +620,7 @@ export function setAsHighDownDispatcher(el, asDispatcher) {
}
/**
- * @param {module:zrender/src/Element} el
+ * @param {module:zrender/esm/Element} el
* @return {boolean}
*/
export function isHighDownDispatcher(el) {
@@ -719,7 +719,7 @@ export function setLabelStyle(
* Modify label style manually.
* Only works after `setLabelStyle` and `setElementHoverStyle` called.
*
- * @param {module:zrender/src/Element} el
+ * @param {module:zrender/esm/Element} el
* @param {Object} [normalStyleProps] optional
* @param {Object} [emphasisStyleProps] optional
*/
@@ -791,7 +791,7 @@ export function setText(textStyle, labelModel, defaultColor) {
* to manage.)
*
* The `textStyle` object can either be a plain object or an instance of
- * `zrender/src/graphic/Style`, and either be the style of normal or emphasis.
+ * `zrender/esm/graphic/Style`, and either be the style of normal or emphasis.
* After this mothod called, the `textStyle` object can then be used in
* `el.setStyle(textStyle)` or `el.hoverStyle = textStyle`.
*
@@ -997,7 +997,7 @@ function getAutoColor(color, opt) {
* restore the style.
*
* Usage (& NOTICE):
- * When a style object (eithor plain object or instance of `zrender/src/graphic/Style`) is
+ * When a style object (eithor plain object or instance of `zrender/esm/graphic/Style`) is
* about to be modified on its text related properties, `rollbackDefaultTextStyle` should
* be called before the modification and `applyDefaultTextStyle` should be called after that.
* (For the case that all of the text related properties is reset, like `setTextStyleCommon`
@@ -1167,8 +1167,8 @@ export function initProps(el, props, animatableModel, dataIndex, cb) {
* Get transform matrix of target (param target),
* in coordinate of its ancestor (param ancestor)
*
- * @param {module:zrender/mixin/Transformable} target
- * @param {module:zrender/mixin/Transformable} [ancestor]
+ * @param {module:zrender/core/Transformable} target
+ * @param {module:zrender/core/Transformable} [ancestor]
*/
export function getTransform(target, ancestor) {
var mat = matrix.identity([]);
diff --git a/src/util/layout.js b/src/util/layout.js
index cab9acf..18670a4 100644
--- a/src/util/layout.js
+++ b/src/util/layout.js
@@ -19,8 +19,8 @@
// Layout helpers for each component positioning
-import * as zrUtil from 'zrender/src/core/util';
-import BoundingRect from 'zrender/src/core/BoundingRect';
+import * as zrUtil from 'zrender/esm/core/util';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
import {parsePercent} from './number';
import * as formatUtil from './format';
diff --git a/src/util/model.js b/src/util/model.js
index 653a8ef..d6f3f66 100644
--- a/src/util/model.js
+++ b/src/util/model.js
@@ -17,8 +17,8 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-import env from 'zrender/src/core/env';
+import * as zrUtil from 'zrender/esm/core/util';
+import env from 'zrender/esm/core/env';
var each = zrUtil.each;
var isObject = zrUtil.isObject;
diff --git a/src/util/number.js b/src/util/number.js
index cf84e9a..146239b 100644
--- a/src/util/number.js
+++ b/src/util/number.js
@@ -26,7 +26,7 @@
* </licenses/LICENSE-d3>).
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
var RADIAN_EPSILON = 1e-4;
diff --git a/src/util/symbol.js b/src/util/symbol.js
index 602ebfb..3662870 100644
--- a/src/util/symbol.js
+++ b/src/util/symbol.js
@@ -19,10 +19,10 @@
// Symbol factory
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import * as graphic from './graphic';
-import BoundingRect from 'zrender/src/core/BoundingRect';
-import {calculateTextPosition} from 'zrender/src/contain/text';
+import BoundingRect from 'zrender/esm/core/BoundingRect';
+import {calculateTextPosition} from 'zrender/esm/contain/text';
/**
* Triangle shape
diff --git a/src/view/Chart.js b/src/view/Chart.js
index bc7c70b..c93d302 100644
--- a/src/view/Chart.js
+++ b/src/view/Chart.js
@@ -17,8 +17,8 @@
* under the License.
*/
-import {each} from 'zrender/src/core/util';
-import Group from 'zrender/src/container/Group';
+import {each} from 'zrender/esm/core/util';
+import Group from 'zrender/esm/container/Group';
import * as componentUtil from '../util/component';
import * as clazzUtil from '../util/clazz';
import * as modelUtil from '../util/model';
diff --git a/src/view/Component.js b/src/view/Component.js
index c5bfc77..3dab984 100644
--- a/src/view/Component.js
+++ b/src/view/Component.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import Group from 'zrender/src/container/Group';
+import Group from 'zrender/esm/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 e0bd0f1..a089408 100644
--- a/src/visual/VisualMapping.js
+++ b/src/visual/VisualMapping.js
@@ -17,8 +17,8 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
-import * as zrColor from 'zrender/src/tool/color';
+import * as zrUtil from 'zrender/esm/core/util';
+import * as zrColor from 'zrender/esm/tool/color';
import {linearMap} from '../util/number';
var each = zrUtil.each;
diff --git a/src/visual/aria.js b/src/visual/aria.js
index abd655c..86205f0 100644
--- a/src/visual/aria.js
+++ b/src/visual/aria.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import lang from '../lang';
import { retrieveRawValue } from '../data/helper/dataProvider';
diff --git a/src/visual/dataColor.js b/src/visual/dataColor.js
index c32419d..e6f6208 100644
--- a/src/visual/dataColor.js
+++ b/src/visual/dataColor.js
@@ -20,7 +20,7 @@
// Pick color from palette for each data item.
// Applicable for charts that require applying color palette
// in data level (like pie, funnel, chord).
-import {createHashMap} from 'zrender/src/core/util';
+import {createHashMap} from 'zrender/esm/core/util';
export default function (seriesType) {
return {
diff --git a/src/visual/seriesColor.js b/src/visual/seriesColor.js
index be23206..1633220 100644
--- a/src/visual/seriesColor.js
+++ b/src/visual/seriesColor.js
@@ -17,8 +17,8 @@
* under the License.
*/
-import Gradient from 'zrender/src/graphic/Gradient';
-import {isFunction} from 'zrender/src/core/util';
+import Gradient from 'zrender/esm/graphic/Gradient';
+import {isFunction} from 'zrender/esm/core/util';
export default {
createOnAllSeries: true,
diff --git a/src/visual/symbol.js b/src/visual/symbol.js
index 8cd7e06..43dea48 100644
--- a/src/visual/symbol.js
+++ b/src/visual/symbol.js
@@ -17,7 +17,7 @@
* under the License.
*/
-import {isFunction} from 'zrender/src/core/util';
+import {isFunction} from 'zrender/esm/core/util';
export default function (seriesType, defaultSymbolType, legendSymbol) {
// Encoding visual for all series include which is filtered for legend drawing
diff --git a/src/visual/visualDefault.js b/src/visual/visualDefault.js
index 457b9ea..7e510aa 100644
--- a/src/visual/visualDefault.js
+++ b/src/visual/visualDefault.js
@@ -21,7 +21,7 @@
* @file Visual mapping.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
var visualDefault = {
diff --git a/src/visual/visualSolution.js b/src/visual/visualSolution.js
index 46bc3b6..105792e 100644
--- a/src/visual/visualSolution.js
+++ b/src/visual/visualSolution.js
@@ -21,7 +21,7 @@
* @file Visual solution, for consistent option specification.
*/
-import * as zrUtil from 'zrender/src/core/util';
+import * as zrUtil from 'zrender/esm/core/util';
import VisualMapping from './VisualMapping';
var each = zrUtil.each;
diff --git a/test/force2.html b/test/force2.html
index 0bd5ebf..6111b71 100644
--- a/test/force2.html
+++ b/test/force2.html
@@ -45,7 +45,7 @@ under the License.
var gexf = dataTool.gexf;
- var chart = echarts.init(document.getElementById('main');
+ var chart = echarts.init(document.getElementById('main'));
$.get('./data/les-miserables.gexf', function (xml) {
var graph = gexf.parse(xml);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org