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/lib/chart/pie/PieView.js
CHANGED
|
@@ -96,20 +96,6 @@
|
|
|
96
96
|
|
|
97
97
|
var piePieceProto = PiePiece.prototype;
|
|
98
98
|
|
|
99
|
-
function getLabelStyle(data, idx, state, labelModel, labelPosition) {
|
|
100
|
-
var textStyleModel = labelModel.getModel('textStyle');
|
|
101
|
-
var isLabelInside = labelPosition === 'inside' || labelPosition === 'inner';
|
|
102
|
-
return {
|
|
103
|
-
fill: textStyleModel.getTextColor()
|
|
104
|
-
|| (isLabelInside ? '#fff' : data.getItemVisual(idx, 'color')),
|
|
105
|
-
opacity: data.getItemVisual(idx, 'opacity'),
|
|
106
|
-
textFont: textStyleModel.getFont(),
|
|
107
|
-
text: zrUtil.retrieve(
|
|
108
|
-
data.hostModel.getFormattedLabel(idx, state), data.getName(idx)
|
|
109
|
-
)
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
|
|
113
99
|
piePieceProto.updateData = function (data, idx, firstCreate) {
|
|
114
100
|
|
|
115
101
|
var sector = this.childAt(0);
|
|
@@ -164,6 +150,9 @@
|
|
|
164
150
|
);
|
|
165
151
|
sector.hoverStyle = itemStyleModel.getModel('emphasis').getItemStyle();
|
|
166
152
|
|
|
153
|
+
var cursorStyle = itemModel.getShallow('cursor');
|
|
154
|
+
cursorStyle && sector.attr('cursor', cursorStyle);
|
|
155
|
+
|
|
167
156
|
// Toggle selected
|
|
168
157
|
toggleItemSelected(
|
|
169
158
|
this,
|
|
@@ -179,7 +168,7 @@
|
|
|
179
168
|
sector.stopAnimation(true);
|
|
180
169
|
sector.animateTo({
|
|
181
170
|
shape: {
|
|
182
|
-
r: layout.r +
|
|
171
|
+
r: layout.r + seriesModel.get('hoverOffset')
|
|
183
172
|
}
|
|
184
173
|
}, 300, 'elasticOut');
|
|
185
174
|
}
|
|
@@ -231,11 +220,6 @@
|
|
|
231
220
|
}
|
|
232
221
|
}, seriesModel, idx);
|
|
233
222
|
labelText.attr({
|
|
234
|
-
style: {
|
|
235
|
-
textVerticalAlign: labelLayout.verticalAlign,
|
|
236
|
-
textAlign: labelLayout.textAlign,
|
|
237
|
-
textFont: labelLayout.font
|
|
238
|
-
},
|
|
239
223
|
rotation: labelLayout.rotation,
|
|
240
224
|
origin: [labelLayout.x, labelLayout.y],
|
|
241
225
|
z2: 10
|
|
@@ -245,9 +229,23 @@
|
|
|
245
229
|
var labelHoverModel = itemModel.getModel('label.emphasis');
|
|
246
230
|
var labelLineModel = itemModel.getModel('labelLine.normal');
|
|
247
231
|
var labelLineHoverModel = itemModel.getModel('labelLine.emphasis');
|
|
248
|
-
var
|
|
232
|
+
var visualColor = data.getItemVisual(idx, 'color');
|
|
249
233
|
|
|
250
|
-
|
|
234
|
+
graphic.setLabelStyle(
|
|
235
|
+
labelText.style, labelText.hoverStyle = {}, labelModel, labelHoverModel,
|
|
236
|
+
{
|
|
237
|
+
labelFetcher: data.hostModel,
|
|
238
|
+
labelDataIndex: idx,
|
|
239
|
+
defaultText: data.getName(idx),
|
|
240
|
+
autoColor: visualColor,
|
|
241
|
+
useInsideStyle: !!labelLayout.inside
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
textAlign: labelLayout.textAlign,
|
|
245
|
+
textVerticalAlign: labelLayout.verticalAlign,
|
|
246
|
+
opacity: data.getItemVisual(idx, 'opacity')
|
|
247
|
+
}
|
|
248
|
+
);
|
|
251
249
|
|
|
252
250
|
labelText.ignore = labelText.normalIgnore = !labelModel.get('show');
|
|
253
251
|
labelText.hoverIgnore = !labelHoverModel.get('show');
|
|
@@ -262,7 +260,6 @@
|
|
|
262
260
|
});
|
|
263
261
|
labelLine.setStyle(labelLineModel.getModel('lineStyle').getLineStyle());
|
|
264
262
|
|
|
265
|
-
labelText.hoverStyle = getLabelStyle(data, idx, 'emphasis', labelHoverModel, labelPosition);
|
|
266
263
|
labelLine.hoverStyle = labelLineHoverModel.getModel('lineStyle').getLineStyle();
|
|
267
264
|
|
|
268
265
|
var smooth = labelLineModel.get('smooth');
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
|
|
191
191
|
textAlign = isLabelInside ? 'center' : (dx > 0 ? 'left' : 'right');
|
|
192
192
|
}
|
|
193
|
-
var font = labelModel.
|
|
193
|
+
var font = labelModel.getFont();
|
|
194
194
|
|
|
195
195
|
var labelRotate = labelModel.get('rotate')
|
|
196
196
|
? (dx < 0 ? -midAngle + Math.PI : -midAngle) : 0;
|
|
@@ -210,8 +210,8 @@
|
|
|
210
210
|
linePoints: linePoints,
|
|
211
211
|
textAlign: textAlign,
|
|
212
212
|
verticalAlign: 'middle',
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
rotation: labelRotate,
|
|
214
|
+
inside: isLabelInside
|
|
215
215
|
};
|
|
216
216
|
|
|
217
217
|
// Not layout the inside label
|
|
@@ -26,15 +26,18 @@
|
|
|
26
26
|
if (symbolType === 'none') {
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
+
var symbolSize = normalizeSymbolSize(
|
|
30
|
+
data.getItemVisual(idx, 'symbolSize')
|
|
31
|
+
);
|
|
29
32
|
var symbolPath = symbolUtil.createSymbol(
|
|
30
|
-
symbolType, -
|
|
33
|
+
symbolType, -1, -1, 2, 2, color
|
|
31
34
|
);
|
|
32
35
|
symbolPath.attr({
|
|
33
36
|
style: {
|
|
34
37
|
strokeNoScale: true
|
|
35
38
|
},
|
|
36
39
|
z2: 100,
|
|
37
|
-
scale:
|
|
40
|
+
scale: [symbolSize[0] / 2, symbolSize[1] / 2]
|
|
38
41
|
});
|
|
39
42
|
return symbolPath;
|
|
40
43
|
}
|
|
@@ -171,24 +174,17 @@
|
|
|
171
174
|
symbolPath.setStyle(itemStyle);
|
|
172
175
|
symbolPath.hoverStyle = zrUtil.clone(itemHoverStyle);
|
|
173
176
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
),
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
graphic.setText(symbolPath.hoverStyle, labelHoverModel, color);
|
|
186
|
-
symbolPath.hoverStyle.text = labelHoverModel.get('show') ? zrUtil.retrieve(
|
|
187
|
-
seriesModel.getFormattedLabel(
|
|
188
|
-
idx, 'emphasis', null, symbolPath.__dimIdx
|
|
189
|
-
),
|
|
190
|
-
defaultText
|
|
191
|
-
) : '';
|
|
177
|
+
graphic.setLabelStyle(
|
|
178
|
+
symbolPath.style, symbolPath.hoverStyle, labelModel, labelHoverModel,
|
|
179
|
+
{
|
|
180
|
+
labelFetcher: data.hostModel,
|
|
181
|
+
labelDataIndex: idx,
|
|
182
|
+
labelDimIndex: symbolPath.__dimIdx,
|
|
183
|
+
defaultText: data.get(data.dimensions[symbolPath.__dimIdx], idx),
|
|
184
|
+
autoColor: color,
|
|
185
|
+
isRectText: true
|
|
186
|
+
}
|
|
187
|
+
);
|
|
192
188
|
});
|
|
193
189
|
|
|
194
190
|
function onEmphasis() {
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var graphic = require('../../util/graphic');
|
|
8
|
-
var zrUtil = require('zrender/lib/core/util');
|
|
9
8
|
|
|
10
9
|
var SankeyShape = graphic.extendShape({
|
|
11
10
|
shape: {
|
|
@@ -117,9 +116,7 @@
|
|
|
117
116
|
var layout = node.getLayout();
|
|
118
117
|
var itemModel = node.getModel();
|
|
119
118
|
var labelModel = itemModel.getModel('label.normal');
|
|
120
|
-
var textStyleModel = labelModel.getModel('textStyle');
|
|
121
119
|
var labelHoverModel = itemModel.getModel('label.emphasis');
|
|
122
|
-
var textStyleHoverModel = labelHoverModel.getModel('textStyle');
|
|
123
120
|
|
|
124
121
|
var rect = new graphic.Rect({
|
|
125
122
|
shape: {
|
|
@@ -128,37 +125,24 @@
|
|
|
128
125
|
width: node.getLayout().dx,
|
|
129
126
|
height: node.getLayout().dy
|
|
130
127
|
},
|
|
131
|
-
style:
|
|
132
|
-
// Get formatted label in label.normal option
|
|
133
|
-
// Use node id if it is not specified
|
|
134
|
-
text: labelModel.get('show')
|
|
135
|
-
? seriesModel.getFormattedLabel(node.dataIndex, 'normal') || node.id
|
|
136
|
-
// Use empty string to hide the label
|
|
137
|
-
: '',
|
|
138
|
-
textFont: textStyleModel.getFont(),
|
|
139
|
-
textFill: textStyleModel.getTextColor(),
|
|
140
|
-
textPosition: labelModel.get('position')
|
|
141
|
-
}
|
|
128
|
+
style: itemModel.getModel('itemStyle.normal').getItemStyle()
|
|
142
129
|
});
|
|
143
130
|
|
|
144
|
-
|
|
145
|
-
{
|
|
146
|
-
fill: node.getVisual('color')
|
|
147
|
-
},
|
|
148
|
-
itemModel.getModel('itemStyle.normal').getItemStyle()
|
|
149
|
-
));
|
|
131
|
+
var hoverStyle = node.getModel('itemStyle.emphasis').getItemStyle();
|
|
150
132
|
|
|
151
|
-
graphic.
|
|
152
|
-
|
|
133
|
+
graphic.setLabelStyle(
|
|
134
|
+
rect.style, hoverStyle, labelModel, labelHoverModel,
|
|
153
135
|
{
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
textFill: textStyleHoverModel.getTextColor(),
|
|
159
|
-
textPosition: labelHoverModel.get('position')
|
|
136
|
+
labelFetcher: seriesModel,
|
|
137
|
+
labelDataIndex: node.dataIndex,
|
|
138
|
+
defaultText: node.id,
|
|
139
|
+
isRectText: true
|
|
160
140
|
}
|
|
161
|
-
)
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
rect.setStyle('fill', node.getVisual('color'));
|
|
144
|
+
|
|
145
|
+
graphic.setHoverStyle(rect, hoverStyle);
|
|
162
146
|
|
|
163
147
|
group.add(rect);
|
|
164
148
|
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
* @param {module:echarts/data/Graph~Node} nodes node of sankey view
|
|
145
145
|
* @param {module:echarts/data/Graph~Edge} edges edge of sankey view
|
|
146
146
|
* @param {number} height the whole height of the area to draw the view
|
|
147
|
-
* @param {
|
|
147
|
+
* @param {number} nodeGap the vertical distance between two nodes
|
|
148
148
|
* in the same column.
|
|
149
149
|
* @param {number} iterations the number of iterations for the algorithm
|
|
150
150
|
*/
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
large: false,
|
|
41
41
|
// Available when large is true
|
|
42
42
|
largeThreshold: 2000,
|
|
43
|
+
// cursor: null,
|
|
43
44
|
|
|
44
45
|
// label: {
|
|
45
46
|
// normal: {
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
// formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调
|
|
49
50
|
// position: 默认自适应,水平布局为'top',垂直布局为'right',可选为
|
|
50
51
|
// 'inside'|'left'|'right'|'top'|'bottom'
|
|
51
|
-
//
|
|
52
|
+
// 默认使用全局文本样式,详见TEXTSTYLE
|
|
52
53
|
// }
|
|
53
54
|
// },
|
|
54
55
|
itemStyle: {
|
|
@@ -129,15 +129,12 @@
|
|
|
129
129
|
|
|
130
130
|
var hoverItemStyleModel = itemModel.getModel('itemStyle.emphasis');
|
|
131
131
|
var itemStyleModel = itemModel.getModel('itemStyle.normal');
|
|
132
|
-
var textStyleModel = labelModel.getModel('textStyle');
|
|
133
132
|
|
|
134
|
-
text.
|
|
133
|
+
graphic.setTextStyle(text.style, labelModel, {
|
|
135
134
|
text: labelModel.get('show')
|
|
136
135
|
? seriesModel.getFormattedLabel(indices[j - 1], 'normal')
|
|
137
136
|
|| data.getName(indices[j - 1])
|
|
138
|
-
:
|
|
139
|
-
textFont: textStyleModel.getFont(),
|
|
140
|
-
textAlign: labelModel.get('textAlign'),
|
|
137
|
+
: null,
|
|
141
138
|
textVerticalAlign: 'middle'
|
|
142
139
|
});
|
|
143
140
|
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
* Inspired by Lee Byron's paper Stacked Graphs - Geometry & Aesthetics
|
|
104
104
|
*
|
|
105
105
|
* @param {Array.<Array>} data the points in each layer
|
|
106
|
-
* @return {
|
|
106
|
+
* @return {Object}
|
|
107
107
|
*/
|
|
108
108
|
function computeBaseline(data) {
|
|
109
109
|
var layerNum = data.length;
|
|
@@ -83,11 +83,34 @@
|
|
|
83
83
|
label: {
|
|
84
84
|
normal: {
|
|
85
85
|
show: true,
|
|
86
|
+
// Do not use textDistance, for ellipsis rect just the same as treemap node rect.
|
|
87
|
+
distance: 0,
|
|
88
|
+
padding: 5,
|
|
86
89
|
position: 'inside', // Can be [5, '5%'] or position stirng like 'insideTopLeft', ...
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
// formatter: null,
|
|
91
|
+
color: '#fff',
|
|
92
|
+
ellipsis: true
|
|
93
|
+
// align
|
|
94
|
+
// verticalAlign
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
upperLabel: { // Label when node is parent.
|
|
98
|
+
normal: {
|
|
99
|
+
show: false,
|
|
100
|
+
position: [0, '50%'],
|
|
101
|
+
height: 20,
|
|
102
|
+
// formatter: null,
|
|
103
|
+
color: '#fff',
|
|
104
|
+
ellipsis: true,
|
|
105
|
+
// align: null,
|
|
106
|
+
verticalAlign: 'middle'
|
|
107
|
+
},
|
|
108
|
+
emphasis: {
|
|
109
|
+
show: true,
|
|
110
|
+
position: [0, '50%'],
|
|
111
|
+
color: '#fff',
|
|
112
|
+
ellipsis: true,
|
|
113
|
+
verticalAlign: 'middle'
|
|
91
114
|
}
|
|
92
115
|
},
|
|
93
116
|
itemStyle: {
|
|
@@ -146,11 +169,8 @@
|
|
|
146
169
|
* @override
|
|
147
170
|
*/
|
|
148
171
|
getInitialData: function (option, ecModel) {
|
|
149
|
-
var rootName = option.name;
|
|
150
|
-
rootName == null && (rootName = option.name);
|
|
151
|
-
|
|
152
172
|
// Create a virtual root.
|
|
153
|
-
var root = {name:
|
|
173
|
+
var root = {name: option.name, children: option.data};
|
|
154
174
|
|
|
155
175
|
completeTreeValue(root);
|
|
156
176
|
|
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
var each = zrUtil.each;
|
|
16
16
|
|
|
17
17
|
var DRAG_THRESHOLD = 3;
|
|
18
|
-
var
|
|
18
|
+
var PATH_LABEL_NOAMAL = ['label', 'normal'];
|
|
19
19
|
var PATH_LABEL_EMPHASIS = ['label', 'emphasis'];
|
|
20
|
+
var PATH_UPPERLABEL_NORMAL = ['upperLabel', 'normal'];
|
|
21
|
+
var PATH_UPPERLABEL_EMPHASIS = ['upperLabel', 'emphasis'];
|
|
20
22
|
var Z_BASE = 10; // Should bigger than every z.
|
|
21
23
|
var Z_BG = 1;
|
|
22
24
|
var Z_CONTENT = 2;
|
|
@@ -65,12 +67,6 @@
|
|
|
65
67
|
* @private
|
|
66
68
|
*/
|
|
67
69
|
this._state = 'ready';
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* @private
|
|
71
|
-
* @type {boolean}
|
|
72
|
-
*/
|
|
73
|
-
this._mayClick;
|
|
74
70
|
},
|
|
75
71
|
|
|
76
72
|
/**
|
|
@@ -156,7 +152,7 @@
|
|
|
156
152
|
lastsForAnimation, willInvisibleEls
|
|
157
153
|
);
|
|
158
154
|
|
|
159
|
-
// Notice: when thisTree and oldTree are the same tree (see list.
|
|
155
|
+
// Notice: when thisTree and oldTree are the same tree (see list.cloneShallow),
|
|
160
156
|
// the oldTree is actually losted, so we can not find all of the old graphic
|
|
161
157
|
// elements from tree. So we use this stragegy: make element storage, move
|
|
162
158
|
// from old storage to new storage, clear old storage.
|
|
@@ -395,8 +391,6 @@
|
|
|
395
391
|
* @private
|
|
396
392
|
*/
|
|
397
393
|
_onPan: function (dx, dy) {
|
|
398
|
-
this._mayClick = false;
|
|
399
|
-
|
|
400
394
|
if (this._state !== 'animating'
|
|
401
395
|
&& (Math.abs(dx) > DRAG_THRESHOLD || Math.abs(dy) > DRAG_THRESHOLD)
|
|
402
396
|
) {
|
|
@@ -429,8 +423,6 @@
|
|
|
429
423
|
* @private
|
|
430
424
|
*/
|
|
431
425
|
_onZoom: function (scale, mouseX, mouseY) {
|
|
432
|
-
this._mayClick = false;
|
|
433
|
-
|
|
434
426
|
if (this._state !== 'animating') {
|
|
435
427
|
// These param must not be cached.
|
|
436
428
|
var root = this.seriesModel.getData().tree.root;
|
|
@@ -478,25 +470,11 @@
|
|
|
478
470
|
* @private
|
|
479
471
|
*/
|
|
480
472
|
_initEvents: function (containerGroup) {
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
// 还是会触发click,期望是不触发。
|
|
485
|
-
|
|
486
|
-
// Mousedown occurs when drag start, and mouseup occurs when drag end,
|
|
487
|
-
// click event should not be triggered in that case.
|
|
488
|
-
|
|
489
|
-
containerGroup.on('mousedown', function (e) {
|
|
490
|
-
this._state === 'ready' && (this._mayClick = true);
|
|
491
|
-
}, this);
|
|
492
|
-
containerGroup.on('mouseup', function (e) {
|
|
493
|
-
if (this._mayClick) {
|
|
494
|
-
this._mayClick = false;
|
|
495
|
-
this._state === 'ready' && onClick.call(this, e);
|
|
473
|
+
containerGroup.on('click', function (e) {
|
|
474
|
+
if (this._state !== 'ready') {
|
|
475
|
+
return;
|
|
496
476
|
}
|
|
497
|
-
}, this);
|
|
498
477
|
|
|
499
|
-
function onClick(e) {
|
|
500
478
|
var nodeClick = this.seriesModel.get('nodeClick', true);
|
|
501
479
|
|
|
502
480
|
if (!nodeClick) {
|
|
@@ -524,7 +502,8 @@
|
|
|
524
502
|
link && window.open(link, linkTarget);
|
|
525
503
|
}
|
|
526
504
|
}
|
|
527
|
-
|
|
505
|
+
|
|
506
|
+
}, this);
|
|
528
507
|
},
|
|
529
508
|
|
|
530
509
|
/**
|
|
@@ -658,6 +637,9 @@
|
|
|
658
637
|
return;
|
|
659
638
|
}
|
|
660
639
|
|
|
640
|
+
// -------------------------------------------------------------------
|
|
641
|
+
// Start of closure variables available in "Procedures in renderNode".
|
|
642
|
+
|
|
661
643
|
var thisLayout = thisNode.getLayout();
|
|
662
644
|
|
|
663
645
|
if (!thisLayout || !thisLayout.isInView) {
|
|
@@ -666,11 +648,20 @@
|
|
|
666
648
|
|
|
667
649
|
var thisWidth = thisLayout.width;
|
|
668
650
|
var thisHeight = thisLayout.height;
|
|
651
|
+
var borderWidth = thisLayout.borderWidth;
|
|
669
652
|
var thisInvisible = thisLayout.invisible;
|
|
670
653
|
|
|
671
654
|
var thisRawIndex = thisNode.getRawIndex();
|
|
672
655
|
var oldRawIndex = oldNode && oldNode.getRawIndex();
|
|
673
656
|
|
|
657
|
+
var thisViewChildren = thisNode.viewChildren;
|
|
658
|
+
var upperHeight = thisLayout.upperHeight;
|
|
659
|
+
var isParent = thisViewChildren && thisViewChildren.length;
|
|
660
|
+
var itemStyleEmphasisModel = thisNode.getModel('itemStyle.emphasis');
|
|
661
|
+
|
|
662
|
+
// End of closure ariables available in "Procedures in renderNode".
|
|
663
|
+
// -----------------------------------------------------------------
|
|
664
|
+
|
|
674
665
|
// Node group
|
|
675
666
|
var group = giveGraphic('nodeGroup', Group);
|
|
676
667
|
|
|
@@ -690,20 +681,12 @@
|
|
|
690
681
|
|
|
691
682
|
// Background
|
|
692
683
|
var bg = giveGraphic('background', Rect, depth, Z_BG);
|
|
693
|
-
|
|
694
|
-
bg.setShape({x: 0, y: 0, width: thisWidth, height: thisHeight});
|
|
695
|
-
updateStyle(bg, function () {
|
|
696
|
-
bg.setStyle('fill', thisNode.getVisual('borderColor', true));
|
|
697
|
-
});
|
|
698
|
-
group.add(bg);
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
var thisViewChildren = thisNode.viewChildren;
|
|
684
|
+
bg && renderBackground(group, bg, isParent && thisLayout.upperHeight);
|
|
702
685
|
|
|
703
686
|
// No children, render content.
|
|
704
|
-
if (!
|
|
687
|
+
if (!isParent) {
|
|
705
688
|
var content = giveGraphic('content', Rect, depth, Z_CONTENT);
|
|
706
|
-
content && renderContent(group);
|
|
689
|
+
content && renderContent(group, content);
|
|
707
690
|
}
|
|
708
691
|
|
|
709
692
|
return group;
|
|
@@ -712,12 +695,44 @@
|
|
|
712
695
|
// | Procedures in renderNode |
|
|
713
696
|
// ----------------------------
|
|
714
697
|
|
|
715
|
-
function
|
|
698
|
+
function renderBackground(group, bg, useUpperLabel) {
|
|
699
|
+
// For tooltip.
|
|
700
|
+
bg.dataIndex = thisNode.dataIndex;
|
|
701
|
+
bg.seriesIndex = seriesModel.seriesIndex;
|
|
702
|
+
|
|
703
|
+
bg.setShape({x: 0, y: 0, width: thisWidth, height: thisHeight});
|
|
704
|
+
var visualBorderColor = thisNode.getVisual('borderColor', true);
|
|
705
|
+
var emphasisBorderColor = itemStyleEmphasisModel.get('borderColor');
|
|
706
|
+
|
|
707
|
+
updateStyle(bg, function () {
|
|
708
|
+
var normalStyle = {fill: visualBorderColor};
|
|
709
|
+
var emphasisStyle = {fill: emphasisBorderColor};
|
|
710
|
+
|
|
711
|
+
if (useUpperLabel) {
|
|
712
|
+
var upperLabelWidth = thisWidth - 2 * borderWidth;
|
|
713
|
+
|
|
714
|
+
prepareText(
|
|
715
|
+
normalStyle, emphasisStyle, visualBorderColor, upperLabelWidth, upperHeight,
|
|
716
|
+
{x: borderWidth, y: 0, width: upperLabelWidth, height: upperHeight}
|
|
717
|
+
);
|
|
718
|
+
}
|
|
719
|
+
// For old bg.
|
|
720
|
+
else {
|
|
721
|
+
normalStyle.text = emphasisStyle.text = null;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
bg.setStyle(normalStyle);
|
|
725
|
+
graphic.setHoverStyle(bg, emphasisStyle);
|
|
726
|
+
});
|
|
727
|
+
|
|
728
|
+
group.add(bg);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
function renderContent(group, content) {
|
|
716
732
|
// For tooltip.
|
|
717
733
|
content.dataIndex = thisNode.dataIndex;
|
|
718
734
|
content.seriesIndex = seriesModel.seriesIndex;
|
|
719
735
|
|
|
720
|
-
var borderWidth = thisLayout.borderWidth;
|
|
721
736
|
var contentWidth = Math.max(thisWidth - 2 * borderWidth, 0);
|
|
722
737
|
var contentHeight = Math.max(thisHeight - 2 * borderWidth, 0);
|
|
723
738
|
|
|
@@ -732,7 +747,7 @@
|
|
|
732
747
|
var visualColor = thisNode.getVisual('color', true);
|
|
733
748
|
updateStyle(content, function () {
|
|
734
749
|
var normalStyle = {fill: visualColor};
|
|
735
|
-
var emphasisStyle =
|
|
750
|
+
var emphasisStyle = itemStyleEmphasisModel.getItemStyle();
|
|
736
751
|
|
|
737
752
|
prepareText(normalStyle, emphasisStyle, visualColor, contentWidth, contentHeight);
|
|
738
753
|
|
|
@@ -761,50 +776,46 @@
|
|
|
761
776
|
}
|
|
762
777
|
}
|
|
763
778
|
|
|
764
|
-
function prepareText(normalStyle, emphasisStyle, visualColor,
|
|
779
|
+
function prepareText(normalStyle, emphasisStyle, visualColor, width, height, upperLabelRect) {
|
|
765
780
|
var nodeModel = thisNode.getModel();
|
|
766
|
-
var text =
|
|
767
|
-
|
|
781
|
+
var text = zrUtil.retrieve(
|
|
782
|
+
seriesModel.getFormattedLabel(
|
|
783
|
+
thisNode.dataIndex, 'normal', null, null, upperLabelRect ? 'upperLabel' : 'label'
|
|
784
|
+
),
|
|
785
|
+
nodeModel.get('name')
|
|
786
|
+
);
|
|
787
|
+
if (!upperLabelRect && thisLayout.isLeafRoot) {
|
|
768
788
|
var iconChar = seriesModel.get('drillDownIcon', true);
|
|
769
789
|
text = iconChar ? iconChar + ' ' + text : text;
|
|
770
790
|
}
|
|
771
791
|
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
visualColor, contentWidth, contentHeight
|
|
792
|
+
var normalLabelModel = nodeModel.getModel(
|
|
793
|
+
upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL
|
|
775
794
|
);
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
visualColor, contentWidth, contentHeight
|
|
795
|
+
var emphasisLabelModel = nodeModel.getModel(
|
|
796
|
+
upperLabelRect ? PATH_UPPERLABEL_EMPHASIS : PATH_LABEL_EMPHASIS
|
|
779
797
|
);
|
|
780
|
-
}
|
|
781
798
|
|
|
782
|
-
|
|
783
|
-
var labelModel = nodeModel.getModel(labelPath);
|
|
784
|
-
var labelTextStyleModel = labelModel.getModel('textStyle');
|
|
799
|
+
var isShow = normalLabelModel.getShallow('show');
|
|
785
800
|
|
|
786
|
-
graphic.
|
|
801
|
+
graphic.setLabelStyle(
|
|
802
|
+
normalStyle, emphasisStyle, normalLabelModel, emphasisLabelModel,
|
|
803
|
+
{
|
|
804
|
+
defaultText: isShow ? text : null,
|
|
805
|
+
autoColor: visualColor,
|
|
806
|
+
isRectText: true
|
|
807
|
+
}
|
|
808
|
+
);
|
|
787
809
|
|
|
788
|
-
|
|
789
|
-
// because in most cases the two attributes are not exposed to user,
|
|
790
|
-
// except in treemap.
|
|
791
|
-
style.textAlign = labelTextStyleModel.get('align');
|
|
792
|
-
style.textVerticalAlign = labelTextStyleModel.get('baseline');
|
|
810
|
+
upperLabelRect && (normalStyle.textRect = zrUtil.clone(upperLabelRect));
|
|
793
811
|
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
text, contentWidth, null, {minChar: 2}
|
|
802
|
-
)
|
|
803
|
-
: '';
|
|
804
|
-
}
|
|
805
|
-
else {
|
|
806
|
-
style.text = text;
|
|
807
|
-
}
|
|
812
|
+
normalStyle.truncate = (isShow && normalLabelModel.get('ellipsis'))
|
|
813
|
+
? {
|
|
814
|
+
outerWidth: width,
|
|
815
|
+
outerHeight: height,
|
|
816
|
+
minChar: 2
|
|
817
|
+
}
|
|
818
|
+
: null;
|
|
808
819
|
}
|
|
809
820
|
|
|
810
821
|
function giveGraphic(storageName, Ctor, depth, z) {
|