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
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
|
|
50
50
|
var nodes = nodeData.mapArray('value', function (value, idx) {
|
|
51
51
|
var point = nodeData.getItemLayout(idx);
|
|
52
|
-
// var w = numberUtil.linearMap(value, nodeDataExtent, [0, 50]);
|
|
53
52
|
var rep = numberUtil.linearMap(value, nodeDataExtent, repulsion);
|
|
54
53
|
if (isNaN(rep)) {
|
|
55
54
|
rep = (repulsion[0] + repulsion[1]) / 2;
|
|
@@ -57,6 +56,7 @@
|
|
|
57
56
|
return {
|
|
58
57
|
w: rep,
|
|
59
58
|
rep: rep,
|
|
59
|
+
fixed: nodeData.getItemModel(idx).get('fixed'),
|
|
60
60
|
p: (!point || isNaN(point[0]) || isNaN(point[1])) ? null : point
|
|
61
61
|
};
|
|
62
62
|
});
|
|
@@ -60,8 +60,15 @@
|
|
|
60
60
|
ctx.drawImage(brush, x - r, y - r);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
if (!canvas.width || !canvas.height) {
|
|
64
|
+
// Avoid "Uncaught DOMException: Failed to execute 'getImageData' on
|
|
65
|
+
// 'CanvasRenderingContext2D': The source height is 0."
|
|
66
|
+
return canvas;
|
|
67
|
+
}
|
|
68
|
+
|
|
63
69
|
// colorize the canvas using alpha value and set with gradient
|
|
64
70
|
var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
|
71
|
+
|
|
65
72
|
var pixels = imageData.data;
|
|
66
73
|
var offset = 0;
|
|
67
74
|
var pixelLen = pixels.length;
|
|
@@ -191,17 +191,18 @@
|
|
|
191
191
|
if (rawValue && rawValue[2] != null) {
|
|
192
192
|
defaultText = rawValue[2];
|
|
193
193
|
}
|
|
194
|
-
if (labelModel.getShallow('show')) {
|
|
195
|
-
graphic.setText(style, labelModel);
|
|
196
|
-
style.text = seriesModel.getFormattedLabel(idx, 'normal') || defaultText;
|
|
197
|
-
}
|
|
198
|
-
if (hoverLabelModel.getShallow('show')) {
|
|
199
|
-
graphic.setText(hoverStl, hoverLabelModel);
|
|
200
|
-
hoverStl.text = seriesModel.getFormattedLabel(idx, 'emphasis') || defaultText;
|
|
201
|
-
}
|
|
202
194
|
|
|
203
|
-
|
|
195
|
+
graphic.setLabelStyle(
|
|
196
|
+
style, hoverStl, labelModel, hoverLabelModel,
|
|
197
|
+
{
|
|
198
|
+
labelFetcher: seriesModel,
|
|
199
|
+
labelDataIndex: idx,
|
|
200
|
+
defaultText: defaultText,
|
|
201
|
+
isRectText: true
|
|
202
|
+
}
|
|
203
|
+
);
|
|
204
204
|
|
|
205
|
+
rect.setStyle(style);
|
|
205
206
|
graphic.setHoverStyle(rect, data.hasItemOption ? hoverStl : zrUtil.extend({}, hoverStl));
|
|
206
207
|
|
|
207
208
|
group.add(rect);
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
|
|
113
113
|
// Must reinitialize effect if following configuration changed
|
|
114
114
|
var DIFFICULT_PROPS = ['symbolType', 'period', 'rippleScale'];
|
|
115
|
-
for (var i = 0; i < DIFFICULT_PROPS; i++) {
|
|
115
|
+
for (var i = 0; i < DIFFICULT_PROPS.length; i++) {
|
|
116
116
|
var propName = DIFFICULT_PROPS[i];
|
|
117
117
|
if (oldEffectCfg[propName] !== effectCfg[propName]) {
|
|
118
118
|
this.stopEffectAnimation();
|
|
@@ -198,13 +198,13 @@
|
|
|
198
198
|
this.stopEffectAnimation();
|
|
199
199
|
var symbol = this.childAt(0);
|
|
200
200
|
var onEmphasis = function () {
|
|
201
|
-
symbol.
|
|
201
|
+
symbol.highlight();
|
|
202
202
|
if (effectCfg.showEffectOn !== 'render') {
|
|
203
203
|
this.startEffectAnimation(effectCfg);
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
206
|
var onNormal = function () {
|
|
207
|
-
symbol.
|
|
207
|
+
symbol.downplay();
|
|
208
208
|
if (effectCfg.showEffectOn !== 'render') {
|
|
209
209
|
this.stopEffectAnimation();
|
|
210
210
|
}
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
var symbolProxyShape = symbolProxy.shape;
|
|
23
23
|
for (var i = 0; i < points.length; i++) {
|
|
24
24
|
var pt = points[i];
|
|
25
|
+
|
|
26
|
+
if (isNaN(pt[0]) || isNaN(pt[1])) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
var size = sizes[i];
|
|
26
31
|
if (size[0] < 4) {
|
|
27
32
|
// Optimize for small symbol
|
|
@@ -121,7 +126,7 @@
|
|
|
121
126
|
symbolEl.on('mousemove', function (e) {
|
|
122
127
|
symbolEl.dataIndex = null;
|
|
123
128
|
var dataIndex = symbolEl.findDataIndex(e.offsetX, e.offsetY);
|
|
124
|
-
if (dataIndex
|
|
129
|
+
if (dataIndex >= 0) {
|
|
125
130
|
// Provide dataIndex for tooltip
|
|
126
131
|
symbolEl.dataIndex = dataIndex;
|
|
127
132
|
}
|
package/lib/chart/helper/Line.js
CHANGED
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
var visualColor = lineData.getItemVisual(idx, 'color');
|
|
267
|
-
var visualOpacity = zrUtil.
|
|
267
|
+
var visualOpacity = zrUtil.retrieve3(
|
|
268
268
|
lineData.getItemVisual(idx, 'opacity'),
|
|
269
269
|
lineStyle.opacity,
|
|
270
270
|
1
|
|
@@ -298,6 +298,8 @@
|
|
|
298
298
|
var label = this.childOfName('label');
|
|
299
299
|
var defaultLabelColor;
|
|
300
300
|
var defaultText;
|
|
301
|
+
var normalText;
|
|
302
|
+
var emphasisText;
|
|
301
303
|
|
|
302
304
|
if (showLabel || hoverShowLabel) {
|
|
303
305
|
var rawVal = seriesModel.getRawValue(idx);
|
|
@@ -307,42 +309,50 @@
|
|
|
307
309
|
? numberUtil.round(rawVal)
|
|
308
310
|
: rawVal;
|
|
309
311
|
defaultLabelColor = visualColor || '#000';
|
|
312
|
+
|
|
313
|
+
normalText = zrUtil.retrieve2(
|
|
314
|
+
seriesModel.getFormattedLabel(idx, 'normal', lineData.dataType),
|
|
315
|
+
defaultText
|
|
316
|
+
);
|
|
317
|
+
emphasisText = zrUtil.retrieve2(
|
|
318
|
+
seriesModel.getFormattedLabel(idx, 'emphasis', lineData.dataType),
|
|
319
|
+
normalText
|
|
320
|
+
);
|
|
310
321
|
}
|
|
311
322
|
|
|
312
323
|
// label.afterUpdate = lineAfterUpdate;
|
|
313
324
|
if (showLabel) {
|
|
314
|
-
var
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
defaultText
|
|
319
|
-
),
|
|
320
|
-
textFont: textStyleModel.getFont(),
|
|
321
|
-
fill: textStyleModel.getTextColor() || defaultLabelColor
|
|
325
|
+
var labelStyle = graphic.setTextStyle(label.style, labelModel, {
|
|
326
|
+
text: normalText
|
|
327
|
+
}, {
|
|
328
|
+
autoColor: defaultLabelColor
|
|
322
329
|
});
|
|
323
330
|
|
|
324
|
-
label.__textAlign =
|
|
325
|
-
label.__verticalAlign =
|
|
326
|
-
|
|
331
|
+
label.__textAlign = labelStyle.textAlign;
|
|
332
|
+
label.__verticalAlign = labelStyle.textVerticalAlign;
|
|
333
|
+
// 'start', 'middle', 'end'
|
|
334
|
+
label.__position = labelModel.get('position') || 'middle';
|
|
327
335
|
}
|
|
328
336
|
else {
|
|
329
|
-
label.setStyle('text',
|
|
337
|
+
label.setStyle('text', null);
|
|
330
338
|
}
|
|
331
|
-
if (hoverShowLabel) {
|
|
332
|
-
var textStyleHoverModel = hoverLabelModel.getModel('textStyle');
|
|
333
339
|
|
|
340
|
+
if (hoverShowLabel) {
|
|
341
|
+
// Only these properties supported in this emphasis style here.
|
|
334
342
|
label.hoverStyle = {
|
|
335
|
-
text:
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
)
|
|
339
|
-
|
|
340
|
-
|
|
343
|
+
text: emphasisText,
|
|
344
|
+
textFill: hoverLabelModel.getTextColor(true),
|
|
345
|
+
// For merging hover style to normal style, do not use
|
|
346
|
+
// `hoverLabelModel.getFont()` here.
|
|
347
|
+
fontStyle: hoverLabelModel.getShallow('fontStyle'),
|
|
348
|
+
fontWeight: hoverLabelModel.getShallow('fontWeight'),
|
|
349
|
+
fontSize: hoverLabelModel.getShallow('fontSize'),
|
|
350
|
+
fontFamily: hoverLabelModel.getShallow('fontFamily')
|
|
341
351
|
};
|
|
342
352
|
}
|
|
343
353
|
else {
|
|
344
354
|
label.hoverStyle = {
|
|
345
|
-
text:
|
|
355
|
+
text: null
|
|
346
356
|
};
|
|
347
357
|
}
|
|
348
358
|
|
|
@@ -351,6 +361,14 @@
|
|
|
351
361
|
graphic.setHoverStyle(this);
|
|
352
362
|
};
|
|
353
363
|
|
|
364
|
+
lineProto.highlight = function () {
|
|
365
|
+
this.trigger('emphasis');
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
lineProto.downplay = function () {
|
|
369
|
+
this.trigger('normal');
|
|
370
|
+
};
|
|
371
|
+
|
|
354
372
|
lineProto.updateLayout = function (lineData, idx) {
|
|
355
373
|
this.setLinePoints(lineData.getItemLayout(idx));
|
|
356
374
|
};
|
|
@@ -178,6 +178,7 @@
|
|
|
178
178
|
var labelModel = seriesScope && seriesScope.labelModel;
|
|
179
179
|
var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel;
|
|
180
180
|
var hoverAnimation = seriesScope && seriesScope.hoverAnimation;
|
|
181
|
+
var cursorStyle = seriesScope && seriesScope.cursorStyle;
|
|
181
182
|
|
|
182
183
|
if (!seriesScope || data.hasItemOption) {
|
|
183
184
|
var itemModel = data.getItemModel(idx);
|
|
@@ -193,6 +194,7 @@
|
|
|
193
194
|
labelModel = itemModel.getModel(normalLabelAccessPath);
|
|
194
195
|
hoverLabelModel = itemModel.getModel(emphasisLabelAccessPath);
|
|
195
196
|
hoverAnimation = itemModel.getShallow('hoverAnimation');
|
|
197
|
+
cursorStyle = itemModel.getShallow('cursor');
|
|
196
198
|
}
|
|
197
199
|
else {
|
|
198
200
|
hoverItemStyle = zrUtil.extend({}, hoverItemStyle);
|
|
@@ -209,6 +211,8 @@
|
|
|
209
211
|
]);
|
|
210
212
|
}
|
|
211
213
|
|
|
214
|
+
cursorStyle && symbolPath.attr('cursor', cursorStyle);
|
|
215
|
+
|
|
212
216
|
// PENDING setColor before setStyle!!!
|
|
213
217
|
symbolPath.setColor(color);
|
|
214
218
|
|
|
@@ -220,12 +224,19 @@
|
|
|
220
224
|
}
|
|
221
225
|
|
|
222
226
|
var valueDim = labelHelper.findLabelValueDim(data);
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
|
|
228
|
+
if (valueDim != null) {
|
|
229
|
+
graphic.setLabelStyle(
|
|
230
|
+
elStyle, hoverItemStyle, labelModel, hoverLabelModel,
|
|
231
|
+
{
|
|
232
|
+
labelFetcher: seriesModel,
|
|
233
|
+
labelDataIndex: idx,
|
|
234
|
+
defaultText: data.get(valueDim, idx),
|
|
235
|
+
isRectText: true,
|
|
236
|
+
autoColor: color
|
|
237
|
+
}
|
|
238
|
+
);
|
|
239
|
+
}
|
|
229
240
|
|
|
230
241
|
symbolPath.off('mouseover')
|
|
231
242
|
.off('mouseout')
|
|
@@ -234,6 +245,8 @@
|
|
|
234
245
|
|
|
235
246
|
symbolPath.hoverStyle = hoverItemStyle;
|
|
236
247
|
|
|
248
|
+
// FIXME
|
|
249
|
+
// Do not use symbol.trigger('emphasis'), but use symbol.highlight() instead.
|
|
237
250
|
graphic.setHoverStyle(symbolPath);
|
|
238
251
|
|
|
239
252
|
var scale = getScale(symbolSize);
|
|
@@ -265,7 +278,7 @@
|
|
|
265
278
|
// Avoid mistaken hover when fading out
|
|
266
279
|
this.silent = symbolPath.silent = true;
|
|
267
280
|
// Not show text when animating
|
|
268
|
-
symbolPath.style.text =
|
|
281
|
+
symbolPath.style.text = null;
|
|
269
282
|
graphic.updateProps(symbolPath, {
|
|
270
283
|
scale: [0, 0]
|
|
271
284
|
}, this._seriesModel, this.dataIndex, cb);
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
hoverAnimation: seriesModel.get('hoverAnimation'),
|
|
49
49
|
|
|
50
50
|
labelModel: seriesModel.getModel('label.normal'),
|
|
51
|
-
hoverLabelModel: seriesModel.getModel('label.emphasis')
|
|
51
|
+
hoverLabelModel: seriesModel.getModel('label.emphasis'),
|
|
52
|
+
cursorStyle: seriesModel.get('cursor')
|
|
52
53
|
};
|
|
53
54
|
|
|
54
55
|
data.diff(oldData)
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var graphic = require('../../util/graphic');
|
|
7
|
-
var zrUtil = require('zrender/lib/core/util');
|
|
8
6
|
var modelUtil = require('../../util/model');
|
|
9
7
|
|
|
10
8
|
var helper = {};
|
|
@@ -30,19 +28,4 @@
|
|
|
30
28
|
return valueDim;
|
|
31
29
|
};
|
|
32
30
|
|
|
33
|
-
helper.setTextToStyle = function (
|
|
34
|
-
data, dataIndex, valueDim, elStyle, seriesModel, labelModel, color
|
|
35
|
-
) {
|
|
36
|
-
if (valueDim != null && labelModel.getShallow('show')) {
|
|
37
|
-
graphic.setText(elStyle, labelModel, color);
|
|
38
|
-
elStyle.text = zrUtil.retrieve(
|
|
39
|
-
seriesModel.getFormattedLabel(dataIndex, 'normal'),
|
|
40
|
-
data.get(valueDim, dataIndex)
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
elStyle.text = '';
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
31
|
module.exports = helper;
|
|
@@ -54,9 +54,14 @@
|
|
|
54
54
|
var data = option.data;
|
|
55
55
|
|
|
56
56
|
addOrdinal && zrUtil.each(data, function (item, index) {
|
|
57
|
-
|
|
57
|
+
if (item.value && zrUtil.isArray(item.value)) {
|
|
58
|
+
item.value.unshift(index);
|
|
59
|
+
} else {
|
|
60
|
+
zrUtil.isArray(item) && item.unshift(index);
|
|
61
|
+
}
|
|
58
62
|
});
|
|
59
63
|
|
|
64
|
+
var defaultValueDimensions = this.defaultValueDimensions;
|
|
60
65
|
var dimensions = [{
|
|
61
66
|
name: baseAxisDim,
|
|
62
67
|
otherDims: {
|
|
@@ -65,12 +70,14 @@
|
|
|
65
70
|
dimsDef: ['base']
|
|
66
71
|
}, {
|
|
67
72
|
name: otherAxisDim,
|
|
68
|
-
dimsDef:
|
|
73
|
+
dimsDef: defaultValueDimensions.slice()
|
|
69
74
|
}];
|
|
70
75
|
|
|
71
76
|
dimensions = completeDimensions(dimensions, data, {
|
|
72
77
|
encodeDef: this.get('encode'),
|
|
73
|
-
dimsDef: this.get('dimensions')
|
|
78
|
+
dimsDef: this.get('dimensions'),
|
|
79
|
+
// Consider empty data entry.
|
|
80
|
+
dimCount: defaultValueDimensions.length + 1
|
|
74
81
|
});
|
|
75
82
|
|
|
76
83
|
var list = new List(dimensions, this);
|
|
@@ -117,3 +124,4 @@
|
|
|
117
124
|
seriesModelMixin: seriesModelMixin,
|
|
118
125
|
viewMixin: viewMixin
|
|
119
126
|
};
|
|
127
|
+
|
|
@@ -53,8 +53,20 @@
|
|
|
53
53
|
function getStackedOnPoints(coordSys, data) {
|
|
54
54
|
var baseAxis = coordSys.getBaseAxis();
|
|
55
55
|
var valueAxis = coordSys.getOtherAxis(baseAxis);
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
|
|
57
|
+
var valueStart = 0;
|
|
58
|
+
if (!baseAxis.onZero) {
|
|
59
|
+
var extent = valueAxis.scale.getExtent();
|
|
60
|
+
if (extent[0] > 0) {
|
|
61
|
+
// Both positive
|
|
62
|
+
valueStart = extent[0];
|
|
63
|
+
}
|
|
64
|
+
else if (extent[1] < 0) {
|
|
65
|
+
// Both negative
|
|
66
|
+
valueStart = extent[1];
|
|
67
|
+
}
|
|
68
|
+
// If is one positive, and one negative, onZero shall be true
|
|
69
|
+
}
|
|
58
70
|
|
|
59
71
|
var valueDim = valueAxis.dim;
|
|
60
72
|
|
package/lib/chart/line/poly.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
var Path = require('zrender/lib/graphic/Path');
|
|
5
5
|
var vec2 = require('zrender/lib/core/vector');
|
|
6
|
+
var fixClipWithShadow = require('zrender/lib/graphic/helper/fixClipWithShadow');
|
|
6
7
|
|
|
7
8
|
var vec2Min = vec2.min;
|
|
8
9
|
var vec2Max = vec2.max;
|
|
@@ -154,6 +155,8 @@
|
|
|
154
155
|
stroke: '#000'
|
|
155
156
|
},
|
|
156
157
|
|
|
158
|
+
brush: fixClipWithShadow(Path.prototype.brush),
|
|
159
|
+
|
|
157
160
|
buildPath: function (ctx, shape) {
|
|
158
161
|
var points = shape.points;
|
|
159
162
|
|
|
@@ -206,6 +209,8 @@
|
|
|
206
209
|
connectNulls: false
|
|
207
210
|
},
|
|
208
211
|
|
|
212
|
+
brush: fixClipWithShadow(Path.prototype.brush),
|
|
213
|
+
|
|
209
214
|
buildPath: function (ctx, shape) {
|
|
210
215
|
var points = shape.points;
|
|
211
216
|
var stackedOnPoints = shape.stackedOnPoints;
|
|
@@ -48,9 +48,13 @@
|
|
|
48
48
|
var zr = api.getZr();
|
|
49
49
|
// Avoid the drag cause ghost shadow
|
|
50
50
|
// FIXME Better way ?
|
|
51
|
-
|
|
51
|
+
// SVG doesn't support
|
|
52
|
+
var isSvg = zr.painter.getType() === 'svg';
|
|
53
|
+
if (!isSvg) {
|
|
54
|
+
zr.painter.getLayer(zlevel).clear(true);
|
|
55
|
+
}
|
|
52
56
|
// Config layer with motion blur
|
|
53
|
-
if (this._lastZlevel != null) {
|
|
57
|
+
if (this._lastZlevel != null && !isSvg) {
|
|
54
58
|
zr.configLayer(this._lastZlevel, {
|
|
55
59
|
motionBlur: false
|
|
56
60
|
});
|
|
@@ -66,10 +70,12 @@
|
|
|
66
70
|
notInIndividual && console.warn('Lines with trail effect should have an individual zlevel');
|
|
67
71
|
}
|
|
68
72
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
if (!isSvg) {
|
|
74
|
+
zr.configLayer(zlevel, {
|
|
75
|
+
motionBlur: true,
|
|
76
|
+
lastFrameAlpha: Math.max(Math.min(trailLength / 10 + 0.9, 1), 0)
|
|
77
|
+
});
|
|
78
|
+
}
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
this.group.add(lineDraw.group);
|
|
@@ -83,11 +89,20 @@
|
|
|
83
89
|
this._lineDraw.updateLayout(seriesModel);
|
|
84
90
|
// Not use motion when dragging or zooming
|
|
85
91
|
var zr = api.getZr();
|
|
86
|
-
zr.painter.
|
|
92
|
+
var isSvg = zr.painter.getType() === 'svg';
|
|
93
|
+
if (!isSvg) {
|
|
94
|
+
zr.painter.getLayer(this._lastZlevel).clear(true);
|
|
95
|
+
}
|
|
87
96
|
},
|
|
88
97
|
|
|
89
98
|
remove: function (ecModel, api) {
|
|
90
99
|
this._lineDraw && this._lineDraw.remove(api, true);
|
|
100
|
+
// Clear motion when lineDraw is removed
|
|
101
|
+
var zr = api.getZr();
|
|
102
|
+
var isSvg = zr.painter.getType() === 'svg';
|
|
103
|
+
if (!isSvg) {
|
|
104
|
+
zr.painter.getLayer(this._lastZlevel).clear(true);
|
|
105
|
+
}
|
|
91
106
|
},
|
|
92
107
|
|
|
93
108
|
dispose: function () {}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
// Shallow clone
|
|
83
83
|
option = zrUtil.extend({}, option);
|
|
84
84
|
|
|
85
|
-
option.data = geoCreator.getFilledRegions(option.data, mapName);
|
|
85
|
+
option.data = geoCreator.getFilledRegions(option.data, mapName, option.nameMap);
|
|
86
86
|
|
|
87
87
|
return option;
|
|
88
88
|
},
|
|
@@ -216,15 +216,11 @@
|
|
|
216
216
|
label: {
|
|
217
217
|
normal: {
|
|
218
218
|
show: false,
|
|
219
|
-
|
|
220
|
-
color: '#000'
|
|
221
|
-
}
|
|
219
|
+
color: '#000'
|
|
222
220
|
},
|
|
223
221
|
emphasis: {
|
|
224
222
|
show: true,
|
|
225
|
-
|
|
226
|
-
color: 'rgb(100,0,0)'
|
|
227
|
-
}
|
|
223
|
+
color: 'rgb(100,0,0)'
|
|
228
224
|
}
|
|
229
225
|
},
|
|
230
226
|
// scaleLimit: null,
|
package/lib/chart/map/MapView.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// var zrUtil = require('zrender/lib/core/util');
|
|
4
4
|
var graphic = require('../../util/graphic');
|
|
5
|
+
var zrUtil = require('zrender/lib/core/util');
|
|
5
6
|
|
|
6
7
|
var MapDraw = require('../../component/helper/MapDraw');
|
|
7
8
|
|
|
@@ -98,42 +99,52 @@
|
|
|
98
99
|
r: 3
|
|
99
100
|
},
|
|
100
101
|
silent: true,
|
|
101
|
-
|
|
102
|
+
// Do not overlap the first series, on which labels are displayed.
|
|
103
|
+
z2: !offset ? 10 : 8
|
|
102
104
|
});
|
|
103
105
|
|
|
104
106
|
// First data on the same region
|
|
105
107
|
if (!offset) {
|
|
106
108
|
var fullData = mapModel.mainSeries.getData();
|
|
107
109
|
var name = originalData.getName(idx);
|
|
108
|
-
|
|
110
|
+
|
|
109
111
|
var fullIndex = fullData.indexOfName(name);
|
|
110
112
|
|
|
111
113
|
var itemModel = originalData.getItemModel(idx);
|
|
112
114
|
var labelModel = itemModel.getModel('label.normal');
|
|
113
115
|
var hoverLabelModel = itemModel.getModel('label.emphasis');
|
|
114
116
|
|
|
115
|
-
var textStyleModel = labelModel.getModel('textStyle');
|
|
116
|
-
var hoverTextStyleModel = hoverLabelModel.getModel('textStyle');
|
|
117
|
-
|
|
118
117
|
var polygonGroups = fullData.getItemGraphicEl(fullIndex);
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
|
|
119
|
+
var normalText = zrUtil.retrieve2(
|
|
120
|
+
mapModel.getFormattedLabel(idx, 'normal'),
|
|
121
|
+
name
|
|
122
|
+
);
|
|
123
|
+
var emphasisText = zrUtil.retrieve2(
|
|
124
|
+
mapModel.getFormattedLabel(idx, 'emphasis'),
|
|
125
|
+
normalText
|
|
126
|
+
);
|
|
122
127
|
|
|
123
128
|
var onEmphasis = function () {
|
|
124
|
-
|
|
125
|
-
text: hoverLabelModel.get('show') ?
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
+
var hoverStyle = graphic.setTextStyle({}, hoverLabelModel, {
|
|
130
|
+
text: hoverLabelModel.get('show') ? emphasisText : null
|
|
131
|
+
}, {isRectText: true, useInsideStyle: false}, true);
|
|
132
|
+
circle.style.extendFrom(hoverStyle);
|
|
133
|
+
// Make label upper than others if overlaps.
|
|
134
|
+
circle.__mapOriginalZ2 = circle.z2;
|
|
135
|
+
circle.z2 += 1;
|
|
129
136
|
};
|
|
130
137
|
|
|
131
138
|
var onNormal = function () {
|
|
132
|
-
circle.
|
|
133
|
-
text: labelModel.get('show') ?
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
139
|
+
graphic.setTextStyle(circle.style, labelModel, {
|
|
140
|
+
text: labelModel.get('show') ? normalText : null,
|
|
141
|
+
textPosition: labelModel.getShallow('position') || 'bottom'
|
|
142
|
+
}, {isRectText: true, useInsideStyle: false});
|
|
143
|
+
|
|
144
|
+
if (circle.__mapOriginalZ2 != null) {
|
|
145
|
+
circle.z2 = circle.__mapOriginalZ2;
|
|
146
|
+
circle.__mapOriginalZ2 = null;
|
|
147
|
+
}
|
|
137
148
|
};
|
|
138
149
|
|
|
139
150
|
polygonGroups.on('mouseover', onEmphasis)
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
var List = require('../../data/List');
|
|
5
5
|
var zrUtil = require('zrender/lib/core/util');
|
|
6
6
|
var modelUtil = require('../../util/model');
|
|
7
|
+
var numberUtil = require('../../util/number');
|
|
7
8
|
var completeDimensions = require('../../data/helper/completeDimensions');
|
|
8
9
|
|
|
9
10
|
var dataSelectableMixin = require('../../component/helper/selectableMixin');
|
|
@@ -44,11 +45,18 @@
|
|
|
44
45
|
getDataParams: function (dataIndex) {
|
|
45
46
|
var data = this.getData();
|
|
46
47
|
var params = PieSeries.superCall(this, 'getDataParams', dataIndex);
|
|
47
|
-
var sum = data.getSum('value');
|
|
48
48
|
// FIXME toFixed?
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
|
|
50
|
+
var valueList = [];
|
|
51
|
+
data.each('value', function (value) {
|
|
52
|
+
valueList.push(value);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
params.percent = numberUtil.getPercentWithPrecision(
|
|
56
|
+
valueList,
|
|
57
|
+
dataIndex,
|
|
58
|
+
data.hostModel.get('percentPrecision')
|
|
59
|
+
);
|
|
52
60
|
|
|
53
61
|
params.$vars.push('percent');
|
|
54
62
|
return params;
|
|
@@ -81,8 +89,10 @@
|
|
|
81
89
|
startAngle: 90,
|
|
82
90
|
// 最小角度改为0
|
|
83
91
|
minAngle: 0,
|
|
84
|
-
//
|
|
92
|
+
// 选中时扇区偏移量
|
|
85
93
|
selectedOffset: 10,
|
|
94
|
+
// 高亮扇区偏移量
|
|
95
|
+
hoverOffset: 10,
|
|
86
96
|
|
|
87
97
|
// If use strategy to avoid label overlapping
|
|
88
98
|
avoidLabelOverlap: true,
|
|
@@ -91,9 +101,13 @@
|
|
|
91
101
|
// 南丁格尔玫瑰图模式,'radius'(半径) | 'area'(面积)
|
|
92
102
|
// roseType: null,
|
|
93
103
|
|
|
104
|
+
percentPrecision: 2,
|
|
105
|
+
|
|
94
106
|
// If still show when all data zero.
|
|
95
107
|
stillShowZeroSum: true,
|
|
96
108
|
|
|
109
|
+
// cursor: null,
|
|
110
|
+
|
|
97
111
|
label: {
|
|
98
112
|
normal: {
|
|
99
113
|
// If rotate around circle
|
|
@@ -102,7 +116,7 @@
|
|
|
102
116
|
// 'outer', 'inside', 'center'
|
|
103
117
|
position: 'outer'
|
|
104
118
|
// formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调
|
|
105
|
-
//
|
|
119
|
+
// 默认使用全局文本样式,详见TEXTSTYLE
|
|
106
120
|
// distance: 当position为inner时有效,为label位置到圆心的距离与圆半径(环状图为内外半径和)的比例系数
|
|
107
121
|
},
|
|
108
122
|
emphasis: {}
|