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
|
@@ -64,7 +64,7 @@ define(function (require) {
|
|
|
64
64
|
labelInterval = this._autoLabelInterval = axisHelper.getAxisLabelInterval(
|
|
65
65
|
zrUtil.map(this.scale.getTicks(), this.dataToCoord, this),
|
|
66
66
|
axisHelper.getFormattedLabels(this, labelModel.get('formatter')),
|
|
67
|
-
labelModel.
|
|
67
|
+
labelModel.getFont(),
|
|
68
68
|
timelineModel.get('orient') === 'horizontal'
|
|
69
69
|
);
|
|
70
70
|
}
|
package/src/component/title.js
CHANGED
|
@@ -95,11 +95,10 @@ define(function(require) {
|
|
|
95
95
|
var textBaseline = titleModel.get('textBaseline');
|
|
96
96
|
|
|
97
97
|
var textEl = new graphic.Text({
|
|
98
|
-
style: {
|
|
98
|
+
style: graphic.setTextStyle({}, textStyleModel, {
|
|
99
99
|
text: titleModel.get('text'),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
},
|
|
100
|
+
textFill: textStyleModel.getTextColor()
|
|
101
|
+
}, {disableBox: true}),
|
|
103
102
|
z2: 10
|
|
104
103
|
});
|
|
105
104
|
|
|
@@ -107,13 +106,12 @@ define(function(require) {
|
|
|
107
106
|
|
|
108
107
|
var subText = titleModel.get('subtext');
|
|
109
108
|
var subTextEl = new graphic.Text({
|
|
110
|
-
style: {
|
|
109
|
+
style: graphic.setTextStyle({}, subtextStyleModel, {
|
|
111
110
|
text: subText,
|
|
112
|
-
|
|
113
|
-
fill: subtextStyleModel.getTextColor(),
|
|
111
|
+
textFill: subtextStyleModel.getTextColor(),
|
|
114
112
|
y: textRect.height + titleModel.get('itemGap'),
|
|
115
|
-
|
|
116
|
-
},
|
|
113
|
+
textVerticalAlign: 'top'
|
|
114
|
+
}, {disableBox: true}),
|
|
117
115
|
z2: 10
|
|
118
116
|
});
|
|
119
117
|
|
|
@@ -197,7 +195,8 @@ define(function(require) {
|
|
|
197
195
|
x: groupRect.x - padding[3],
|
|
198
196
|
y: groupRect.y - padding[0],
|
|
199
197
|
width: groupRect.width + padding[1] + padding[3],
|
|
200
|
-
height: groupRect.height + padding[0] + padding[2]
|
|
198
|
+
height: groupRect.height + padding[0] + padding[2],
|
|
199
|
+
r: titleModel.get('borderRadius')
|
|
201
200
|
},
|
|
202
201
|
style: style,
|
|
203
202
|
silent: true
|
|
@@ -124,31 +124,19 @@ define(function (require) {
|
|
|
124
124
|
titles[featureName] = title;
|
|
125
125
|
}
|
|
126
126
|
var iconPaths = featureModel.iconPaths = {};
|
|
127
|
-
zrUtil.each(icons, function (
|
|
128
|
-
var
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
new graphic.Image({style: style})
|
|
141
|
-
)
|
|
142
|
-
: graphic.makePath(
|
|
143
|
-
icon.replace('path://', ''),
|
|
144
|
-
{
|
|
145
|
-
style: normalStyle,
|
|
146
|
-
hoverStyle: hoverStyle,
|
|
147
|
-
rectHover: true
|
|
148
|
-
},
|
|
149
|
-
style,
|
|
150
|
-
'center'
|
|
151
|
-
);
|
|
127
|
+
zrUtil.each(icons, function (iconStr, iconName) {
|
|
128
|
+
var path = graphic.createIcon(
|
|
129
|
+
iconStr,
|
|
130
|
+
{},
|
|
131
|
+
{
|
|
132
|
+
x: -itemSize / 2,
|
|
133
|
+
y: -itemSize / 2,
|
|
134
|
+
width: itemSize,
|
|
135
|
+
height: itemSize
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
path.setStyle(iconStyleModel.getModel('normal').getItemStyle());
|
|
139
|
+
path.hoverStyle = iconStyleModel.getModel('emphasis').getItemStyle();
|
|
152
140
|
|
|
153
141
|
graphic.setHoverStyle(path);
|
|
154
142
|
|
|
@@ -184,7 +172,7 @@ define(function (require) {
|
|
|
184
172
|
listComponentHelper.layout(group, toolboxModel, api);
|
|
185
173
|
// Render background after group is layout
|
|
186
174
|
// FIXME
|
|
187
|
-
listComponentHelper.
|
|
175
|
+
group.add(listComponentHelper.makeBackground(group.getBoundingRect(), toolboxModel));
|
|
188
176
|
|
|
189
177
|
// Adjust icon title positions to avoid them out of screen
|
|
190
178
|
group.eachChild(function (icon) {
|
|
@@ -193,7 +181,7 @@ define(function (require) {
|
|
|
193
181
|
// May be background element
|
|
194
182
|
if (hoverStyle && titleText) {
|
|
195
183
|
var rect = textContain.getBoundingRect(
|
|
196
|
-
titleText, hoverStyle
|
|
184
|
+
titleText, textContain.makeFont(hoverStyle)
|
|
197
185
|
);
|
|
198
186
|
var offsetX = icon.position[0] + group.position[0];
|
|
199
187
|
var offsetY = icon.position[1] + group.position[1] + itemSize;
|
|
@@ -3,6 +3,7 @@ define(function(require) {
|
|
|
3
3
|
|
|
4
4
|
var featureManager = require('../featureManager');
|
|
5
5
|
var zrUtil = require('zrender/core/util');
|
|
6
|
+
var lang = require('../../../lang').toolbox.brush;
|
|
6
7
|
|
|
7
8
|
function Brush(model, ecModel, api) {
|
|
8
9
|
this.model = model;
|
|
@@ -33,14 +34,8 @@ define(function(require) {
|
|
|
33
34
|
keep: 'M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z', // jshint ignore:line
|
|
34
35
|
clear: 'M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2' // jshint ignore:line
|
|
35
36
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
polygon: '圈选',
|
|
39
|
-
lineX: '横向选择',
|
|
40
|
-
lineY: '纵向选择',
|
|
41
|
-
keep: '保持选择',
|
|
42
|
-
clear: '清除选择'
|
|
43
|
-
}
|
|
37
|
+
// `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`
|
|
38
|
+
title: zrUtil.clone(lang.title)
|
|
44
39
|
};
|
|
45
40
|
|
|
46
41
|
var proto = Brush.prototype;
|
|
@@ -6,7 +6,7 @@ define(function (require) {
|
|
|
6
6
|
|
|
7
7
|
var zrUtil = require('zrender/core/util');
|
|
8
8
|
var eventTool = require('zrender/core/event');
|
|
9
|
-
|
|
9
|
+
var lang = require('../../../lang').toolbox.dataView;
|
|
10
10
|
|
|
11
11
|
var BLOCK_SPLITER = new Array(60).join('-');
|
|
12
12
|
var ITEM_SPLITER = '\t';
|
|
@@ -120,7 +120,7 @@ define(function (require) {
|
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
122
|
* @param {module:echarts/model/Global}
|
|
123
|
-
* @return {
|
|
123
|
+
* @return {Object}
|
|
124
124
|
* @inner
|
|
125
125
|
*/
|
|
126
126
|
function getContentFromModel(ecModel) {
|
|
@@ -157,7 +157,7 @@ define(function (require) {
|
|
|
157
157
|
var itemSplitRegex = new RegExp('[' + ITEM_SPLITER + ']+', 'g');
|
|
158
158
|
/**
|
|
159
159
|
* @param {string} tsv
|
|
160
|
-
* @return {
|
|
160
|
+
* @return {Object}
|
|
161
161
|
*/
|
|
162
162
|
function parseTSVContents(tsv) {
|
|
163
163
|
var tsvLines = tsv.split(/\n+/g);
|
|
@@ -277,8 +277,8 @@ define(function (require) {
|
|
|
277
277
|
contentToOption: null,
|
|
278
278
|
|
|
279
279
|
icon: 'M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28',
|
|
280
|
-
title:
|
|
281
|
-
lang:
|
|
280
|
+
title: zrUtil.clone(lang.title),
|
|
281
|
+
lang: zrUtil.clone(lang.lang),
|
|
282
282
|
backgroundColor: '#fff',
|
|
283
283
|
textColor: '#000',
|
|
284
284
|
textareaColor: '#fff',
|
|
@@ -6,6 +6,7 @@ define(function(require) {
|
|
|
6
6
|
var BrushTargetManager = require('../../helper/BrushTargetManager');
|
|
7
7
|
var history = require('../../dataZoom/history');
|
|
8
8
|
var sliderMove = require('../../helper/sliderMove');
|
|
9
|
+
var lang = require('../../../lang').toolbox.dataZoom;
|
|
9
10
|
|
|
10
11
|
var each = zrUtil.each;
|
|
11
12
|
|
|
@@ -39,10 +40,8 @@ define(function(require) {
|
|
|
39
40
|
zoom: 'M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1',
|
|
40
41
|
back: 'M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26'
|
|
41
42
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
back: '区域缩放还原'
|
|
45
|
-
}
|
|
43
|
+
// `zoom`, `back`
|
|
44
|
+
title: zrUtil.clone(lang.title)
|
|
46
45
|
};
|
|
47
46
|
|
|
48
47
|
var proto = DataZoom.prototype;
|
|
@@ -2,6 +2,7 @@ define(function(require) {
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var zrUtil = require('zrender/core/util');
|
|
5
|
+
var lang = require('../../../lang').toolbox.magicType;
|
|
5
6
|
|
|
6
7
|
function MagicType(model) {
|
|
7
8
|
this.model = model;
|
|
@@ -17,12 +18,8 @@ define(function(require) {
|
|
|
17
18
|
stack: 'M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z', // jshint ignore:line
|
|
18
19
|
tiled: 'M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z'
|
|
19
20
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
bar: '切换为柱状图',
|
|
23
|
-
stack: '切换为堆叠',
|
|
24
|
-
tiled: '切换为平铺'
|
|
25
|
-
},
|
|
21
|
+
// `line`, `bar`, `stack`, `tiled`
|
|
22
|
+
title: zrUtil.clone(lang.title),
|
|
26
23
|
option: {},
|
|
27
24
|
seriesIndex: {}
|
|
28
25
|
};
|
|
@@ -2,6 +2,7 @@ define(function(require) {
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var history = require('../../dataZoom/history');
|
|
5
|
+
var lang = require('../../../lang').toolbox.restore;
|
|
5
6
|
|
|
6
7
|
function Restore(model) {
|
|
7
8
|
this.model = model;
|
|
@@ -10,7 +11,7 @@ define(function(require) {
|
|
|
10
11
|
Restore.defaultOption = {
|
|
11
12
|
show: true,
|
|
12
13
|
icon: 'M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5',
|
|
13
|
-
title:
|
|
14
|
+
title: lang.title
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
var proto = Restore.prototype;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
define(function (require) {
|
|
2
2
|
|
|
3
3
|
var env = require('zrender/core/env');
|
|
4
|
+
var lang = require('../../../lang').toolbox.saveAsImage;
|
|
4
5
|
|
|
5
6
|
function SaveAsImage (model) {
|
|
6
7
|
this.model = model;
|
|
@@ -9,14 +10,14 @@ define(function (require) {
|
|
|
9
10
|
SaveAsImage.defaultOption = {
|
|
10
11
|
show: true,
|
|
11
12
|
icon: 'M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0',
|
|
12
|
-
title:
|
|
13
|
+
title: lang.title,
|
|
13
14
|
type: 'png',
|
|
14
15
|
// Default use option.backgroundColor
|
|
15
16
|
// backgroundColor: '#fff',
|
|
16
17
|
name: '',
|
|
17
18
|
excludeComponents: ['toolbox'],
|
|
18
19
|
pixelRatio: 1,
|
|
19
|
-
lang:
|
|
20
|
+
lang: lang.lang.slice()
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
SaveAsImage.prototype.unusable = !env.canvasSupported;
|
|
@@ -49,13 +50,25 @@ define(function (require) {
|
|
|
49
50
|
}
|
|
50
51
|
// IE
|
|
51
52
|
else {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
if (window.navigator.msSaveOrOpenBlob) {
|
|
54
|
+
var bstr = atob(url.split(',')[1]);
|
|
55
|
+
var n = bstr.length;
|
|
56
|
+
var u8arr = new Uint8Array(n);
|
|
57
|
+
while(n--) {
|
|
58
|
+
u8arr[n] = bstr.charCodeAt(n);
|
|
59
|
+
}
|
|
60
|
+
var blob = new Blob([u8arr]);
|
|
61
|
+
window.navigator.msSaveOrOpenBlob(blob, title + '.' + type);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
var lang = model.get('lang');
|
|
65
|
+
var html = '' +
|
|
66
|
+
'<body style="margin:0;">' +
|
|
67
|
+
'<img src="' + url + '" style="max-width:100%;" title="' + ((lang && lang[0]) || '') + '" />' +
|
|
68
|
+
'</body>';
|
|
69
|
+
var tab = window.open();
|
|
70
|
+
tab.document.write(html);
|
|
71
|
+
}
|
|
59
72
|
}
|
|
60
73
|
};
|
|
61
74
|
|
|
@@ -64,4 +77,4 @@ define(function (require) {
|
|
|
64
77
|
);
|
|
65
78
|
|
|
66
79
|
return SaveAsImage;
|
|
67
|
-
});
|
|
80
|
+
});
|
|
@@ -219,10 +219,10 @@ define(function (require) {
|
|
|
219
219
|
// the sibling of canvas root. So padding of ec container
|
|
220
220
|
// should be considered here.
|
|
221
221
|
var zr = this._zr;
|
|
222
|
-
var
|
|
223
|
-
if (zr && zr.painter && (
|
|
224
|
-
x +=
|
|
225
|
-
y +=
|
|
222
|
+
var viewportRootOffset;
|
|
223
|
+
if (zr && zr.painter && (viewportRootOffset = zr.painter.getViewportRootOffset())) {
|
|
224
|
+
x += viewportRootOffset.offsetLeft;
|
|
225
|
+
y += viewportRootOffset.offsetTop;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
var style = this.el.style;
|
|
@@ -265,7 +265,8 @@ define(function (require) {
|
|
|
265
265
|
api.dispatchAction({
|
|
266
266
|
type: 'updateAxisPointer',
|
|
267
267
|
seriesIndex: seriesIndex,
|
|
268
|
-
dataIndex: dataIndex
|
|
268
|
+
dataIndex: dataIndex,
|
|
269
|
+
position: payload.position
|
|
269
270
|
});
|
|
270
271
|
|
|
271
272
|
return true;
|
|
@@ -531,7 +532,7 @@ define(function (require) {
|
|
|
531
532
|
},
|
|
532
533
|
|
|
533
534
|
/**
|
|
534
|
-
* @param {string|Function|Array.<number
|
|
535
|
+
* @param {string|Function|Array.<number>|Object} positionExpr
|
|
535
536
|
* @param {number} x Mouse x
|
|
536
537
|
* @param {number} y Mouse y
|
|
537
538
|
* @param {boolean} confine Whether confine tooltip content in view rect.
|
|
@@ -698,8 +699,9 @@ define(function (require) {
|
|
|
698
699
|
}
|
|
699
700
|
|
|
700
701
|
function refixTooltipPosition(x, y, el, viewWidth, viewHeight, gapH, gapV) {
|
|
701
|
-
var
|
|
702
|
-
var
|
|
702
|
+
var size = getOuterSize(el);
|
|
703
|
+
var width = size.width;
|
|
704
|
+
var height = size.height;
|
|
703
705
|
|
|
704
706
|
if (gapH != null) {
|
|
705
707
|
if (x + width + gapH > viewWidth) {
|
|
@@ -721,8 +723,9 @@ define(function (require) {
|
|
|
721
723
|
}
|
|
722
724
|
|
|
723
725
|
function confineTooltipPosition(x, y, el, viewWidth, viewHeight) {
|
|
724
|
-
var
|
|
725
|
-
var
|
|
726
|
+
var size = getOuterSize(el);
|
|
727
|
+
var width = size.width;
|
|
728
|
+
var height = size.height;
|
|
726
729
|
|
|
727
730
|
x = Math.min(x + width, viewWidth) - width;
|
|
728
731
|
y = Math.min(y + height, viewHeight) - height;
|
|
@@ -732,6 +735,25 @@ define(function (require) {
|
|
|
732
735
|
return [x, y];
|
|
733
736
|
}
|
|
734
737
|
|
|
738
|
+
function getOuterSize(el) {
|
|
739
|
+
var width = el.clientWidth;
|
|
740
|
+
var height = el.clientHeight;
|
|
741
|
+
|
|
742
|
+
// Consider browser compatibility.
|
|
743
|
+
// IE8 does not support getComputedStyle.
|
|
744
|
+
if (document.defaultView && document.defaultView.getComputedStyle) {
|
|
745
|
+
var stl = document.defaultView.getComputedStyle(el);
|
|
746
|
+
if (stl) {
|
|
747
|
+
width += parseInt(stl.paddingLeft, 10) + parseInt(stl.paddingRight, 10)
|
|
748
|
+
+ parseInt(stl.borderLeftWidth, 10) + parseInt(stl.borderRightWidth, 10);
|
|
749
|
+
height += parseInt(stl.paddingTop, 10) + parseInt(stl.paddingBottom, 10)
|
|
750
|
+
+ parseInt(stl.borderTopWidth, 10) + parseInt(stl.borderBottomWidth, 10);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
return {width: width, height: height};
|
|
755
|
+
}
|
|
756
|
+
|
|
735
757
|
function calcTooltipPosition(position, rect, contentSize) {
|
|
736
758
|
var domWidth = contentSize[0];
|
|
737
759
|
var domHeight = contentSize[1];
|
|
@@ -768,4 +790,4 @@ define(function (require) {
|
|
|
768
790
|
return align === 'center' || align === 'middle';
|
|
769
791
|
}
|
|
770
792
|
|
|
771
|
-
});
|
|
793
|
+
});
|
|
@@ -29,7 +29,8 @@ define(function(require) {
|
|
|
29
29
|
itemWidth: null, // The length of the other side.
|
|
30
30
|
hoverLink: true, // Enable hover highlight.
|
|
31
31
|
hoverLinkDataSize: null,// The size of hovered data.
|
|
32
|
-
hoverLinkOnHandle:
|
|
32
|
+
hoverLinkOnHandle: null // Whether trigger hoverLink when hover handle.
|
|
33
|
+
// If not specified, follow the value of `realtime`.
|
|
33
34
|
},
|
|
34
35
|
|
|
35
36
|
/**
|
|
@@ -38,7 +39,6 @@ define(function(require) {
|
|
|
38
39
|
optionUpdated: function (newOption, isInit) {
|
|
39
40
|
ContinuousModel.superApply(this, 'optionUpdated', arguments);
|
|
40
41
|
|
|
41
|
-
this.resetTargetSeries();
|
|
42
42
|
this.resetExtent();
|
|
43
43
|
|
|
44
44
|
this.resetVisual(function (mappingOption) {
|
|
@@ -164,7 +164,7 @@ define(function(require) {
|
|
|
164
164
|
textAlign: orient === 'horizontal' ? align : 'center',
|
|
165
165
|
text: text,
|
|
166
166
|
textFont: textStyleModel.getFont(),
|
|
167
|
-
|
|
167
|
+
textFill: textStyleModel.getTextColor()
|
|
168
168
|
}
|
|
169
169
|
}));
|
|
170
170
|
},
|
|
@@ -185,7 +185,7 @@ define(function(require) {
|
|
|
185
185
|
barGroup.add(shapes.outOfRange = createPolygon());
|
|
186
186
|
barGroup.add(shapes.inRange = createPolygon(
|
|
187
187
|
null,
|
|
188
|
-
useHandle ?
|
|
188
|
+
useHandle ? getCursor(this._orient) : null,
|
|
189
189
|
zrUtil.bind(this._dragHandle, this, 'all', false),
|
|
190
190
|
zrUtil.bind(this._dragHandle, this, 'all', true)
|
|
191
191
|
));
|
|
@@ -216,7 +216,7 @@ define(function(require) {
|
|
|
216
216
|
var onDragEnd = zrUtil.bind(this._dragHandle, this, handleIndex, true);
|
|
217
217
|
var handleThumb = createPolygon(
|
|
218
218
|
createHandlePoints(handleIndex, textSize),
|
|
219
|
-
|
|
219
|
+
getCursor(this._orient),
|
|
220
220
|
onDrift,
|
|
221
221
|
onDragEnd
|
|
222
222
|
);
|
|
@@ -239,7 +239,7 @@ define(function(require) {
|
|
|
239
239
|
style: {
|
|
240
240
|
x: 0, y: 0, text: '',
|
|
241
241
|
textFont: textStyleModel.getFont(),
|
|
242
|
-
|
|
242
|
+
textFill: textStyleModel.getTextColor()
|
|
243
243
|
}
|
|
244
244
|
});
|
|
245
245
|
this.group.add(handleLabel);
|
|
@@ -275,7 +275,7 @@ define(function(require) {
|
|
|
275
275
|
style: {
|
|
276
276
|
x: 0, y: 0, text: '',
|
|
277
277
|
textFont: textStyleModel.getFont(),
|
|
278
|
-
|
|
278
|
+
textFill: textStyleModel.getTextColor()
|
|
279
279
|
}
|
|
280
280
|
});
|
|
281
281
|
this.group.add(indicatorLabel);
|
|
@@ -606,7 +606,6 @@ define(function(require) {
|
|
|
606
606
|
// For hover link show when hover handle, which might be
|
|
607
607
|
// below or upper than sizeExtent.
|
|
608
608
|
pos[1] = mathMin(mathMax(0, pos[1]), itemSize[1]);
|
|
609
|
-
|
|
610
609
|
self._doHoverLinkToSeries(
|
|
611
610
|
pos[1],
|
|
612
611
|
0 <= pos[0] && pos[0] <= itemSize[0]
|
|
@@ -693,6 +692,7 @@ define(function(require) {
|
|
|
693
692
|
}
|
|
694
693
|
|
|
695
694
|
var resultBatches = modelUtil.compressBatches(oldBatch, newBatch);
|
|
695
|
+
|
|
696
696
|
this._dispatchHighDown('downplay', helper.convertDataIndex(resultBatches[0]));
|
|
697
697
|
this._dispatchHighDown('highlight', helper.convertDataIndex(resultBatches[1]));
|
|
698
698
|
},
|
|
@@ -739,7 +739,6 @@ define(function(require) {
|
|
|
739
739
|
this._hideIndicator();
|
|
740
740
|
|
|
741
741
|
var indices = this._hoverLinkDataIndices;
|
|
742
|
-
|
|
743
742
|
this._dispatchHighDown('downplay', helper.convertDataIndex(indices));
|
|
744
743
|
|
|
745
744
|
indices.length = 0;
|
|
@@ -837,7 +836,12 @@ define(function(require) {
|
|
|
837
836
|
}
|
|
838
837
|
|
|
839
838
|
function useHoverLinkOnHandle(visualMapModel) {
|
|
840
|
-
|
|
839
|
+
var hoverLinkOnHandle = visualMapModel.get('hoverLinkOnHandle');
|
|
840
|
+
return !!(hoverLinkOnHandle == null ? visualMapModel.get('realtime') : hoverLinkOnHandle);
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
function getCursor(orient) {
|
|
844
|
+
return orient === 'vertical' ? 'ns-resize' : 'ew-resize';
|
|
841
845
|
}
|
|
842
846
|
|
|
843
847
|
return ContinuousView;
|
|
@@ -81,7 +81,6 @@ define(function(require) {
|
|
|
81
81
|
*/
|
|
82
82
|
this._pieceList = [];
|
|
83
83
|
|
|
84
|
-
this.resetTargetSeries();
|
|
85
84
|
this.resetExtent();
|
|
86
85
|
|
|
87
86
|
/**
|
|
@@ -367,7 +366,7 @@ define(function(require) {
|
|
|
367
366
|
splitNumber: function () {
|
|
368
367
|
var thisOption = this.option;
|
|
369
368
|
var pieceList = this._pieceList;
|
|
370
|
-
var precision = thisOption.precision;
|
|
369
|
+
var precision = Math.min(thisOption.precision, 20);
|
|
371
370
|
var dataExtent = this.getExtent();
|
|
372
371
|
var splitNumber = thisOption.splitNumber;
|
|
373
372
|
splitNumber = Math.max(parseInt(splitNumber, 10), 1);
|
|
@@ -74,7 +74,7 @@ define(function(require) {
|
|
|
74
74
|
textVerticalAlign: 'middle',
|
|
75
75
|
textAlign: itemAlign,
|
|
76
76
|
textFont: textFont,
|
|
77
|
-
|
|
77
|
+
textFill: textFill,
|
|
78
78
|
opacity: visualState === 'outOfRange' ? 0.5 : 1
|
|
79
79
|
}
|
|
80
80
|
}));
|
|
@@ -144,7 +144,7 @@ define(function(require) {
|
|
|
144
144
|
textAlign: showLabel ? itemAlign : 'center',
|
|
145
145
|
text: text,
|
|
146
146
|
textFont: textStyleModel.getFont(),
|
|
147
|
-
|
|
147
|
+
textFill: textStyleModel.getTextColor()
|
|
148
148
|
}
|
|
149
149
|
}));
|
|
150
150
|
|
|
@@ -64,7 +64,8 @@ define(function(require) {
|
|
|
64
64
|
zlevel: 0,
|
|
65
65
|
z: 4,
|
|
66
66
|
|
|
67
|
-
seriesIndex:
|
|
67
|
+
seriesIndex: 'all', // 'all' or null/undefined: all series.
|
|
68
|
+
// A number or an array of number: the specified series.
|
|
68
69
|
|
|
69
70
|
// set min: 0, max: 200, only for campatible with ec2.
|
|
70
71
|
// In fact min max should not have default value.
|
|
@@ -181,26 +182,31 @@ define(function(require) {
|
|
|
181
182
|
);
|
|
182
183
|
},
|
|
183
184
|
|
|
184
|
-
|
|
185
185
|
/**
|
|
186
186
|
* @protected
|
|
187
|
+
* @return {Array.<number>} An array of series indices.
|
|
187
188
|
*/
|
|
188
|
-
|
|
189
|
-
var
|
|
190
|
-
var
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
getTargetSeriesIndices: function () {
|
|
190
|
+
var optionSeriesIndex = this.option.seriesIndex;
|
|
191
|
+
var seriesIndices = [];
|
|
192
|
+
|
|
193
|
+
if (optionSeriesIndex == null || optionSeriesIndex === 'all') {
|
|
194
|
+
this.ecModel.eachSeries(function (seriesModel, index) {
|
|
195
|
+
seriesIndices.push(index);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
seriesIndices = modelUtil.normalizeToArray(optionSeriesIndex);
|
|
200
|
+
}
|
|
193
201
|
|
|
194
|
-
|
|
195
|
-
thisOption.seriesIndex.push(index);
|
|
196
|
-
});
|
|
202
|
+
return seriesIndices;
|
|
197
203
|
},
|
|
198
204
|
|
|
199
205
|
/**
|
|
200
206
|
* @public
|
|
201
207
|
*/
|
|
202
208
|
eachTargetSeries: function (callback, context) {
|
|
203
|
-
zrUtil.each(this.
|
|
209
|
+
zrUtil.each(this.getTargetSeriesIndices(), function (seriesIndex) {
|
|
204
210
|
callback.call(context, this.ecModel.getSeriesByIndex(seriesIndex));
|
|
205
211
|
}, this);
|
|
206
212
|
},
|
|
@@ -282,7 +288,7 @@ define(function(require) {
|
|
|
282
288
|
? 'min'
|
|
283
289
|
: val === dataBound[1]
|
|
284
290
|
? 'max'
|
|
285
|
-
: (+val).toFixed(precision);
|
|
291
|
+
: (+val).toFixed(Math.min(precision, 20));
|
|
286
292
|
}
|
|
287
293
|
},
|
|
288
294
|
|
package/src/coord/Axis.js
CHANGED
|
@@ -249,7 +249,7 @@ define(function (require) {
|
|
|
249
249
|
labelInterval = axisHelper.getAxisLabelInterval(
|
|
250
250
|
zrUtil.map(this.scale.getTicks(), this.dataToCoord, this),
|
|
251
251
|
axisModel.getFormattedLabels(),
|
|
252
|
-
labelModel.
|
|
252
|
+
labelModel.getFont(),
|
|
253
253
|
this.isHorizontal()
|
|
254
254
|
);
|
|
255
255
|
}
|
package/src/coord/axisDefault.js
CHANGED
|
@@ -39,6 +39,7 @@ define(function (require) {
|
|
|
39
39
|
// 默认显示,属性show控制显示与否
|
|
40
40
|
show: true,
|
|
41
41
|
onZero: true,
|
|
42
|
+
onZeroAxisIndex: null,
|
|
42
43
|
// 属性lineStyle控制线条样式
|
|
43
44
|
lineStyle: {
|
|
44
45
|
color: '#333',
|
|
@@ -70,9 +71,7 @@ define(function (require) {
|
|
|
70
71
|
margin: 8,
|
|
71
72
|
// formatter: null,
|
|
72
73
|
// 其余属性默认使用全局文本样式,详见TEXTSTYLE
|
|
73
|
-
|
|
74
|
-
fontSize: 12
|
|
75
|
-
}
|
|
74
|
+
fontSize: 12
|
|
76
75
|
},
|
|
77
76
|
// 分隔线
|
|
78
77
|
splitLine: {
|
|
@@ -134,6 +133,7 @@ define(function (require) {
|
|
|
134
133
|
splitNumber: 5
|
|
135
134
|
// Minimum interval
|
|
136
135
|
// minInterval: null
|
|
136
|
+
// maxInterval: null
|
|
137
137
|
}, defaultOption);
|
|
138
138
|
|
|
139
139
|
// FIXME
|