echarts 4.5.0 → 4.9.0
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/.DS_Store +0 -0
- package/.gitattributes +3 -0
- package/.github/pull_request_template.md +66 -0
- package/.github/workflows/nodejs.yml +15 -3
- package/.huskyrc +5 -0
- package/CONTRIBUTING.md +16 -160
- package/NOTICE +1 -1
- package/README.md +3 -3
- package/asset/.DS_Store +0 -0
- package/build/.DS_Store +0 -0
- package/dist/echarts-en.common.js +3072 -1261
- package/dist/echarts-en.common.min.js +1 -1
- package/dist/echarts-en.js +4339 -1685
- package/dist/echarts-en.js.map +1 -1
- package/dist/echarts-en.min.js +1 -1
- package/dist/echarts-en.simple.js +2496 -1011
- package/dist/echarts-en.simple.min.js +1 -1
- package/dist/echarts.common.js +3046 -1261
- package/dist/echarts.common.min.js +1 -1
- package/dist/echarts.js +4313 -1685
- package/dist/echarts.js.map +1 -1
- package/dist/echarts.min.js +1 -1
- package/dist/echarts.simple.js +2470 -1011
- package/dist/echarts.simple.min.js +1 -1
- package/dist/extension/bmap.js +33 -11
- package/dist/extension/bmap.js.map +1 -1
- package/dist/extension/bmap.min.js +1 -1
- package/dist/extension/dataTool.js.map +1 -1
- package/extension/.DS_Store +0 -0
- package/extension/bmap/BMapCoordSys.js +14 -4
- package/extension/bmap/BMapModel.js +4 -0
- package/extension/bmap/BMapView.js +18 -10
- package/extension-src/bmap/BMapCoordSys.js +14 -4
- package/extension-src/bmap/BMapModel.js +6 -1
- package/extension-src/bmap/BMapView.js +16 -9
- package/lib/chart/bar/BarSeries.js +14 -1
- package/lib/chart/bar/BarView.js +196 -18
- package/lib/chart/bar/BaseBarSeries.js +3 -1
- package/lib/chart/bar/PictorialBarSeries.js +1 -1
- package/lib/chart/candlestick/candlestickVisual.js +1 -1
- package/lib/chart/effectScatter/EffectScatterSeries.js +3 -1
- package/lib/chart/funnel/FunnelSeries.js +14 -5
- package/lib/chart/funnel/funnelLayout.js +162 -46
- package/lib/chart/gauge/GaugeSeries.js +0 -2
- package/lib/chart/graph/GraphSeries.js +23 -7
- package/lib/chart/graph/GraphView.js +30 -12
- package/lib/chart/graph/circularLayoutHelper.js +8 -2
- package/lib/chart/graph/forceLayout.js +6 -1
- package/lib/chart/graph/simpleLayout.js +1 -1
- package/lib/chart/graph/simpleLayoutHelper.js +10 -4
- package/lib/chart/heatmap/HeatmapView.js +4 -4
- package/lib/chart/helper/EffectLine.js +23 -1
- package/lib/chart/helper/EffectSymbol.js +2 -1
- package/lib/chart/helper/Line.js +129 -42
- package/lib/chart/helper/LineDraw.js +5 -1
- package/lib/chart/helper/Symbol.js +2 -3
- package/lib/chart/helper/createClipPathFromCoordSys.js +4 -1
- package/lib/chart/helper/createListFromArray.js +14 -8
- package/lib/chart/helper/createRenderPlanner.js +6 -3
- package/lib/chart/helper/multipleGraphEdgeHelper.js +258 -0
- package/lib/chart/helper/whiskerBoxCommon.js +22 -16
- package/lib/chart/line/LineSeries.js +3 -1
- package/lib/chart/line/LineView.js +41 -2
- package/lib/chart/lines/LinesSeries.js +0 -2
- package/lib/chart/map/MapSeries.js +14 -5
- package/lib/chart/pie/PieSeries.js +27 -6
- package/lib/chart/pie/PieView.js +22 -15
- package/lib/chart/pie/labelLayout.js +102 -19
- package/lib/chart/pie/pieLayout.js +19 -7
- package/lib/chart/radar/RadarSeries.js +27 -6
- package/lib/chart/radar/RadarView.js +3 -1
- package/lib/chart/sankey/SankeySeries.js +13 -1
- package/lib/chart/sankey/SankeyView.js +70 -32
- package/lib/chart/sankey/sankeyLayout.js +22 -3
- package/lib/chart/scatter/ScatterSeries.js +3 -1
- package/lib/chart/sunburst/SunburstPiece.js +5 -1
- package/lib/chart/sunburst/SunburstSeries.js +29 -12
- package/lib/chart/sunburst/SunburstView.js +5 -1
- package/lib/chart/themeRiver/ThemeRiverSeries.js +24 -33
- package/lib/chart/tree/TreeSeries.js +20 -3
- package/lib/chart/tree/TreeView.js +149 -23
- package/lib/chart/treemap/TreemapSeries.js +25 -4
- package/lib/chart/treemap/TreemapView.js +80 -38
- package/lib/chart/treemap/treemapLayout.js +1 -1
- package/lib/chart/treemap/treemapVisual.js +9 -15
- package/lib/component/axis/AngleAxisView.js +64 -7
- package/lib/component/axis/AxisBuilder.js +62 -24
- package/lib/component/axis/CartesianAxisView.js +52 -85
- package/lib/component/axis/RadiusAxisView.js +36 -4
- package/lib/component/axis/SingleAxisView.js +21 -6
- package/lib/component/axis/axisSplitHelper.js +132 -0
- package/lib/component/axisPointer/axisTrigger.js +1 -1
- package/lib/component/brush/BrushView.js +11 -1
- package/lib/component/brush/visualEncoding.js +13 -2
- package/lib/component/dataZoom/SliderZoomView.js +4 -10
- package/lib/component/helper/BrushController.js +33 -43
- package/lib/component/helper/MapDraw.js +30 -4
- package/lib/component/legend/LegendModel.js +3 -3
- package/lib/component/legend/LegendView.js +17 -13
- package/lib/component/legend/ScrollableLegendView.js +18 -18
- package/lib/component/marker/MarkAreaView.js +53 -15
- package/lib/component/marker/MarkLineModel.js +2 -1
- package/lib/component/marker/MarkLineView.js +3 -0
- package/lib/component/marker/MarkPointView.js +8 -1
- package/lib/component/marker/MarkerModel.js +3 -2
- package/lib/component/marker/markerHelper.js +7 -4
- package/lib/component/timeline/SliderTimelineView.js +7 -1
- package/lib/component/title.js +6 -2
- package/lib/component/toolbox/ToolboxView.js +5 -1
- package/lib/component/toolbox/feature/DataView.js +23 -8
- package/lib/component/toolbox/feature/DataZoom.js +6 -6
- package/lib/component/toolbox/feature/MagicType.js +20 -14
- package/lib/component/toolbox/feature/SaveAsImage.js +4 -2
- package/lib/component/tooltip/TooltipContent.js +101 -30
- package/lib/component/tooltip/TooltipRichContent.js +56 -8
- package/lib/component/tooltip/TooltipView.js +11 -12
- package/lib/component/visualMap/PiecewiseModel.js +3 -6
- package/lib/component/visualMap/VisualMapModel.js +1 -1
- package/lib/coord/Axis.js +30 -2
- package/lib/coord/View.js +9 -0
- package/lib/coord/axisDefault.js +22 -3
- package/lib/coord/axisHelper.js +24 -18
- package/lib/coord/calendar/Calendar.js +8 -4
- package/lib/coord/geo/GeoModel.js +2 -1
- package/lib/coord/geo/geoJSONLoader.js +3 -2
- package/lib/coord/geo/geoSourceManager.js +3 -2
- package/lib/coord/geo/parseGeoJson.js +3 -2
- package/lib/coord/radar/Radar.js +5 -5
- package/lib/data/DataDimensionInfo.js +157 -0
- package/lib/data/Graph.js +1 -6
- package/lib/data/List.js +26 -20
- package/lib/data/Tree.js +5 -42
- package/lib/data/helper/completeDimensions.js +43 -32
- package/lib/data/helper/createDimensions.js +2 -0
- package/lib/data/helper/sourceHelper.js +214 -114
- package/lib/echarts.js +57 -34
- package/lib/langEN.js +26 -0
- package/lib/layout/barGrid.js +19 -13
- package/lib/layout/barPolar.js +1 -6
- package/lib/loading/default.js +43 -27
- package/lib/model/Series.js +4 -4
- package/lib/model/referHelper.js +40 -12
- package/lib/processor/dataSample.js +1 -1
- package/lib/scale/Interval.js +87 -2
- package/lib/scale/Log.js +9 -2
- package/lib/scale/helper.js +1 -43
- package/lib/stream/Scheduler.js +10 -2
- package/lib/theme/dark.js +3 -0
- package/lib/util/format.js +19 -2
- package/lib/util/graphic.js +14 -12
- package/lib/visual/LegendVisualProvider.js +75 -0
- package/lib/visual/VisualMapping.js +1 -1
- package/lib/visual/dataColor.js +2 -12
- package/lib/visual/seriesColor.js +15 -7
- package/lib/visual/symbol.js +12 -2
- package/map/.DS_Store +0 -0
- package/map/js/.DS_Store +0 -0
- package/map/js/china.js +1 -1
- package/map/js/province/.DS_Store +0 -0
- package/map/js/province/chongqing.js +1 -1
- package/map/js/province/gansu.js +2 -2
- package/map/js/province/tianjin.js +1 -28
- package/map/json/.DS_Store +0 -0
- package/map/json/china.json +1 -1
- package/map/json/province/chongqing.json +1 -1
- package/map/json/province/tianjin.json +1 -1
- package/package.json +12 -6
- package/src/.DS_Store +0 -0
- package/src/chart/.DS_Store +0 -0
- package/src/chart/bar/BarSeries.js +15 -1
- package/src/chart/bar/BarView.js +198 -17
- package/src/chart/bar/BaseBarSeries.js +1 -1
- package/src/chart/bar/PictorialBarSeries.js +2 -2
- package/src/chart/candlestick/candlestickVisual.js +1 -1
- package/src/chart/effectScatter/EffectScatterSeries.js +1 -1
- package/src/chart/funnel/FunnelSeries.js +11 -4
- package/src/chart/funnel/funnelLayout.js +179 -53
- package/src/chart/gauge/GaugeSeries.js +0 -1
- package/src/chart/graph/GraphSeries.js +19 -7
- package/src/chart/graph/GraphView.js +28 -10
- package/src/chart/graph/circularLayoutHelper.js +8 -2
- package/src/chart/graph/forceLayout.js +7 -1
- package/src/chart/graph/simpleLayout.js +1 -1
- package/src/chart/graph/simpleLayoutHelper.js +12 -5
- package/src/chart/heatmap/HeatmapView.js +4 -4
- package/src/chart/helper/EffectLine.js +23 -1
- package/src/chart/helper/EffectSymbol.js +2 -1
- package/src/chart/helper/Line.js +122 -37
- package/src/chart/helper/LineDraw.js +5 -1
- package/src/chart/helper/Symbol.js +4 -4
- package/src/chart/helper/createClipPathFromCoordSys.js +4 -0
- package/src/chart/helper/createGraphFromNodeEdge.js +2 -1
- package/src/chart/helper/createListFromArray.js +13 -8
- package/src/chart/helper/createRenderPlanner.js +5 -2
- package/src/chart/helper/multipleGraphEdgeHelper.js +229 -0
- package/src/chart/helper/whiskerBoxCommon.js +21 -16
- package/src/chart/line/LineSeries.js +1 -1
- package/src/chart/line/LineView.js +45 -1
- package/src/chart/lines/LinesSeries.js +1 -3
- package/src/chart/map/MapSeries.js +11 -5
- package/src/chart/pie/PieSeries.js +26 -5
- package/src/chart/pie/PieView.js +20 -15
- package/src/chart/pie/labelLayout.js +114 -22
- package/src/chart/pie/pieLayout.js +20 -7
- package/src/chart/radar/RadarSeries.js +31 -6
- package/src/chart/radar/RadarView.js +4 -2
- package/src/chart/sankey/SankeySeries.js +12 -1
- package/src/chart/sankey/SankeyView.js +75 -30
- package/src/chart/sankey/sankeyLayout.js +25 -5
- package/src/chart/scatter/ScatterSeries.js +1 -1
- package/src/chart/sunburst/SunburstPiece.js +7 -1
- package/src/chart/sunburst/SunburstSeries.js +28 -15
- package/src/chart/sunburst/SunburstView.js +2 -1
- package/src/chart/themeRiver/ThemeRiverSeries.js +25 -30
- package/src/chart/tree/TreeSeries.js +19 -6
- package/src/chart/tree/TreeView.js +156 -23
- package/src/chart/treemap/TreemapSeries.js +23 -5
- package/src/chart/treemap/TreemapView.js +77 -41
- package/src/chart/treemap/treemapLayout.js +2 -2
- package/src/chart/treemap/treemapVisual.js +8 -25
- package/src/component/axis/AngleAxisView.js +75 -7
- package/src/component/axis/AxisBuilder.js +77 -32
- package/src/component/axis/CartesianAxisView.js +47 -83
- package/src/component/axis/RadiusAxisView.js +37 -4
- package/src/component/axis/SingleAxisView.js +21 -4
- package/src/component/axis/axisSplitHelper.js +114 -0
- package/src/component/axisPointer/axisTrigger.js +1 -1
- package/src/component/brush/BrushView.js +8 -1
- package/src/component/brush/visualEncoding.js +6 -3
- package/src/component/dataZoom/SliderZoomView.js +4 -9
- package/src/component/helper/BrushController.js +40 -47
- package/src/component/helper/MapDraw.js +27 -4
- package/src/component/legend/LegendModel.js +3 -3
- package/src/component/legend/LegendView.js +18 -12
- package/src/component/legend/ScrollableLegendView.js +18 -16
- package/src/component/marker/MarkAreaView.js +53 -15
- package/src/component/marker/MarkLineModel.js +2 -1
- package/src/component/marker/MarkLineView.js +3 -1
- package/src/component/marker/MarkPointView.js +7 -1
- package/src/component/marker/MarkerModel.js +3 -2
- package/src/component/marker/markerHelper.js +8 -5
- package/src/component/timeline/SliderTimelineView.js +9 -6
- package/src/component/title.js +4 -3
- package/src/component/toolbox/.DS_Store +0 -0
- package/src/component/toolbox/ToolboxView.js +5 -0
- package/src/component/toolbox/feature/DataView.js +20 -8
- package/src/component/toolbox/feature/DataZoom.js +6 -6
- package/src/component/toolbox/feature/MagicType.js +19 -13
- package/src/component/toolbox/feature/SaveAsImage.js +4 -2
- package/src/component/tooltip/TooltipContent.js +94 -28
- package/src/component/tooltip/TooltipRichContent.js +52 -9
- package/src/component/tooltip/TooltipView.js +14 -12
- package/src/component/visualMap/PiecewiseModel.js +5 -9
- package/src/component/visualMap/VisualMapModel.js +1 -1
- package/src/coord/Axis.js +29 -2
- package/src/coord/View.js +10 -1
- package/src/coord/axisDefault.js +26 -2
- package/src/coord/axisHelper.js +30 -21
- package/src/coord/calendar/Calendar.js +12 -5
- package/src/coord/geo/GeoModel.js +3 -6
- package/src/coord/geo/geoJSONLoader.js +3 -2
- package/src/coord/geo/geoSourceManager.js +3 -2
- package/src/coord/geo/parseGeoJson.js +3 -2
- package/src/coord/radar/Radar.js +6 -8
- package/src/data/DataDimensionInfo.js +135 -0
- package/src/data/Graph.js +0 -5
- package/src/data/List.js +30 -17
- package/src/data/Tree.js +6 -39
- package/src/data/helper/completeDimensions.js +49 -30
- package/src/data/helper/createDimensions.js +2 -0
- package/src/data/helper/sourceHelper.js +216 -124
- package/src/echarts.js +60 -36
- package/src/langEN.js +26 -0
- package/src/layout/barGrid.js +22 -10
- package/src/layout/barPolar.js +4 -6
- package/src/loading/default.js +46 -34
- package/src/model/.DS_Store +0 -0
- package/src/model/Series.js +4 -4
- package/src/model/referHelper.js +34 -11
- package/src/preprocessor/.DS_Store +0 -0
- package/src/processor/dataSample.js +1 -1
- package/src/scale/Interval.js +84 -4
- package/src/scale/Log.js +9 -2
- package/src/scale/helper.js +1 -39
- package/src/stream/Scheduler.js +9 -1
- package/src/theme/dark.js +3 -0
- package/src/util/.DS_Store +0 -0
- package/src/util/format.js +17 -1
- package/src/util/graphic.js +13 -11
- package/src/visual/LegendVisualProvider.js +55 -0
- package/src/visual/VisualMapping.js +1 -1
- package/src/visual/dataColor.js +0 -13
- package/src/visual/seriesColor.js +13 -7
- package/src/visual/symbol.js +11 -2
- package/theme/.DS_Store +0 -0
- package/theme/azul.js +163 -0
- package/theme/bee-inspired.js +178 -0
- package/theme/blue.js +178 -0
- package/theme/caravan.js +178 -0
- package/theme/carp.js +163 -0
- package/theme/cool.js +180 -0
- package/theme/dark-blue.js +168 -0
- package/theme/dark-bold.js +168 -0
- package/theme/dark-digerati.js +168 -0
- package/theme/dark-fresh-cut.js +168 -0
- package/theme/dark-mushroom.js +168 -0
- package/theme/dark.js +69 -62
- package/theme/eduardo.js +178 -0
- package/theme/forest.js +163 -0
- package/theme/fresh-cut.js +163 -0
- package/theme/fruit.js +178 -0
- package/theme/gray.js +220 -0
- package/theme/green.js +222 -0
- package/theme/helianthus.js +263 -0
- package/theme/infographic.js +72 -57
- package/theme/inspired.js +163 -0
- package/theme/jazz.js +163 -0
- package/theme/london.js +163 -0
- package/theme/macarons.js +80 -57
- package/theme/macarons2.js +251 -0
- package/theme/mint.js +155 -0
- package/theme/red-velvet.js +163 -0
- package/theme/red.js +225 -0
- package/theme/roma.js +55 -22
- package/theme/royal.js +163 -0
- package/theme/sakura.js +140 -0
- package/theme/shine.js +52 -45
- package/theme/tech-blue.js +180 -0
- package/theme/vintage.js +37 -23
|
@@ -23,7 +23,7 @@ import Model from '../../model/Model';
|
|
|
23
23
|
import AxisView from './AxisView';
|
|
24
24
|
import AxisBuilder from './AxisBuilder';
|
|
25
25
|
|
|
26
|
-
var elementList = ['axisLine', 'axisLabel', 'axisTick', 'splitLine', 'splitArea'];
|
|
26
|
+
var elementList = ['axisLine', 'axisLabel', 'axisTick', 'minorTick', 'splitLine', 'minorSplitLine', 'splitArea'];
|
|
27
27
|
|
|
28
28
|
function getAxisLineShape(polar, rExtent, angle) {
|
|
29
29
|
rExtent[1] > rExtent[0] && (rExtent = rExtent.slice().reverse());
|
|
@@ -72,6 +72,8 @@ export default AxisView.extend({
|
|
|
72
72
|
var radiusExtent = polar.getRadiusAxis().getExtent();
|
|
73
73
|
|
|
74
74
|
var ticksAngles = angleAxis.getTicksCoords();
|
|
75
|
+
var minorTickAngles = angleAxis.getMinorTicksCoords();
|
|
76
|
+
|
|
75
77
|
var labels = zrUtil.map(angleAxis.getViewLabels(), function (labelItem) {
|
|
76
78
|
var labelItem = zrUtil.clone(labelItem);
|
|
77
79
|
labelItem.coord = angleAxis.dataToCoord(labelItem.tickValue);
|
|
@@ -85,7 +87,7 @@ export default AxisView.extend({
|
|
|
85
87
|
if (angleAxisModel.get(name + '.show')
|
|
86
88
|
&& (!angleAxis.scale.isBlank() || name === 'axisLine')
|
|
87
89
|
) {
|
|
88
|
-
this['_' + name](angleAxisModel, polar, ticksAngles, radiusExtent, labels);
|
|
90
|
+
this['_' + name](angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels);
|
|
89
91
|
}
|
|
90
92
|
}, this);
|
|
91
93
|
},
|
|
@@ -93,7 +95,7 @@ export default AxisView.extend({
|
|
|
93
95
|
/**
|
|
94
96
|
* @private
|
|
95
97
|
*/
|
|
96
|
-
_axisLine: function (angleAxisModel, polar, ticksAngles, radiusExtent) {
|
|
98
|
+
_axisLine: function (angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {
|
|
97
99
|
var lineStyleModel = angleAxisModel.getModel('axisLine.lineStyle');
|
|
98
100
|
|
|
99
101
|
// extent id of the axis radius (r0 and r)
|
|
@@ -133,7 +135,7 @@ export default AxisView.extend({
|
|
|
133
135
|
/**
|
|
134
136
|
* @private
|
|
135
137
|
*/
|
|
136
|
-
_axisTick: function (angleAxisModel, polar, ticksAngles, radiusExtent) {
|
|
138
|
+
_axisTick: function (angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {
|
|
137
139
|
var tickModel = angleAxisModel.getModel('axisTick');
|
|
138
140
|
|
|
139
141
|
var tickLen = (tickModel.get('inside') ? -1 : 1) * tickModel.get('length');
|
|
@@ -159,7 +161,45 @@ export default AxisView.extend({
|
|
|
159
161
|
/**
|
|
160
162
|
* @private
|
|
161
163
|
*/
|
|
162
|
-
|
|
164
|
+
_minorTick: function (angleAxisModel, polar, tickAngles, minorTickAngles, radiusExtent) {
|
|
165
|
+
if (!minorTickAngles.length) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
var tickModel = angleAxisModel.getModel('axisTick');
|
|
170
|
+
var minorTickModel = angleAxisModel.getModel('minorTick');
|
|
171
|
+
|
|
172
|
+
var tickLen = (tickModel.get('inside') ? -1 : 1) * minorTickModel.get('length');
|
|
173
|
+
var radius = radiusExtent[getRadiusIdx(polar)];
|
|
174
|
+
|
|
175
|
+
var lines = [];
|
|
176
|
+
|
|
177
|
+
for (var i = 0; i < minorTickAngles.length; i++) {
|
|
178
|
+
for (var k = 0; k < minorTickAngles[i].length; k++) {
|
|
179
|
+
lines.push(new graphic.Line({
|
|
180
|
+
shape: getAxisLineShape(polar, [radius, radius + tickLen], minorTickAngles[i][k].coord)
|
|
181
|
+
}));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
this.group.add(graphic.mergePath(
|
|
186
|
+
lines, {
|
|
187
|
+
style: zrUtil.defaults(
|
|
188
|
+
minorTickModel.getModel('lineStyle').getLineStyle(),
|
|
189
|
+
zrUtil.defaults(
|
|
190
|
+
tickModel.getLineStyle(), {
|
|
191
|
+
stroke: angleAxisModel.get('axisLine.lineStyle.color')
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
)
|
|
195
|
+
}
|
|
196
|
+
));
|
|
197
|
+
},
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @private
|
|
201
|
+
*/
|
|
202
|
+
_axisLabel: function (angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels) {
|
|
163
203
|
var rawCategoryData = angleAxisModel.getCategories(true);
|
|
164
204
|
|
|
165
205
|
var commonLabelModel = angleAxisModel.getModel('axisLabel');
|
|
@@ -214,7 +254,7 @@ export default AxisView.extend({
|
|
|
214
254
|
/**
|
|
215
255
|
* @private
|
|
216
256
|
*/
|
|
217
|
-
_splitLine: function (angleAxisModel, polar, ticksAngles, radiusExtent) {
|
|
257
|
+
_splitLine: function (angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {
|
|
218
258
|
var splitLineModel = angleAxisModel.getModel('splitLine');
|
|
219
259
|
var lineStyleModel = splitLineModel.getModel('lineStyle');
|
|
220
260
|
var lineColors = lineStyleModel.get('color');
|
|
@@ -248,7 +288,35 @@ export default AxisView.extend({
|
|
|
248
288
|
/**
|
|
249
289
|
* @private
|
|
250
290
|
*/
|
|
251
|
-
|
|
291
|
+
_minorSplitLine: function (angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {
|
|
292
|
+
if (!minorTickAngles.length) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
var minorSplitLineModel = angleAxisModel.getModel('minorSplitLine');
|
|
297
|
+
var lineStyleModel = minorSplitLineModel.getModel('lineStyle');
|
|
298
|
+
|
|
299
|
+
var lines = [];
|
|
300
|
+
|
|
301
|
+
for (var i = 0; i < minorTickAngles.length; i++) {
|
|
302
|
+
for (var k = 0; k < minorTickAngles[i].length; k++) {
|
|
303
|
+
lines.push(new graphic.Line({
|
|
304
|
+
shape: getAxisLineShape(polar, radiusExtent, minorTickAngles[i][k].coord)
|
|
305
|
+
}));
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
this.group.add(graphic.mergePath(lines, {
|
|
310
|
+
style: lineStyleModel.getLineStyle(),
|
|
311
|
+
silent: true,
|
|
312
|
+
z: angleAxisModel.get('z')
|
|
313
|
+
}));
|
|
314
|
+
},
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @private
|
|
318
|
+
*/
|
|
319
|
+
_splitArea: function (angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {
|
|
252
320
|
if (!ticksAngles.length) {
|
|
253
321
|
return;
|
|
254
322
|
}
|
|
@@ -246,10 +246,12 @@ var builders = {
|
|
|
246
246
|
var axisModel = this.axisModel;
|
|
247
247
|
var opt = this.opt;
|
|
248
248
|
|
|
249
|
-
var
|
|
249
|
+
var ticksEls = buildAxisMajorTicks(this, axisModel, opt);
|
|
250
250
|
var labelEls = buildAxisLabel(this, axisModel, opt);
|
|
251
251
|
|
|
252
|
-
fixMinMaxLabelShow(axisModel, labelEls,
|
|
252
|
+
fixMinMaxLabelShow(axisModel, labelEls, ticksEls);
|
|
253
|
+
|
|
254
|
+
buildAxisMinorTicks(this, axisModel, opt);
|
|
253
255
|
},
|
|
254
256
|
|
|
255
257
|
/**
|
|
@@ -568,42 +570,27 @@ function isNameLocationCenter(nameLocation) {
|
|
|
568
570
|
return nameLocation === 'middle' || nameLocation === 'center';
|
|
569
571
|
}
|
|
570
572
|
|
|
571
|
-
function buildAxisTick(axisBuilder, axisModel, opt) {
|
|
572
|
-
var axis = axisModel.axis;
|
|
573
|
-
|
|
574
|
-
if (!axisModel.get('axisTick.show') || axis.scale.isBlank()) {
|
|
575
|
-
return;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
var tickModel = axisModel.getModel('axisTick');
|
|
579
|
-
|
|
580
|
-
var lineStyleModel = tickModel.getModel('lineStyle');
|
|
581
|
-
var tickLen = tickModel.get('length');
|
|
582
|
-
|
|
583
|
-
var ticksCoords = axis.getTicksCoords();
|
|
584
573
|
|
|
574
|
+
function createTicks(ticksCoords, tickTransform, tickEndCoord, tickLineStyle, aniid) {
|
|
575
|
+
var tickEls = [];
|
|
585
576
|
var pt1 = [];
|
|
586
577
|
var pt2 = [];
|
|
587
|
-
var matrix = axisBuilder._transform;
|
|
588
|
-
|
|
589
|
-
var tickEls = [];
|
|
590
|
-
|
|
591
578
|
for (var i = 0; i < ticksCoords.length; i++) {
|
|
592
579
|
var tickCoord = ticksCoords[i].coord;
|
|
593
580
|
|
|
594
581
|
pt1[0] = tickCoord;
|
|
595
582
|
pt1[1] = 0;
|
|
596
583
|
pt2[0] = tickCoord;
|
|
597
|
-
pt2[1] =
|
|
584
|
+
pt2[1] = tickEndCoord;
|
|
598
585
|
|
|
599
|
-
if (
|
|
600
|
-
v2ApplyTransform(pt1, pt1,
|
|
601
|
-
v2ApplyTransform(pt2, pt2,
|
|
586
|
+
if (tickTransform) {
|
|
587
|
+
v2ApplyTransform(pt1, pt1, tickTransform);
|
|
588
|
+
v2ApplyTransform(pt2, pt2, tickTransform);
|
|
602
589
|
}
|
|
603
590
|
// Tick line, Not use group transform to have better line draw
|
|
604
591
|
var tickEl = new graphic.Line({
|
|
605
592
|
// Id for animation
|
|
606
|
-
anid: '
|
|
593
|
+
anid: aniid + '_' + ticksCoords[i].tickValue,
|
|
607
594
|
subPixelOptimize: true,
|
|
608
595
|
shape: {
|
|
609
596
|
x1: pt1[0],
|
|
@@ -611,22 +598,80 @@ function buildAxisTick(axisBuilder, axisModel, opt) {
|
|
|
611
598
|
x2: pt2[0],
|
|
612
599
|
y2: pt2[1]
|
|
613
600
|
},
|
|
614
|
-
style:
|
|
615
|
-
lineStyleModel.getLineStyle(),
|
|
616
|
-
{
|
|
617
|
-
stroke: axisModel.get('axisLine.lineStyle.color')
|
|
618
|
-
}
|
|
619
|
-
),
|
|
601
|
+
style: tickLineStyle,
|
|
620
602
|
z2: 2,
|
|
621
603
|
silent: true
|
|
622
604
|
});
|
|
623
|
-
axisBuilder.group.add(tickEl);
|
|
624
605
|
tickEls.push(tickEl);
|
|
625
606
|
}
|
|
626
|
-
|
|
627
607
|
return tickEls;
|
|
628
608
|
}
|
|
629
609
|
|
|
610
|
+
function buildAxisMajorTicks(axisBuilder, axisModel, opt) {
|
|
611
|
+
var axis = axisModel.axis;
|
|
612
|
+
|
|
613
|
+
var tickModel = axisModel.getModel('axisTick');
|
|
614
|
+
|
|
615
|
+
if (!tickModel.get('show') || axis.scale.isBlank()) {
|
|
616
|
+
return;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
var lineStyleModel = tickModel.getModel('lineStyle');
|
|
620
|
+
var tickEndCoord = opt.tickDirection * tickModel.get('length');
|
|
621
|
+
|
|
622
|
+
var ticksCoords = axis.getTicksCoords();
|
|
623
|
+
|
|
624
|
+
var ticksEls = createTicks(ticksCoords, axisBuilder._transform, tickEndCoord, defaults(
|
|
625
|
+
lineStyleModel.getLineStyle(),
|
|
626
|
+
{
|
|
627
|
+
stroke: axisModel.get('axisLine.lineStyle.color')
|
|
628
|
+
}
|
|
629
|
+
), 'ticks');
|
|
630
|
+
|
|
631
|
+
for (var i = 0; i < ticksEls.length; i++) {
|
|
632
|
+
axisBuilder.group.add(ticksEls[i]);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
return ticksEls;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
function buildAxisMinorTicks(axisBuilder, axisModel, opt) {
|
|
639
|
+
var axis = axisModel.axis;
|
|
640
|
+
|
|
641
|
+
var minorTickModel = axisModel.getModel('minorTick');
|
|
642
|
+
|
|
643
|
+
if (!minorTickModel.get('show') || axis.scale.isBlank()) {
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
var minorTicksCoords = axis.getMinorTicksCoords();
|
|
648
|
+
if (!minorTicksCoords.length) {
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
var lineStyleModel = minorTickModel.getModel('lineStyle');
|
|
653
|
+
var tickEndCoord = opt.tickDirection * minorTickModel.get('length');
|
|
654
|
+
|
|
655
|
+
var minorTickLineStyle = defaults(
|
|
656
|
+
lineStyleModel.getLineStyle(),
|
|
657
|
+
defaults(
|
|
658
|
+
axisModel.getModel('axisTick').getLineStyle(),
|
|
659
|
+
{
|
|
660
|
+
stroke: axisModel.get('axisLine.lineStyle.color')
|
|
661
|
+
}
|
|
662
|
+
)
|
|
663
|
+
);
|
|
664
|
+
|
|
665
|
+
for (var i = 0; i < minorTicksCoords.length; i++) {
|
|
666
|
+
var minorTicksEls = createTicks(
|
|
667
|
+
minorTicksCoords[i], axisBuilder._transform, tickEndCoord, minorTickLineStyle, 'minorticks_' + i
|
|
668
|
+
);
|
|
669
|
+
for (var k = 0; k < minorTicksEls.length; k++) {
|
|
670
|
+
axisBuilder.group.add(minorTicksEls[k]);
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
|
|
630
675
|
function buildAxisLabel(axisBuilder, axisModel, opt) {
|
|
631
676
|
var axis = axisModel.axis;
|
|
632
677
|
var show = retrieve(opt.axisLabelShow, axisModel.get('axisLabel.show'));
|
|
@@ -22,22 +22,15 @@ import * as graphic from '../../util/graphic';
|
|
|
22
22
|
import AxisBuilder from './AxisBuilder';
|
|
23
23
|
import AxisView from './AxisView';
|
|
24
24
|
import * as cartesianAxisHelper from '../../coord/cartesian/cartesianAxisHelper';
|
|
25
|
+
import {rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove} from './axisSplitHelper';
|
|
25
26
|
|
|
26
27
|
var axisBuilderAttrs = [
|
|
27
28
|
'axisLine', 'axisTickLabel', 'axisName'
|
|
28
29
|
];
|
|
29
30
|
var selfBuilderAttrs = [
|
|
30
|
-
'splitArea', 'splitLine'
|
|
31
|
+
'splitArea', 'splitLine', 'minorSplitLine'
|
|
31
32
|
];
|
|
32
33
|
|
|
33
|
-
// function getAlignWithLabel(model, axisModel) {
|
|
34
|
-
// var alignWithLabel = model.get('alignWithLabel');
|
|
35
|
-
// if (alignWithLabel === 'auto') {
|
|
36
|
-
// alignWithLabel = axisModel.get('axisTick.alignWithLabel');
|
|
37
|
-
// }
|
|
38
|
-
// return alignWithLabel;
|
|
39
|
-
// }
|
|
40
|
-
|
|
41
34
|
var CartesianAxisView = AxisView.extend({
|
|
42
35
|
|
|
43
36
|
type: 'cartesianAxis',
|
|
@@ -82,7 +75,7 @@ var CartesianAxisView = AxisView.extend({
|
|
|
82
75
|
},
|
|
83
76
|
|
|
84
77
|
remove: function () {
|
|
85
|
-
this
|
|
78
|
+
rectCoordAxisHandleRemove(this);
|
|
86
79
|
},
|
|
87
80
|
|
|
88
81
|
/**
|
|
@@ -115,8 +108,6 @@ var CartesianAxisView = AxisView.extend({
|
|
|
115
108
|
var p1 = [];
|
|
116
109
|
var p2 = [];
|
|
117
110
|
|
|
118
|
-
// Simple optimization
|
|
119
|
-
// Batching the lines if color are the same
|
|
120
111
|
var lineStyle = lineStyleModel.getLineStyle();
|
|
121
112
|
for (var i = 0; i < ticksCoords.length; i++) {
|
|
122
113
|
var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);
|
|
@@ -158,92 +149,65 @@ var CartesianAxisView = AxisView.extend({
|
|
|
158
149
|
* @param {module:echarts/coord/cartesian/GridModel} gridModel
|
|
159
150
|
* @private
|
|
160
151
|
*/
|
|
161
|
-
|
|
152
|
+
_minorSplitLine: function (axisModel, gridModel) {
|
|
162
153
|
var axis = axisModel.axis;
|
|
163
154
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
var splitAreaModel = axisModel.getModel('splitArea');
|
|
169
|
-
var areaStyleModel = splitAreaModel.getModel('areaStyle');
|
|
170
|
-
var areaColors = areaStyleModel.get('color');
|
|
155
|
+
var minorSplitLineModel = axisModel.getModel('minorSplitLine');
|
|
156
|
+
var lineStyleModel = minorSplitLineModel.getModel('lineStyle');
|
|
171
157
|
|
|
172
158
|
var gridRect = gridModel.coordinateSystem.getRect();
|
|
159
|
+
var isHorizontal = axis.isHorizontal();
|
|
173
160
|
|
|
174
|
-
var
|
|
175
|
-
|
|
176
|
-
clamp: true
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
if (!ticksCoords.length) {
|
|
161
|
+
var minorTicksCoords = axis.getMinorTicksCoords();
|
|
162
|
+
if (!minorTicksCoords.length) {
|
|
180
163
|
return;
|
|
181
164
|
}
|
|
165
|
+
var p1 = [];
|
|
166
|
+
var p2 = [];
|
|
182
167
|
|
|
183
|
-
|
|
184
|
-
// should be corresponding to previous one if possible.
|
|
185
|
-
var areaColorsLen = areaColors.length;
|
|
186
|
-
var lastSplitAreaColors = this._splitAreaColors;
|
|
187
|
-
var newSplitAreaColors = zrUtil.createHashMap();
|
|
188
|
-
var colorIndex = 0;
|
|
189
|
-
if (lastSplitAreaColors) {
|
|
190
|
-
for (var i = 0; i < ticksCoords.length; i++) {
|
|
191
|
-
var cIndex = lastSplitAreaColors.get(ticksCoords[i].tickValue);
|
|
192
|
-
if (cIndex != null) {
|
|
193
|
-
colorIndex = (cIndex + (areaColorsLen - 1) * i) % areaColorsLen;
|
|
194
|
-
break;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
168
|
+
var lineStyle = lineStyleModel.getLineStyle();
|
|
198
169
|
|
|
199
|
-
var prev = axis.toGlobalCoord(ticksCoords[0].coord);
|
|
200
170
|
|
|
201
|
-
var
|
|
202
|
-
|
|
171
|
+
for (var i = 0; i < minorTicksCoords.length; i++) {
|
|
172
|
+
for (var k = 0; k < minorTicksCoords[i].length; k++) {
|
|
173
|
+
var tickCoord = axis.toGlobalCoord(minorTicksCoords[i][k].coord);
|
|
203
174
|
|
|
204
|
-
|
|
205
|
-
|
|
175
|
+
if (isHorizontal) {
|
|
176
|
+
p1[0] = tickCoord;
|
|
177
|
+
p1[1] = gridRect.y;
|
|
178
|
+
p2[0] = tickCoord;
|
|
179
|
+
p2[1] = gridRect.y + gridRect.height;
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
p1[0] = gridRect.x;
|
|
183
|
+
p1[1] = tickCoord;
|
|
184
|
+
p2[0] = gridRect.x + gridRect.width;
|
|
185
|
+
p2[1] = tickCoord;
|
|
186
|
+
}
|
|
206
187
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
x = gridRect.x;
|
|
220
|
-
y = prev;
|
|
221
|
-
width = gridRect.width;
|
|
222
|
-
height = tickCoord - y;
|
|
223
|
-
prev = y + height;
|
|
188
|
+
this._axisGroup.add(new graphic.Line({
|
|
189
|
+
anid: 'minor_line_' + minorTicksCoords[i][k].tickValue,
|
|
190
|
+
subPixelOptimize: true,
|
|
191
|
+
shape: {
|
|
192
|
+
x1: p1[0],
|
|
193
|
+
y1: p1[1],
|
|
194
|
+
x2: p2[0],
|
|
195
|
+
y2: p2[1]
|
|
196
|
+
},
|
|
197
|
+
style: lineStyle,
|
|
198
|
+
silent: true
|
|
199
|
+
}));
|
|
224
200
|
}
|
|
225
|
-
|
|
226
|
-
var tickValue = ticksCoords[i - 1].tickValue;
|
|
227
|
-
tickValue != null && newSplitAreaColors.set(tickValue, colorIndex);
|
|
228
|
-
|
|
229
|
-
this._axisGroup.add(new graphic.Rect({
|
|
230
|
-
anid: tickValue != null ? 'area_' + tickValue : null,
|
|
231
|
-
shape: {
|
|
232
|
-
x: x,
|
|
233
|
-
y: y,
|
|
234
|
-
width: width,
|
|
235
|
-
height: height
|
|
236
|
-
},
|
|
237
|
-
style: zrUtil.defaults({
|
|
238
|
-
fill: areaColors[colorIndex]
|
|
239
|
-
}, areaStyle),
|
|
240
|
-
silent: true
|
|
241
|
-
}));
|
|
242
|
-
|
|
243
|
-
colorIndex = (colorIndex + 1) % areaColorsLen;
|
|
244
201
|
}
|
|
202
|
+
},
|
|
245
203
|
|
|
246
|
-
|
|
204
|
+
/**
|
|
205
|
+
* @param {module:echarts/coord/cartesian/AxisModel} axisModel
|
|
206
|
+
* @param {module:echarts/coord/cartesian/GridModel} gridModel
|
|
207
|
+
* @private
|
|
208
|
+
*/
|
|
209
|
+
_splitArea: function (axisModel, gridModel) {
|
|
210
|
+
rectCoordAxisBuildSplitArea(this, this._axisGroup, axisModel, gridModel);
|
|
247
211
|
}
|
|
248
212
|
});
|
|
249
213
|
|
|
@@ -26,7 +26,7 @@ var axisBuilderAttrs = [
|
|
|
26
26
|
'axisLine', 'axisTickLabel', 'axisName'
|
|
27
27
|
];
|
|
28
28
|
var selfBuilderAttrs = [
|
|
29
|
-
'splitLine', 'splitArea'
|
|
29
|
+
'splitLine', 'splitArea', 'minorSplitLine'
|
|
30
30
|
];
|
|
31
31
|
|
|
32
32
|
export default AxisView.extend({
|
|
@@ -44,6 +44,7 @@ export default AxisView.extend({
|
|
|
44
44
|
var polar = radiusAxis.polar;
|
|
45
45
|
var angleAxis = polar.getAngleAxis();
|
|
46
46
|
var ticksCoords = radiusAxis.getTicksCoords();
|
|
47
|
+
var minorTicksCoords = radiusAxis.getMinorTicksCoords();
|
|
47
48
|
var axisAngle = angleAxis.getExtent()[0];
|
|
48
49
|
var radiusExtent = radiusAxis.getExtent();
|
|
49
50
|
|
|
@@ -54,7 +55,7 @@ export default AxisView.extend({
|
|
|
54
55
|
|
|
55
56
|
zrUtil.each(selfBuilderAttrs, function (name) {
|
|
56
57
|
if (radiusAxisModel.get(name + '.show') && !radiusAxis.scale.isBlank()) {
|
|
57
|
-
this['_' + name](radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords);
|
|
58
|
+
this['_' + name](radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords);
|
|
58
59
|
}
|
|
59
60
|
}, this);
|
|
60
61
|
},
|
|
@@ -80,8 +81,7 @@ export default AxisView.extend({
|
|
|
80
81
|
cx: polar.cx,
|
|
81
82
|
cy: polar.cy,
|
|
82
83
|
r: ticksCoords[i].coord
|
|
83
|
-
}
|
|
84
|
-
silent: true
|
|
84
|
+
}
|
|
85
85
|
}));
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -98,6 +98,39 @@ export default AxisView.extend({
|
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
|
|
101
|
+
/**
|
|
102
|
+
* @private
|
|
103
|
+
*/
|
|
104
|
+
_minorSplitLine: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords) {
|
|
105
|
+
if (!minorTicksCoords.length) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
var minorSplitLineModel = radiusAxisModel.getModel('minorSplitLine');
|
|
110
|
+
var lineStyleModel = minorSplitLineModel.getModel('lineStyle');
|
|
111
|
+
|
|
112
|
+
var lines = [];
|
|
113
|
+
|
|
114
|
+
for (var i = 0; i < minorTicksCoords.length; i++) {
|
|
115
|
+
for (var k = 0; k < minorTicksCoords[i].length; k++) {
|
|
116
|
+
lines.push(new graphic.Circle({
|
|
117
|
+
shape: {
|
|
118
|
+
cx: polar.cx,
|
|
119
|
+
cy: polar.cy,
|
|
120
|
+
r: minorTicksCoords[i][k].coord
|
|
121
|
+
}
|
|
122
|
+
}));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
this.group.add(graphic.mergePath(lines, {
|
|
127
|
+
style: zrUtil.defaults({
|
|
128
|
+
fill: null
|
|
129
|
+
}, lineStyleModel.getLineStyle()),
|
|
130
|
+
silent: true
|
|
131
|
+
}));
|
|
132
|
+
},
|
|
133
|
+
|
|
101
134
|
/**
|
|
102
135
|
* @private
|
|
103
136
|
*/
|
|
@@ -23,12 +23,13 @@ import AxisBuilder from './AxisBuilder';
|
|
|
23
23
|
import * as graphic from '../../util/graphic';
|
|
24
24
|
import * as singleAxisHelper from '../../coord/single/singleAxisHelper';
|
|
25
25
|
import AxisView from './AxisView';
|
|
26
|
+
import {rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove} from './axisSplitHelper';
|
|
26
27
|
|
|
27
28
|
var axisBuilderAttrs = [
|
|
28
29
|
'axisLine', 'axisTickLabel', 'axisName'
|
|
29
30
|
];
|
|
30
31
|
|
|
31
|
-
var
|
|
32
|
+
var selfBuilderAttrs = ['splitArea', 'splitLine'];
|
|
32
33
|
|
|
33
34
|
var SingleAxisView = AxisView.extend({
|
|
34
35
|
|
|
@@ -42,21 +43,33 @@ var SingleAxisView = AxisView.extend({
|
|
|
42
43
|
|
|
43
44
|
group.removeAll();
|
|
44
45
|
|
|
46
|
+
var oldAxisGroup = this._axisGroup;
|
|
47
|
+
this._axisGroup = new graphic.Group();
|
|
48
|
+
|
|
45
49
|
var layout = singleAxisHelper.layout(axisModel);
|
|
46
50
|
|
|
47
51
|
var axisBuilder = new AxisBuilder(axisModel, layout);
|
|
48
52
|
|
|
49
53
|
zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);
|
|
50
54
|
|
|
55
|
+
group.add(this._axisGroup);
|
|
51
56
|
group.add(axisBuilder.getGroup());
|
|
52
57
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
zrUtil.each(selfBuilderAttrs, function (name) {
|
|
59
|
+
if (axisModel.get(name + '.show')) {
|
|
60
|
+
this['_' + name](axisModel);
|
|
61
|
+
}
|
|
62
|
+
}, this);
|
|
63
|
+
|
|
64
|
+
graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);
|
|
56
65
|
|
|
57
66
|
SingleAxisView.superCall(this, 'render', axisModel, ecModel, api, payload);
|
|
58
67
|
},
|
|
59
68
|
|
|
69
|
+
remove: function () {
|
|
70
|
+
rectCoordAxisHandleRemove(this);
|
|
71
|
+
},
|
|
72
|
+
|
|
60
73
|
_splitLine: function (axisModel) {
|
|
61
74
|
var axis = axisModel.axis;
|
|
62
75
|
|
|
@@ -125,6 +138,10 @@ var SingleAxisView = AxisView.extend({
|
|
|
125
138
|
silent: true
|
|
126
139
|
}));
|
|
127
140
|
}
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
_splitArea: function (axisModel) {
|
|
144
|
+
rectCoordAxisBuildSplitArea(this, this._axisGroup, axisModel, axisModel);
|
|
128
145
|
}
|
|
129
146
|
});
|
|
130
147
|
|