echarts 3.6.1 → 3.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/echarts-en.js +77756 -0
- package/dist/echarts-en.min.js +38 -0
- package/dist/echarts.common-en.js +50169 -0
- package/dist/echarts.common-en.min.js +30 -0
- package/dist/echarts.common.js +5799 -3093
- package/dist/echarts.common.min.js +14 -13
- package/dist/echarts.js +7628 -4679
- package/dist/echarts.min.js +22 -22
- package/dist/echarts.simple-en.js +34988 -0
- package/dist/echarts.simple-en.min.js +27 -0
- package/dist/echarts.simple.js +4472 -2493
- package/dist/echarts.simple.min.js +11 -9
- package/dist/extension/bmap.js +50 -11
- package/dist/extension/bmap.min.js +1 -1
- package/dist/extension/dataTool.js +10 -10
- package/extension/bmap/BMapCoordSys.js +40 -1
- package/index.blank.js +4 -0
- package/index.common.js +1 -1
- package/index.js +1 -1
- package/lib/action/createDataSelectAction.js +6 -2
- package/lib/chart/bar/BarView.js +6 -3
- package/lib/chart/bar/BaseBarSeries.js +4 -3
- package/lib/chart/bar/PictorialBarSeries.js +1 -1
- package/lib/chart/bar/PictorialBarView.js +29 -7
- package/lib/chart/bar/helper.js +14 -31
- package/lib/chart/candlestick/candlestickLayout.js +49 -6
- package/lib/chart/chord/chordCircularLayout.js +2 -2
- package/lib/chart/custom.js +135 -21
- package/lib/chart/funnel/FunnelSeries.js +0 -1
- package/lib/chart/funnel/FunnelView.js +15 -22
- package/lib/chart/funnel/funnelLayout.js +1 -1
- package/lib/chart/gauge/GaugeSeries.js +7 -12
- package/lib/chart/gauge/GaugeView.js +32 -53
- package/lib/chart/graph/GraphSeries.js +2 -1
- package/lib/chart/graph/GraphView.js +39 -45
- package/lib/chart/graph/forceHelper.js +5 -0
- package/lib/chart/graph/forceLayout.js +1 -1
- package/lib/chart/heatmap/HeatmapLayer.js +7 -0
- package/lib/chart/heatmap/HeatmapView.js +10 -9
- package/lib/chart/helper/EffectSymbol.js +3 -3
- package/lib/chart/helper/LargeSymbolDraw.js +6 -1
- package/lib/chart/helper/Line.js +40 -22
- package/lib/chart/helper/Symbol.js +20 -7
- package/lib/chart/helper/SymbolDraw.js +2 -1
- package/lib/chart/helper/labelHelper.js +0 -17
- package/lib/chart/helper/whiskerBoxCommon.js +11 -3
- package/lib/chart/line/LineSeries.js +1 -0
- package/lib/chart/line/LineView.js +14 -2
- package/lib/chart/line/poly.js +5 -0
- package/lib/chart/lines/LinesView.js +22 -7
- package/lib/chart/map/MapSeries.js +3 -7
- package/lib/chart/map/MapView.js +29 -18
- package/lib/chart/pie/PieSeries.js +20 -6
- package/lib/chart/pie/PieView.js +20 -23
- package/lib/chart/pie/labelLayout.js +3 -3
- package/lib/chart/radar/RadarView.js +16 -20
- package/lib/chart/sankey/SankeySeries.js +2 -4
- package/lib/chart/sankey/SankeyView.js +13 -29
- package/lib/chart/sankey/sankeyLayout.js +1 -1
- package/lib/chart/scatter/ScatterSeries.js +2 -1
- package/lib/chart/themeRiver/ThemeRiverSeries.js +2 -4
- package/lib/chart/themeRiver/ThemeRiverView.js +2 -5
- package/lib/chart/themeRiver/themeRiverLayout.js +1 -1
- package/lib/chart/treemap/Breadcrumb.js +1 -1
- package/lib/chart/treemap/TreemapSeries.js +28 -8
- package/lib/chart/treemap/TreemapView.js +88 -77
- package/lib/chart/treemap/treemapLayout.js +29 -13
- package/lib/component/axis/AngleAxisView.js +13 -19
- package/lib/component/axis/AxisBuilder.js +260 -186
- package/lib/component/axis/CartesianAxisView.js +15 -3
- package/lib/component/axis/ParallelAxisView.js +1 -1
- package/lib/component/axis/RadiusAxisView.js +1 -1
- package/lib/component/axis/SingleAxisView.js +8 -2
- package/lib/component/axis/cartesianAxisHelper.js +11 -15
- package/lib/component/axisPointer/AxisPointerModel.js +1 -3
- package/lib/component/axisPointer/BaseAxisPointer.js +15 -38
- package/lib/component/axisPointer/axisTrigger.js +36 -20
- package/lib/component/axisPointer/modelHelper.js +3 -4
- package/lib/component/axisPointer/viewHelper.js +4 -6
- package/lib/component/axisPointer.js +1 -14
- package/lib/component/calendar/CalendarView.js +22 -39
- package/lib/component/dataZoom/AxisProxy.js +3 -2
- package/lib/component/dataZoom/DataZoomModel.js +16 -4
- package/lib/component/dataZoom/InsideZoomView.js +5 -3
- package/lib/component/dataZoom/SliderZoomView.js +21 -32
- package/lib/component/dataZoom/roams.js +33 -9
- package/lib/component/dataZoom/typeDefaulter.js +1 -1
- package/lib/component/graphic.js +17 -5
- package/lib/component/helper/BrushTargetManager.js +1 -1
- package/lib/component/helper/MapDraw.js +26 -22
- package/lib/component/helper/RoamController.js +12 -11
- package/lib/component/helper/listComponent.js +27 -24
- package/lib/component/helper/selectableMixin.js +40 -15
- package/lib/component/legend/LegendModel.js +11 -3
- package/lib/component/legend/LegendView.js +151 -70
- package/lib/component/legend/ScrollableLegendModel.js +75 -0
- package/lib/component/legend/ScrollableLegendView.js +367 -0
- package/lib/component/legend/legendAction.js +1 -0
- package/lib/component/legend/scrollableLegendAction.js +24 -0
- package/lib/component/legend.js +8 -3
- package/lib/component/legendScroll.js +11 -0
- package/lib/component/marker/MarkAreaView.js +12 -26
- package/lib/component/marker/MarkLineView.js +5 -5
- package/lib/component/marker/MarkPointView.js +4 -4
- package/lib/component/marker/MarkerModel.js +1 -4
- package/lib/component/marker/markerHelper.js +1 -0
- package/lib/component/radar/RadarView.js +6 -3
- package/lib/component/timeline/SliderTimelineModel.js +4 -6
- package/lib/component/timeline/SliderTimelineView.js +14 -16
- package/lib/component/timeline/TimelineAxis.js +1 -1
- package/lib/component/timeline/TimelineModel.js +1 -3
- package/lib/component/title.js +9 -10
- package/lib/component/toolbox/ToolboxModel.js +2 -0
- package/lib/component/toolbox/ToolboxView.js +15 -27
- package/lib/component/toolbox/feature/Brush.js +3 -8
- package/lib/component/toolbox/feature/DataView.js +5 -5
- package/lib/component/toolbox/feature/DataZoom.js +3 -4
- package/lib/component/toolbox/feature/MagicType.js +3 -6
- package/lib/component/toolbox/feature/Restore.js +2 -1
- package/lib/component/toolbox/feature/SaveAsImage.js +23 -9
- package/lib/component/tooltip/TooltipContent.js +4 -4
- package/lib/component/tooltip/TooltipView.js +29 -6
- package/lib/component/visualMap/ContinuousModel.js +2 -2
- package/lib/component/visualMap/ContinuousView.js +12 -8
- package/lib/component/visualMap/PiecewiseModel.js +1 -2
- package/lib/component/visualMap/PiecewiseView.js +2 -2
- package/lib/component/visualMap/VisualMapModel.js +18 -12
- package/lib/coord/Axis.js +1 -1
- package/lib/coord/axisDefault.js +3 -3
- package/lib/coord/axisHelper.js +18 -1
- package/lib/coord/axisModelCommonMixin.js +12 -2
- package/lib/coord/calendar/Calendar.js +65 -21
- package/lib/coord/calendar/CalendarModel.js +6 -12
- package/lib/coord/cartesian/Cartesian2D.js +0 -14
- package/lib/coord/cartesian/Grid.js +47 -28
- package/lib/coord/geo/Geo.js +2 -18
- package/lib/coord/geo/GeoModel.js +6 -13
- package/lib/coord/geo/fix/diaoyuIsland.js +30 -0
- package/lib/coord/geo/geoCreator.js +6 -1
- package/lib/coord/polar/Polar.js +0 -13
- package/lib/coord/radar/Radar.js +1 -1
- package/lib/coord/radar/RadarModel.js +6 -2
- package/lib/data/DataDiffer.js +14 -7
- package/lib/data/Graph.js +3 -0
- package/lib/data/List.js +1 -1
- package/lib/data/Tree.js +2 -2
- package/lib/data/helper/completeDimensions.js +2 -11
- package/lib/echarts.js +33 -10
- package/lib/lang/cn.js +4 -0
- package/lib/lang/default.js +42 -0
- package/lib/lang/en.js +42 -0
- package/lib/lang.js +42 -0
- package/lib/langEN.js +42 -0
- package/lib/layout/barGrid.js +11 -3
- package/lib/layout/barPolar.js +9 -2
- package/lib/model/Model.js +2 -1
- package/lib/model/Series.js +14 -6
- package/lib/model/mixin/textStyle.js +11 -9
- package/lib/preprocessor/backwardCompat.js +5 -4
- package/lib/preprocessor/helper/compatStyle.js +157 -45
- package/lib/scale/Interval.js +10 -4
- package/lib/scale/Time.js +14 -6
- package/lib/scale/helper.js +15 -2
- package/lib/util/format.js +4 -24
- package/lib/util/graphic.js +412 -21
- package/lib/util/layout.js +28 -16
- package/lib/util/model.js +26 -11
- package/lib/util/number.js +106 -21
- package/lib/visual/VisualMapping.js +4 -4
- package/package.json +3 -3
- package/rollup.config.js +49 -0
- package/src/action/createDataSelectAction.js +6 -2
- package/src/chart/bar/BarView.js +6 -3
- package/src/chart/bar/BaseBarSeries.js +4 -3
- package/src/chart/bar/PictorialBarSeries.js +1 -1
- package/src/chart/bar/PictorialBarView.js +29 -7
- package/src/chart/bar/helper.js +13 -30
- package/src/chart/candlestick/candlestickLayout.js +49 -6
- package/src/chart/chord/chordCircularLayout.js +2 -2
- package/src/chart/custom.js +135 -21
- package/src/chart/funnel/FunnelSeries.js +0 -1
- package/src/chart/funnel/FunnelView.js +15 -22
- package/src/chart/funnel/funnelLayout.js +1 -1
- package/src/chart/gauge/GaugeSeries.js +7 -12
- package/src/chart/gauge/GaugeView.js +32 -53
- package/src/chart/graph/GraphSeries.js +2 -1
- package/src/chart/graph/GraphView.js +39 -45
- package/src/chart/graph/forceHelper.js +5 -0
- package/src/chart/graph/forceLayout.js +1 -1
- package/src/chart/heatmap/HeatmapLayer.js +7 -0
- package/src/chart/heatmap/HeatmapView.js +10 -9
- package/src/chart/helper/EffectSymbol.js +3 -3
- package/src/chart/helper/LargeSymbolDraw.js +6 -1
- package/src/chart/helper/Line.js +40 -22
- package/src/chart/helper/Symbol.js +20 -7
- package/src/chart/helper/SymbolDraw.js +2 -1
- package/src/chart/helper/labelHelper.js +0 -17
- package/src/chart/helper/whiskerBoxCommon.js +11 -4
- package/src/chart/line/LineSeries.js +1 -0
- package/src/chart/line/LineView.js +14 -2
- package/src/chart/line/poly.js +5 -0
- package/src/chart/lines/LinesView.js +22 -7
- package/src/chart/map/MapSeries.js +3 -7
- package/src/chart/map/MapView.js +29 -18
- package/src/chart/pie/PieSeries.js +20 -6
- package/src/chart/pie/PieView.js +20 -23
- package/src/chart/pie/labelLayout.js +3 -3
- package/src/chart/radar/RadarView.js +16 -20
- package/src/chart/sankey/SankeySeries.js +2 -4
- package/src/chart/sankey/SankeyView.js +13 -29
- package/src/chart/sankey/sankeyLayout.js +1 -1
- package/src/chart/scatter/ScatterSeries.js +2 -1
- package/src/chart/themeRiver/ThemeRiverSeries.js +2 -4
- package/src/chart/themeRiver/ThemeRiverView.js +2 -5
- package/src/chart/themeRiver/themeRiverLayout.js +1 -1
- package/src/chart/treemap/Breadcrumb.js +1 -1
- package/src/chart/treemap/TreemapSeries.js +28 -8
- package/src/chart/treemap/TreemapView.js +88 -77
- package/src/chart/treemap/treemapLayout.js +29 -13
- package/src/component/axis/AngleAxisView.js +13 -19
- package/src/component/axis/AxisBuilder.js +260 -186
- package/src/component/axis/CartesianAxisView.js +15 -3
- package/src/component/axis/ParallelAxisView.js +1 -1
- package/src/component/axis/RadiusAxisView.js +1 -1
- package/src/component/axis/SingleAxisView.js +8 -2
- package/src/component/axis/cartesianAxisHelper.js +11 -15
- package/src/component/axisPointer/AxisPointerModel.js +1 -3
- package/src/component/axisPointer/BaseAxisPointer.js +15 -38
- package/src/component/axisPointer/axisTrigger.js +36 -20
- package/src/component/axisPointer/modelHelper.js +3 -4
- package/src/component/axisPointer/viewHelper.js +4 -6
- package/src/component/axisPointer.js +1 -14
- package/src/component/calendar/CalendarView.js +22 -39
- package/src/component/dataZoom/AxisProxy.js +3 -2
- package/src/component/dataZoom/DataZoomModel.js +16 -4
- package/src/component/dataZoom/InsideZoomView.js +5 -3
- package/src/component/dataZoom/SliderZoomView.js +21 -32
- package/src/component/dataZoom/roams.js +33 -9
- package/src/component/dataZoom/typeDefaulter.js +1 -1
- package/src/component/graphic.js +17 -5
- package/src/component/helper/BrushTargetManager.js +1 -1
- package/src/component/helper/MapDraw.js +26 -22
- package/src/component/helper/RoamController.js +12 -11
- package/src/component/helper/listComponent.js +27 -24
- package/src/component/helper/selectableMixin.js +40 -15
- package/src/component/legend/LegendModel.js +11 -3
- package/src/component/legend/LegendView.js +151 -70
- package/src/component/legend/ScrollableLegendModel.js +76 -0
- package/src/component/legend/ScrollableLegendView.js +368 -0
- package/src/component/legend/legendAction.js +1 -0
- package/src/component/legend/scrollableLegendAction.js +25 -0
- package/src/component/legend.js +8 -3
- package/src/component/legendScroll.js +12 -0
- package/src/component/marker/MarkAreaView.js +12 -26
- package/src/component/marker/MarkLineView.js +5 -5
- package/src/component/marker/MarkPointView.js +4 -4
- package/src/component/marker/MarkerModel.js +1 -4
- package/src/component/marker/markerHelper.js +1 -0
- package/src/component/radar/RadarView.js +6 -3
- package/src/component/timeline/SliderTimelineModel.js +4 -6
- package/src/component/timeline/SliderTimelineView.js +14 -16
- package/src/component/timeline/TimelineAxis.js +1 -1
- package/src/component/timeline/TimelineModel.js +1 -3
- package/src/component/title.js +9 -10
- package/src/component/toolbox/ToolboxModel.js +2 -0
- package/src/component/toolbox/ToolboxView.js +15 -27
- package/src/component/toolbox/feature/Brush.js +3 -8
- package/src/component/toolbox/feature/DataView.js +5 -5
- package/src/component/toolbox/feature/DataZoom.js +3 -4
- package/src/component/toolbox/feature/MagicType.js +3 -6
- package/src/component/toolbox/feature/Restore.js +2 -1
- package/src/component/toolbox/feature/SaveAsImage.js +23 -10
- package/src/component/tooltip/TooltipContent.js +4 -4
- package/src/component/tooltip/TooltipView.js +29 -7
- package/src/component/visualMap/ContinuousModel.js +2 -2
- package/src/component/visualMap/ContinuousView.js +12 -8
- package/src/component/visualMap/PiecewiseModel.js +1 -2
- package/src/component/visualMap/PiecewiseView.js +2 -2
- package/src/component/visualMap/VisualMapModel.js +18 -12
- package/src/coord/Axis.js +1 -1
- package/src/coord/axisDefault.js +3 -3
- package/src/coord/axisHelper.js +18 -1
- package/src/coord/axisModelCommonMixin.js +12 -2
- package/src/coord/calendar/Calendar.js +65 -21
- package/src/coord/calendar/CalendarModel.js +6 -12
- package/src/coord/cartesian/Cartesian2D.js +0 -14
- package/src/coord/cartesian/Grid.js +47 -28
- package/src/coord/geo/Geo.js +2 -18
- package/src/coord/geo/GeoModel.js +6 -13
- package/src/coord/geo/fix/diaoyuIsland.js +30 -0
- package/src/coord/geo/geoCreator.js +6 -1
- package/src/coord/polar/Polar.js +0 -13
- package/src/coord/radar/Radar.js +1 -1
- package/src/coord/radar/RadarModel.js +6 -2
- package/src/data/DataDiffer.js +14 -7
- package/src/data/Graph.js +3 -0
- package/src/data/List.js +1 -1
- package/src/data/Tree.js +2 -2
- package/src/data/helper/completeDimensions.js +2 -11
- package/src/echarts.js +33 -10
- package/src/lang.js +43 -0
- package/src/langEN.js +43 -0
- package/src/layout/barGrid.js +11 -3
- package/src/layout/barPolar.js +9 -2
- package/src/model/Model.js +2 -1
- package/src/model/Series.js +14 -6
- package/src/model/mixin/textStyle.js +11 -9
- package/src/preprocessor/backwardCompat.js +5 -4
- package/src/preprocessor/helper/compatStyle.js +157 -45
- package/src/scale/Interval.js +10 -4
- package/src/scale/Time.js +14 -6
- package/src/scale/helper.js +15 -2
- package/src/util/format.js +4 -24
- package/src/util/graphic.js +412 -21
- package/src/util/layout.js +28 -16
- package/src/util/model.js +26 -11
- package/src/util/number.js +106 -21
- package/src/visual/VisualMapping.js +4 -4
- package/webpack.config.js +21 -7
- package/.npmignore +0 -10
package/src/data/List.js
CHANGED
package/src/data/Tree.js
CHANGED
|
@@ -220,7 +220,7 @@ define(function(require) {
|
|
|
220
220
|
},
|
|
221
221
|
|
|
222
222
|
/**
|
|
223
|
-
* @param {string} path
|
|
223
|
+
* @param {string} [path]
|
|
224
224
|
* @return {module:echarts/model/Model}
|
|
225
225
|
*/
|
|
226
226
|
getModel: function (path) {
|
|
@@ -405,7 +405,7 @@ define(function(require) {
|
|
|
405
405
|
* }
|
|
406
406
|
*
|
|
407
407
|
* @static
|
|
408
|
-
* @param {
|
|
408
|
+
* @param {Object} dataRoot Root node.
|
|
409
409
|
* @param {module:echarts/model/Model} hostModel
|
|
410
410
|
* @param {Array.<Object>} levelOptions
|
|
411
411
|
* @return module:echarts/data/Tree
|
|
@@ -97,7 +97,6 @@ define(function (require) {
|
|
|
97
97
|
if (resultDimIdx != null && resultDimIdx < dimCount) {
|
|
98
98
|
dataDims[coordDimIndex] = resultDimIdx;
|
|
99
99
|
applyDim(result[resultDimIdx], coordDim, coordDimIndex);
|
|
100
|
-
// coordDim === 'value' && valueCandidate == null && (valueCandidate = resultDimIdx);
|
|
101
100
|
}
|
|
102
101
|
});
|
|
103
102
|
});
|
|
@@ -137,7 +136,6 @@ define(function (require) {
|
|
|
137
136
|
each(dataDims, function (resultDimIdx, coordDimIndex) {
|
|
138
137
|
var resultItem = result[resultDimIdx];
|
|
139
138
|
applyDim(defaults(resultItem, sysDimItem), coordDim, coordDimIndex);
|
|
140
|
-
// coordDim === 'value' && valueCandidate == null && (valueCandidate = resultDimIdx);
|
|
141
139
|
if (resultItem.name == null && sysDimItemDimsDef) {
|
|
142
140
|
resultItem.name = resultItem.tooltipName = sysDimItemDimsDef[coordDimIndex];
|
|
143
141
|
}
|
|
@@ -160,14 +158,6 @@ define(function (require) {
|
|
|
160
158
|
);
|
|
161
159
|
|
|
162
160
|
resultItem.name == null && (resultItem.name = genName(
|
|
163
|
-
// Ensure At least one value dim.
|
|
164
|
-
// (dataDimNameMap.get('value') == null
|
|
165
|
-
// && (valueCandidate == null || valueCandidate === resultDimIdx)
|
|
166
|
-
// // Try to set as 'value' only if coordDim is not set as 'extra'.
|
|
167
|
-
// && coordDim == null
|
|
168
|
-
// )
|
|
169
|
-
// ? 'value'
|
|
170
|
-
// :
|
|
171
161
|
resultItem.coordDim,
|
|
172
162
|
dataDimNameMap
|
|
173
163
|
));
|
|
@@ -214,7 +204,8 @@ define(function (require) {
|
|
|
214
204
|
|
|
215
205
|
var value = value[dimIndex];
|
|
216
206
|
// Consider usage convenience, '1', '2' will be treated as "number".
|
|
217
|
-
|
|
207
|
+
// `isFinit('')` get `true`.
|
|
208
|
+
if (value != null && isFinite(value) && value !== '') {
|
|
218
209
|
return false;
|
|
219
210
|
}
|
|
220
211
|
else if (isString(value) && value !== '-') {
|
package/src/echarts.js
CHANGED
|
@@ -33,6 +33,7 @@ define(function (require) {
|
|
|
33
33
|
var ExtensionAPI = require('./ExtensionAPI');
|
|
34
34
|
var CoordinateSystemManager = require('./CoordinateSystem');
|
|
35
35
|
var OptionManager = require('./model/OptionManager');
|
|
36
|
+
var backwardCompat = require('./preprocessor/backwardCompat');
|
|
36
37
|
|
|
37
38
|
var ComponentModel = require('./model/Component');
|
|
38
39
|
var SeriesModel = require('./model/Series');
|
|
@@ -43,12 +44,13 @@ define(function (require) {
|
|
|
43
44
|
var modelUtil = require('./util/model');
|
|
44
45
|
var throttle = require('./util/throttle');
|
|
45
46
|
|
|
46
|
-
var zrender = require('zrender');
|
|
47
|
+
var zrender = require('zrender/zrender');
|
|
47
48
|
var zrUtil = require('zrender/core/util');
|
|
48
49
|
var colorTool = require('zrender/tool/color');
|
|
49
50
|
var Eventful = require('zrender/mixin/Eventful');
|
|
50
51
|
var timsort = require('zrender/core/timsort');
|
|
51
52
|
|
|
53
|
+
|
|
52
54
|
var each = zrUtil.each;
|
|
53
55
|
var parseClassType = ComponentModel.parseClassType;
|
|
54
56
|
|
|
@@ -74,6 +76,7 @@ define(function (require) {
|
|
|
74
76
|
var OPTION_UPDATED = '__optionUpdated';
|
|
75
77
|
var ACTION_REG = /^[a-zA-Z0-9_]+$/;
|
|
76
78
|
|
|
79
|
+
|
|
77
80
|
function createRegisterEventWithLowercaseName(method) {
|
|
78
81
|
return function (eventName, handler, context) {
|
|
79
82
|
// Event name is all lowercase
|
|
@@ -114,7 +117,7 @@ define(function (require) {
|
|
|
114
117
|
*/
|
|
115
118
|
this.group;
|
|
116
119
|
/**
|
|
117
|
-
* @type {
|
|
120
|
+
* @type {HTMLElement}
|
|
118
121
|
* @private
|
|
119
122
|
*/
|
|
120
123
|
this._dom = dom;
|
|
@@ -136,11 +139,13 @@ define(function (require) {
|
|
|
136
139
|
*/
|
|
137
140
|
this._throttledZrFlush = throttle.throttle(zrUtil.bind(zr.flush, zr), 17);
|
|
138
141
|
|
|
142
|
+
var theme = zrUtil.clone(theme);
|
|
143
|
+
theme && backwardCompat(theme, true);
|
|
139
144
|
/**
|
|
140
145
|
* @type {Object}
|
|
141
146
|
* @private
|
|
142
147
|
*/
|
|
143
|
-
this._theme =
|
|
148
|
+
this._theme = theme;
|
|
144
149
|
|
|
145
150
|
/**
|
|
146
151
|
* @type {Array.<module:echarts/view/Chart>}
|
|
@@ -228,7 +233,7 @@ define(function (require) {
|
|
|
228
233
|
}
|
|
229
234
|
};
|
|
230
235
|
/**
|
|
231
|
-
* @return {
|
|
236
|
+
* @return {HTMLElement}
|
|
232
237
|
*/
|
|
233
238
|
echartsProto.getDom = function () {
|
|
234
239
|
return this._dom;
|
|
@@ -938,6 +943,11 @@ define(function (require) {
|
|
|
938
943
|
return;
|
|
939
944
|
}
|
|
940
945
|
|
|
946
|
+
// Avoid dispatch action before setOption. Especially in `connect`.
|
|
947
|
+
if (!this._model) {
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
950
|
+
|
|
941
951
|
// May dispatchAction in rendering procedure
|
|
942
952
|
if (this[IN_MAIN_PROCESS]) {
|
|
943
953
|
this._pendingActions.push(payload);
|
|
@@ -1516,9 +1526,9 @@ define(function (require) {
|
|
|
1516
1526
|
/**
|
|
1517
1527
|
* @type {number}
|
|
1518
1528
|
*/
|
|
1519
|
-
version: '3.
|
|
1529
|
+
version: '3.7.2',
|
|
1520
1530
|
dependencies: {
|
|
1521
|
-
zrender: '3.
|
|
1531
|
+
zrender: '3.6.2'
|
|
1522
1532
|
}
|
|
1523
1533
|
};
|
|
1524
1534
|
|
|
@@ -1564,7 +1574,7 @@ define(function (require) {
|
|
|
1564
1574
|
}
|
|
1565
1575
|
|
|
1566
1576
|
/**
|
|
1567
|
-
* @param {
|
|
1577
|
+
* @param {HTMLElement} dom
|
|
1568
1578
|
* @param {Object} [theme]
|
|
1569
1579
|
* @param {Object} opts
|
|
1570
1580
|
* @param {number} [opts.devicePixelRatio] Use window.devicePixelRatio by default
|
|
@@ -1681,7 +1691,7 @@ define(function (require) {
|
|
|
1681
1691
|
};
|
|
1682
1692
|
|
|
1683
1693
|
/**
|
|
1684
|
-
* @param {
|
|
1694
|
+
* @param {HTMLElement} dom
|
|
1685
1695
|
* @return {echarts~ECharts}
|
|
1686
1696
|
*/
|
|
1687
1697
|
echarts.getInstanceByDom = function (dom) {
|
|
@@ -1794,6 +1804,20 @@ define(function (require) {
|
|
|
1794
1804
|
CoordinateSystemManager.register(type, CoordinateSystem);
|
|
1795
1805
|
};
|
|
1796
1806
|
|
|
1807
|
+
/**
|
|
1808
|
+
* Get dimensions of specified coordinate system.
|
|
1809
|
+
* @param {string} type
|
|
1810
|
+
* @return {Array.<string|Object>}
|
|
1811
|
+
*/
|
|
1812
|
+
echarts.getCoordinateSystemDimensions = function (type) {
|
|
1813
|
+
var coordSysCreator = CoordinateSystemManager.get(type);
|
|
1814
|
+
if (coordSysCreator) {
|
|
1815
|
+
return coordSysCreator.getDimensionsInfo
|
|
1816
|
+
? coordSysCreator.getDimensionsInfo()
|
|
1817
|
+
: coordSysCreator.dimensions.slice();
|
|
1818
|
+
}
|
|
1819
|
+
};
|
|
1820
|
+
|
|
1797
1821
|
/**
|
|
1798
1822
|
* Layout is a special stage of visual encoding
|
|
1799
1823
|
* Most visual encoding like color are common for different chart
|
|
@@ -1921,7 +1945,7 @@ define(function (require) {
|
|
|
1921
1945
|
};
|
|
1922
1946
|
|
|
1923
1947
|
echarts.registerVisual(PRIORITY_VISUAL_GLOBAL, require('./visual/seriesColor'));
|
|
1924
|
-
echarts.registerPreprocessor(
|
|
1948
|
+
echarts.registerPreprocessor(backwardCompat);
|
|
1925
1949
|
echarts.registerLoading('default', require('./loading/default'));
|
|
1926
1950
|
|
|
1927
1951
|
// Default action
|
|
@@ -1936,7 +1960,6 @@ define(function (require) {
|
|
|
1936
1960
|
update: 'downplay'
|
|
1937
1961
|
}, zrUtil.noop);
|
|
1938
1962
|
|
|
1939
|
-
|
|
1940
1963
|
// --------
|
|
1941
1964
|
// Exports
|
|
1942
1965
|
// --------
|
package/src/lang.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
define(function(require) {
|
|
2
|
+
|
|
3
|
+
return {
|
|
4
|
+
toolbox: {
|
|
5
|
+
brush: {
|
|
6
|
+
title: {
|
|
7
|
+
rect: '矩形选择',
|
|
8
|
+
polygon: '圈选',
|
|
9
|
+
lineX: '横向选择',
|
|
10
|
+
lineY: '纵向选择',
|
|
11
|
+
keep: '保持选择',
|
|
12
|
+
clear: '清除选择'
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
dataView: {
|
|
16
|
+
title: '数据视图',
|
|
17
|
+
lang: ['数据视图', '关闭', '刷新']
|
|
18
|
+
},
|
|
19
|
+
dataZoom: {
|
|
20
|
+
title: {
|
|
21
|
+
zoom: '区域缩放',
|
|
22
|
+
back: '区域缩放还原'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
magicType: {
|
|
26
|
+
title: {
|
|
27
|
+
line: '切换为折线图',
|
|
28
|
+
bar: '切换为柱状图',
|
|
29
|
+
stack: '切换为堆叠',
|
|
30
|
+
tiled: '切换为平铺'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
restore: {
|
|
34
|
+
title: '还原'
|
|
35
|
+
},
|
|
36
|
+
saveAsImage: {
|
|
37
|
+
title: '保存为图片',
|
|
38
|
+
lang: ['右键另存为图片']
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
});
|
package/src/langEN.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
define(function(require) {
|
|
2
|
+
|
|
3
|
+
return {
|
|
4
|
+
toolbox: {
|
|
5
|
+
brush: {
|
|
6
|
+
title: {
|
|
7
|
+
rect: 'Box Select',
|
|
8
|
+
polygon: 'Lasso Select',
|
|
9
|
+
lineX: 'Horizontally Select',
|
|
10
|
+
lineY: 'Vertically Select',
|
|
11
|
+
keep: 'Keep Selections',
|
|
12
|
+
clear: 'Clear Selections'
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
dataView: {
|
|
16
|
+
title: 'Data View',
|
|
17
|
+
lang: ['Data View', 'Close', 'Refresh']
|
|
18
|
+
},
|
|
19
|
+
dataZoom: {
|
|
20
|
+
title: {
|
|
21
|
+
zoom: 'Zoom',
|
|
22
|
+
back: 'Zoom Reset'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
magicType: {
|
|
26
|
+
title: {
|
|
27
|
+
line: 'Switch to Line Chart',
|
|
28
|
+
bar: 'Switch to Bar Chart',
|
|
29
|
+
stack: 'Stack',
|
|
30
|
+
tiled: 'Tile'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
restore: {
|
|
34
|
+
title: 'Restore'
|
|
35
|
+
},
|
|
36
|
+
saveAsImage: {
|
|
37
|
+
title: 'Save as Image',
|
|
38
|
+
lang: ['Right Click to Save Image']
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
});
|
package/src/layout/barGrid.js
CHANGED
|
@@ -124,8 +124,9 @@ define(function(require) {
|
|
|
124
124
|
// TODO
|
|
125
125
|
var barWidth = seriesInfo.barWidth;
|
|
126
126
|
if (barWidth && !stacks[stackId].width) {
|
|
127
|
-
|
|
127
|
+
// See #6312, do not restrict width.
|
|
128
128
|
stacks[stackId].width = barWidth;
|
|
129
|
+
barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);
|
|
129
130
|
columnsOnAxis.remainedWidth -= barWidth;
|
|
130
131
|
}
|
|
131
132
|
|
|
@@ -244,7 +245,14 @@ define(function(require) {
|
|
|
244
245
|
? valueAxis.toGlobalCoord(valueAxis.dataToCoord(0))
|
|
245
246
|
: valueAxis.getGlobalExtent()[0];
|
|
246
247
|
|
|
247
|
-
var
|
|
248
|
+
var coordDims = [
|
|
249
|
+
seriesModel.coordDimToDataDim('x')[0],
|
|
250
|
+
seriesModel.coordDimToDataDim('y')[0]
|
|
251
|
+
];
|
|
252
|
+
var coords = data.mapArray(coordDims, function (x, y) {
|
|
253
|
+
return cartesian.dataToPoint([x, y]);
|
|
254
|
+
}, true);
|
|
255
|
+
|
|
248
256
|
lastStackCoords[stackId] = lastStackCoords[stackId] || [];
|
|
249
257
|
lastStackCoordsOrigin[stackId] = lastStackCoordsOrigin[stackId] || []; // Fix #4243
|
|
250
258
|
|
|
@@ -253,7 +261,7 @@ define(function(require) {
|
|
|
253
261
|
size: columnWidth
|
|
254
262
|
});
|
|
255
263
|
|
|
256
|
-
data.each(valueAxis.dim, function (value, idx) {
|
|
264
|
+
data.each(seriesModel.coordDimToDataDim(valueAxis.dim)[0], function (value, idx) {
|
|
257
265
|
if (isNaN(value)) {
|
|
258
266
|
return;
|
|
259
267
|
}
|
package/src/layout/barPolar.js
CHANGED
|
@@ -67,11 +67,18 @@ define(function (require) {
|
|
|
67
67
|
var valueMax = valueAxis.model.get('max');
|
|
68
68
|
var valueMin = valueAxis.model.get('min');
|
|
69
69
|
|
|
70
|
-
var
|
|
70
|
+
var coordDims = [
|
|
71
|
+
seriesModel.coordDimToDataDim('radius')[0],
|
|
72
|
+
seriesModel.coordDimToDataDim('angle')[0]
|
|
73
|
+
];
|
|
74
|
+
var coords = data.mapArray(coordDims, function (radius, angle) {
|
|
75
|
+
return polar.dataToPoint([radius, angle]);
|
|
76
|
+
}, true);
|
|
77
|
+
|
|
71
78
|
lastStackCoords[stackId] = lastStackCoords[stackId] || [];
|
|
72
79
|
lastStackCoordsOrigin[stackId] = lastStackCoordsOrigin[stackId] || []; // Fix #4243
|
|
73
80
|
|
|
74
|
-
data.each(valueAxis.dim, function (value, idx) {
|
|
81
|
+
data.each(seriesModel.coordDimToDataDim(valueAxis.dim)[0], function (value, idx) {
|
|
75
82
|
if (isNaN(value)) {
|
|
76
83
|
return;
|
|
77
84
|
}
|
package/src/model/Model.js
CHANGED
|
@@ -95,7 +95,7 @@ define(function (require) {
|
|
|
95
95
|
},
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
|
-
* @param {string|Array.<string>} path
|
|
98
|
+
* @param {string|Array.<string>} [path]
|
|
99
99
|
* @param {module:echarts/model/Model} [parentModel]
|
|
100
100
|
* @return {module:echarts/model/Model}
|
|
101
101
|
*/
|
|
@@ -179,6 +179,7 @@ define(function (require) {
|
|
|
179
179
|
return obj;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
// `path` can be null/undefined
|
|
182
183
|
function getParent(model, path) {
|
|
183
184
|
var getParentMethod = clazzUtil.get(model, 'getParent');
|
|
184
185
|
return getParentMethod ? getParentMethod.call(model, path) : model.parentModel;
|
package/src/model/Series.js
CHANGED
|
@@ -92,15 +92,22 @@ define(function(require) {
|
|
|
92
92
|
var inputPositionParams = layoutMode
|
|
93
93
|
? layout.getLayoutParams(option) : {};
|
|
94
94
|
|
|
95
|
+
// Backward compat: using subType on theme.
|
|
96
|
+
// But if name duplicate between series subType
|
|
97
|
+
// (for example: parallel) add component mainType,
|
|
98
|
+
// add suffix 'Series'.
|
|
99
|
+
var themeSubType = this.subType;
|
|
100
|
+
if (ComponentModel.hasClass(themeSubType)) {
|
|
101
|
+
themeSubType += 'Series';
|
|
102
|
+
}
|
|
95
103
|
zrUtil.merge(
|
|
96
104
|
option,
|
|
97
105
|
ecModel.getTheme().get(this.subType)
|
|
98
106
|
);
|
|
99
107
|
zrUtil.merge(option, this.getDefaultOption());
|
|
100
108
|
|
|
101
|
-
// Default label emphasis `
|
|
102
|
-
|
|
103
|
-
modelUtil.defaultEmphasis(option.label, modelUtil.LABEL_OPTIONS);
|
|
109
|
+
// Default label emphasis `show`
|
|
110
|
+
modelUtil.defaultEmphasis(option.label, ['show']);
|
|
104
111
|
|
|
105
112
|
this.fillDataTextStyle(option.data);
|
|
106
113
|
|
|
@@ -127,13 +134,14 @@ define(function(require) {
|
|
|
127
134
|
},
|
|
128
135
|
|
|
129
136
|
fillDataTextStyle: function (data) {
|
|
130
|
-
// Default data label emphasis `
|
|
137
|
+
// Default data label emphasis `show`
|
|
131
138
|
// FIXME Tree structure data ?
|
|
132
139
|
// FIXME Performance ?
|
|
133
140
|
if (data) {
|
|
141
|
+
var props = ['show'];
|
|
134
142
|
for (var i = 0; i < data.length; i++) {
|
|
135
143
|
if (data[i] && data[i].label) {
|
|
136
|
-
modelUtil.defaultEmphasis(data[i].label,
|
|
144
|
+
modelUtil.defaultEmphasis(data[i].label, props);
|
|
137
145
|
}
|
|
138
146
|
}
|
|
139
147
|
}
|
|
@@ -218,7 +226,7 @@ define(function(require) {
|
|
|
218
226
|
function formatArrayValue(value) {
|
|
219
227
|
var vertially = zrUtil.reduce(value, function (vertially, val, idx) {
|
|
220
228
|
var dimItem = data.getDimensionInfo(idx);
|
|
221
|
-
return vertially |= dimItem.tooltip !== false && dimItem.tooltipName != null;
|
|
229
|
+
return vertially |= dimItem && dimItem.tooltip !== false && dimItem.tooltipName != null;
|
|
222
230
|
}, 0);
|
|
223
231
|
|
|
224
232
|
var result = [];
|
|
@@ -3,15 +3,20 @@ define(function (require) {
|
|
|
3
3
|
var textContain = require('zrender/contain/text');
|
|
4
4
|
var graphicUtil = require('../../util/graphic');
|
|
5
5
|
|
|
6
|
+
var PATH_COLOR = ['textStyle', 'color'];
|
|
7
|
+
|
|
6
8
|
return {
|
|
7
9
|
/**
|
|
8
10
|
* Get color property or get color from option.textStyle.color
|
|
11
|
+
* @param {boolean} [isEmphasis]
|
|
9
12
|
* @return {string}
|
|
10
13
|
*/
|
|
11
|
-
getTextColor: function () {
|
|
14
|
+
getTextColor: function (isEmphasis) {
|
|
12
15
|
var ecModel = this.ecModel;
|
|
13
16
|
return this.getShallow('color')
|
|
14
|
-
|| (
|
|
17
|
+
|| (
|
|
18
|
+
(!isEmphasis && ecModel) ? ecModel.get(PATH_COLOR) : null
|
|
19
|
+
);
|
|
15
20
|
},
|
|
16
21
|
|
|
17
22
|
/**
|
|
@@ -32,13 +37,10 @@ define(function (require) {
|
|
|
32
37
|
text,
|
|
33
38
|
this.getFont(),
|
|
34
39
|
this.getShallow('align'),
|
|
35
|
-
this.getShallow('baseline')
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
truncateText: function (text, containerWidth, ellipsis, options) {
|
|
40
|
-
return textContain.truncateText(
|
|
41
|
-
text, containerWidth, this.getFont(), ellipsis, options
|
|
40
|
+
this.getShallow('verticalAlign') || this.getShallow('baseline'),
|
|
41
|
+
this.getShallow('padding'),
|
|
42
|
+
this.getShallow('rich'),
|
|
43
|
+
this.getShallow('truncateText')
|
|
42
44
|
);
|
|
43
45
|
}
|
|
44
46
|
};
|
|
@@ -56,16 +56,17 @@ define(function (require) {
|
|
|
56
56
|
|
|
57
57
|
var each = zrUtil.each;
|
|
58
58
|
|
|
59
|
-
return function (option) {
|
|
60
|
-
|
|
59
|
+
return function (option, isTheme) {
|
|
60
|
+
compatStyle(option, isTheme);
|
|
61
|
+
|
|
62
|
+
var series = option.series;
|
|
63
|
+
each(zrUtil.isArray(series) ? series : [series], function (seriesOpt) {
|
|
61
64
|
if (!zrUtil.isObject(seriesOpt)) {
|
|
62
65
|
return;
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
var seriesType = seriesOpt.type;
|
|
66
69
|
|
|
67
|
-
compatStyle(seriesOpt);
|
|
68
|
-
|
|
69
70
|
if (seriesType === 'pie' || seriesType === 'gauge') {
|
|
70
71
|
if (seriesOpt.clockWise != null) {
|
|
71
72
|
seriesOpt.clockwise = seriesOpt.clockWise;
|