echarts 4.5.0 → 4.6.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.
Files changed (154) hide show
  1. package/dist/echarts-en.common.js +1790 -774
  2. package/dist/echarts-en.common.min.js +1 -1
  3. package/dist/echarts-en.js +2029 -849
  4. package/dist/echarts-en.js.map +1 -1
  5. package/dist/echarts-en.min.js +1 -1
  6. package/dist/echarts-en.simple.js +1676 -691
  7. package/dist/echarts-en.simple.min.js +1 -1
  8. package/dist/echarts.common.js +1790 -774
  9. package/dist/echarts.common.min.js +1 -1
  10. package/dist/echarts.js +2029 -849
  11. package/dist/echarts.js.map +1 -1
  12. package/dist/echarts.min.js +1 -1
  13. package/dist/echarts.simple.js +1676 -691
  14. package/dist/echarts.simple.min.js +1 -1
  15. package/lib/chart/bar/BarView.js +11 -1
  16. package/lib/chart/bar/BaseBarSeries.js +3 -1
  17. package/lib/chart/effectScatter/EffectScatterSeries.js +3 -1
  18. package/lib/chart/funnel/FunnelSeries.js +15 -5
  19. package/lib/chart/gauge/GaugeSeries.js +0 -2
  20. package/lib/chart/graph/GraphSeries.js +9 -4
  21. package/lib/chart/graph/GraphView.js +28 -8
  22. package/lib/chart/heatmap/HeatmapView.js +4 -4
  23. package/lib/chart/helper/createListFromArray.js +14 -8
  24. package/lib/chart/helper/whiskerBoxCommon.js +22 -16
  25. package/lib/chart/line/LineSeries.js +3 -1
  26. package/lib/chart/line/LineView.js +8 -2
  27. package/lib/chart/map/MapSeries.js +8 -1
  28. package/lib/chart/pie/PieSeries.js +27 -6
  29. package/lib/chart/pie/PieView.js +1 -1
  30. package/lib/chart/pie/labelLayout.js +102 -19
  31. package/lib/chart/pie/pieLayout.js +19 -7
  32. package/lib/chart/radar/RadarSeries.js +3 -3
  33. package/lib/chart/sankey/SankeyView.js +28 -9
  34. package/lib/chart/scatter/ScatterSeries.js +3 -1
  35. package/lib/chart/themeRiver/ThemeRiverSeries.js +3 -3
  36. package/lib/chart/tree/TreeSeries.js +15 -1
  37. package/lib/component/axis/AngleAxisView.js +64 -7
  38. package/lib/component/axis/AxisBuilder.js +63 -24
  39. package/lib/component/axis/CartesianAxisView.js +55 -11
  40. package/lib/component/axis/RadiusAxisView.js +36 -4
  41. package/lib/component/dataZoom/SliderZoomView.js +4 -10
  42. package/lib/component/helper/BrushController.js +33 -43
  43. package/lib/component/legend/LegendModel.js +3 -3
  44. package/lib/component/legend/LegendView.js +17 -13
  45. package/lib/component/toolbox/ToolboxView.js +5 -1
  46. package/lib/component/toolbox/feature/MagicType.js +19 -14
  47. package/lib/coord/Axis.js +30 -2
  48. package/lib/coord/axisDefault.js +21 -2
  49. package/lib/data/DataDimensionInfo.js +157 -0
  50. package/lib/data/List.js +25 -19
  51. package/lib/data/Tree.js +2 -1
  52. package/lib/data/helper/completeDimensions.js +43 -32
  53. package/lib/data/helper/createDimensions.js +2 -0
  54. package/lib/data/helper/sourceHelper.js +214 -114
  55. package/lib/echarts.js +2 -2
  56. package/lib/layout/barGrid.js +2 -3
  57. package/lib/model/Series.js +3 -3
  58. package/lib/model/referHelper.js +40 -12
  59. package/lib/scale/Interval.js +87 -2
  60. package/lib/scale/Log.js +9 -2
  61. package/lib/scale/helper.js +1 -43
  62. package/lib/theme/dark.js +3 -0
  63. package/lib/util/graphic.js +1 -2
  64. package/lib/visual/LegendVisualProvider.js +75 -0
  65. package/lib/visual/dataColor.js +2 -12
  66. package/lib/visual/seriesColor.js +15 -7
  67. package/map/json/province/tianjin.json +1 -1
  68. package/package.json +3 -2
  69. package/src/chart/bar/BarView.js +12 -2
  70. package/src/chart/bar/BaseBarSeries.js +1 -1
  71. package/src/chart/effectScatter/EffectScatterSeries.js +1 -1
  72. package/src/chart/funnel/FunnelSeries.js +11 -4
  73. package/src/chart/gauge/GaugeSeries.js +0 -1
  74. package/src/chart/graph/GraphSeries.js +8 -3
  75. package/src/chart/graph/GraphView.js +26 -8
  76. package/src/chart/heatmap/HeatmapView.js +4 -4
  77. package/src/chart/helper/createListFromArray.js +13 -8
  78. package/src/chart/helper/whiskerBoxCommon.js +21 -16
  79. package/src/chart/line/LineSeries.js +1 -1
  80. package/src/chart/line/LineView.js +6 -1
  81. package/src/chart/map/MapSeries.js +5 -1
  82. package/src/chart/pie/PieSeries.js +26 -5
  83. package/src/chart/pie/PieView.js +1 -1
  84. package/src/chart/pie/labelLayout.js +114 -22
  85. package/src/chart/pie/pieLayout.js +20 -7
  86. package/src/chart/radar/RadarSeries.js +5 -3
  87. package/src/chart/sankey/SankeyView.js +26 -9
  88. package/src/chart/scatter/ScatterSeries.js +1 -1
  89. package/src/chart/themeRiver/ThemeRiverSeries.js +4 -3
  90. package/src/chart/tree/TreeSeries.js +12 -1
  91. package/src/component/axis/AngleAxisView.js +75 -7
  92. package/src/component/axis/AxisBuilder.js +78 -33
  93. package/src/component/axis/CartesianAxisView.js +58 -11
  94. package/src/component/axis/RadiusAxisView.js +37 -4
  95. package/src/component/dataZoom/SliderZoomView.js +4 -9
  96. package/src/component/helper/BrushController.js +40 -47
  97. package/src/component/legend/LegendModel.js +3 -3
  98. package/src/component/legend/LegendView.js +18 -12
  99. package/src/component/toolbox/ToolboxView.js +5 -0
  100. package/src/component/toolbox/feature/MagicType.js +18 -13
  101. package/src/coord/Axis.js +29 -2
  102. package/src/coord/axisDefault.js +25 -1
  103. package/src/data/DataDimensionInfo.js +135 -0
  104. package/src/data/List.js +29 -16
  105. package/src/data/Tree.js +3 -1
  106. package/src/data/helper/completeDimensions.js +49 -30
  107. package/src/data/helper/createDimensions.js +2 -0
  108. package/src/data/helper/sourceHelper.js +216 -124
  109. package/src/echarts.js +2 -2
  110. package/src/layout/barGrid.js +6 -3
  111. package/src/model/Series.js +3 -3
  112. package/src/model/referHelper.js +34 -11
  113. package/src/scale/Interval.js +84 -4
  114. package/src/scale/Log.js +9 -2
  115. package/src/scale/helper.js +1 -39
  116. package/src/theme/dark.js +3 -0
  117. package/src/util/graphic.js +1 -2
  118. package/src/visual/LegendVisualProvider.js +55 -0
  119. package/src/visual/dataColor.js +0 -13
  120. package/src/visual/seriesColor.js +13 -7
  121. package/theme/azul.js +163 -0
  122. package/theme/bee-inspired.js +178 -0
  123. package/theme/blue.js +178 -0
  124. package/theme/caravan.js +178 -0
  125. package/theme/carp.js +163 -0
  126. package/theme/cool.js +180 -0
  127. package/theme/dark-blue.js +168 -0
  128. package/theme/dark-bold.js +168 -0
  129. package/theme/dark-digerati.js +168 -0
  130. package/theme/dark-fresh-cut.js +168 -0
  131. package/theme/dark-mushroom.js +168 -0
  132. package/theme/dark.js +69 -62
  133. package/theme/eduardo.js +178 -0
  134. package/theme/forest.js +163 -0
  135. package/theme/fresh-cut.js +163 -0
  136. package/theme/fruit.js +178 -0
  137. package/theme/gray.js +220 -0
  138. package/theme/green.js +222 -0
  139. package/theme/helianthus.js +263 -0
  140. package/theme/infographic.js +72 -57
  141. package/theme/inspired.js +163 -0
  142. package/theme/jazz.js +163 -0
  143. package/theme/london.js +163 -0
  144. package/theme/macarons.js +80 -57
  145. package/theme/macarons2.js +251 -0
  146. package/theme/mint.js +155 -0
  147. package/theme/red-velvet.js +163 -0
  148. package/theme/red.js +225 -0
  149. package/theme/roma.js +55 -22
  150. package/theme/royal.js +163 -0
  151. package/theme/sakura.js +140 -0
  152. package/theme/shine.js +52 -45
  153. package/theme/tech-blue.js +180 -0
  154. package/theme/vintage.js +37 -23
@@ -277,6 +277,7 @@ export default echarts.extendChartView({
277
277
  if (itemModel.get('focusNodeAdjacency')) {
278
278
  el.off('mouseover').on('mouseover', function () {
279
279
  if (!sankeyView._focusAdjacencyDisabled) {
280
+ sankeyView._clearTimer();
280
281
  api.dispatchAction({
281
282
  type: 'focusNodeAdjacency',
282
283
  seriesId: seriesModel.id,
@@ -286,10 +287,7 @@ export default echarts.extendChartView({
286
287
  });
287
288
  el.off('mouseout').on('mouseout', function () {
288
289
  if (!sankeyView._focusAdjacencyDisabled) {
289
- api.dispatchAction({
290
- type: 'unfocusNodeAdjacency',
291
- seriesId: seriesModel.id
292
- });
290
+ sankeyView._dispatchUnfocus(api);
293
291
  }
294
292
  });
295
293
  }
@@ -300,6 +298,7 @@ export default echarts.extendChartView({
300
298
  if (edgeModel.get('focusNodeAdjacency')) {
301
299
  el.off('mouseover').on('mouseover', function () {
302
300
  if (!sankeyView._focusAdjacencyDisabled) {
301
+ sankeyView._clearTimer();
303
302
  api.dispatchAction({
304
303
  type: 'focusNodeAdjacency',
305
304
  seriesId: seriesModel.id,
@@ -309,10 +308,7 @@ export default echarts.extendChartView({
309
308
  });
310
309
  el.off('mouseout').on('mouseout', function () {
311
310
  if (!sankeyView._focusAdjacencyDisabled) {
312
- api.dispatchAction({
313
- type: 'unfocusNodeAdjacency',
314
- seriesId: seriesModel.id
315
- });
311
+ sankeyView._dispatchUnfocus(api);
316
312
  }
317
313
  });
318
314
  }
@@ -327,7 +323,28 @@ export default echarts.extendChartView({
327
323
  this._data = seriesModel.getData();
328
324
  },
329
325
 
330
- dispose: function () {},
326
+ dispose: function () {
327
+ this._clearTimer();
328
+ },
329
+
330
+ _dispatchUnfocus: function (api) {
331
+ var self = this;
332
+ this._clearTimer();
333
+ this._unfocusDelayTimer = setTimeout(function () {
334
+ self._unfocusDelayTimer = null;
335
+ api.dispatchAction({
336
+ type: 'unfocusNodeAdjacency',
337
+ seriesId: self._model.id
338
+ });
339
+ }, 500);
340
+ },
341
+
342
+ _clearTimer: function () {
343
+ if (this._unfocusDelayTimer) {
344
+ clearTimeout(this._unfocusDelayTimer);
345
+ this._unfocusDelayTimer = null;
346
+ }
347
+ },
331
348
 
332
349
  focusNodeAdjacency: function (seriesModel, ecModel, api, payload) {
333
350
  var data = this._model.getData();
@@ -27,7 +27,7 @@ export default SeriesModel.extend({
27
27
  dependencies: ['grid', 'polar', 'geo', 'singleAxis', 'calendar'],
28
28
 
29
29
  getInitialData: function (option, ecModel) {
30
- return createListFromArray(this.getSource(), this);
30
+ return createListFromArray(this.getSource(), this, {useEncodeDefaulter: true});
31
31
  },
32
32
 
33
33
  brushSelector: 'point',
@@ -24,6 +24,7 @@ import List from '../../data/List';
24
24
  import * as zrUtil from 'zrender/src/core/util';
25
25
  import {groupData} from '../../util/model';
26
26
  import {encodeHTML} from '../../util/format';
27
+ import LegendVisualProvider from '../../visual/LegendVisualProvider';
27
28
 
28
29
  var DATA_NAME_INDEX = 2;
29
30
 
@@ -49,9 +50,9 @@ var ThemeRiverSeries = SeriesModel.extend({
49
50
  // Put this function here is for the sake of consistency of code style.
50
51
  // Enable legend selection for each data item
51
52
  // Use a function instead of direct access because data reference may changed
52
- this.legendDataProvider = function () {
53
- return this.getRawData();
54
- };
53
+ this.legendVisualProvider = new LegendVisualProvider(
54
+ zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this)
55
+ );
55
56
  },
56
57
 
57
58
  /**
@@ -47,7 +47,18 @@ export default SeriesModel.extend({
47
47
 
48
48
  treeOption.leaves = leaves;
49
49
 
50
- var tree = Tree.createTree(root, this, treeOption);
50
+ var tree = Tree.createTree(root, this, treeOption, beforeLink);
51
+
52
+ function beforeLink(nodeData) {
53
+ nodeData.wrapMethod('getItemModel', function (model, idx) {
54
+ var node = tree.getNodeByDataIndex(idx);
55
+ var leavesModel = node.getLeavesModel();
56
+ if (!node.children.length || !node.isExpand) {
57
+ model.parentModel = leavesModel;
58
+ }
59
+ return model;
60
+ });
61
+ }
51
62
 
52
63
  var treeDepth = 0;
53
64
 
@@ -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
- _axisLabel: function (angleAxisModel, polar, ticksAngles, radiusExtent, labels) {
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
- _splitArea: function (angleAxisModel, polar, ticksAngles, radiusExtent) {
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
  }
@@ -17,7 +17,7 @@
17
17
  * under the License.
18
18
  */
19
19
 
20
- import {retrieve, defaults, extend, each} from 'zrender/src/core/util';
20
+ import {retrieve, defaults, extend, each, map} from 'zrender/src/core/util';
21
21
  import * as formatUtil from '../../util/format';
22
22
  import * as graphic from '../../util/graphic';
23
23
  import Model from '../../model/Model';
@@ -246,10 +246,12 @@ var builders = {
246
246
  var axisModel = this.axisModel;
247
247
  var opt = this.opt;
248
248
 
249
- var tickEls = buildAxisTick(this, axisModel, opt);
249
+ var ticksEls = buildAxisMajorTicks(this, axisModel, opt);
250
250
  var labelEls = buildAxisLabel(this, axisModel, opt);
251
251
 
252
- fixMinMaxLabelShow(axisModel, labelEls, tickEls);
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] = opt.tickDirection * tickLen;
584
+ pt2[1] = tickEndCoord;
598
585
 
599
- if (matrix) {
600
- v2ApplyTransform(pt1, pt1, matrix);
601
- v2ApplyTransform(pt2, pt2, matrix);
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: 'tick_' + ticksCoords[i].tickValue,
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: defaults(
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'));
@@ -27,17 +27,9 @@ var axisBuilderAttrs = [
27
27
  'axisLine', 'axisTickLabel', 'axisName'
28
28
  ];
29
29
  var selfBuilderAttrs = [
30
- 'splitArea', 'splitLine'
30
+ 'splitArea', 'splitLine', 'minorSplitLine'
31
31
  ];
32
32
 
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
33
  var CartesianAxisView = AxisView.extend({
42
34
 
43
35
  type: 'cartesianAxis',
@@ -115,8 +107,6 @@ var CartesianAxisView = AxisView.extend({
115
107
  var p1 = [];
116
108
  var p2 = [];
117
109
 
118
- // Simple optimization
119
- // Batching the lines if color are the same
120
110
  var lineStyle = lineStyleModel.getLineStyle();
121
111
  for (var i = 0; i < ticksCoords.length; i++) {
122
112
  var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);
@@ -153,6 +143,63 @@ var CartesianAxisView = AxisView.extend({
153
143
  }
154
144
  },
155
145
 
146
+ /**
147
+ * @param {module:echarts/coord/cartesian/AxisModel} axisModel
148
+ * @param {module:echarts/coord/cartesian/GridModel} gridModel
149
+ * @private
150
+ */
151
+ _minorSplitLine: function (axisModel, gridModel) {
152
+ var axis = axisModel.axis;
153
+
154
+ var minorSplitLineModel = axisModel.getModel('minorSplitLine');
155
+ var lineStyleModel = minorSplitLineModel.getModel('lineStyle');
156
+
157
+ var gridRect = gridModel.coordinateSystem.getRect();
158
+ var isHorizontal = axis.isHorizontal();
159
+
160
+ var minorTicksCoords = axis.getMinorTicksCoords();
161
+ if (!minorTicksCoords.length) {
162
+ return;
163
+ }
164
+ var p1 = [];
165
+ var p2 = [];
166
+
167
+ var lineStyle = lineStyleModel.getLineStyle();
168
+
169
+
170
+ for (var i = 0; i < minorTicksCoords.length; i++) {
171
+ for (var k = 0; k < minorTicksCoords[i].length; k++) {
172
+ var tickCoord = axis.toGlobalCoord(minorTicksCoords[i][k].coord);
173
+
174
+ if (isHorizontal) {
175
+ p1[0] = tickCoord;
176
+ p1[1] = gridRect.y;
177
+ p2[0] = tickCoord;
178
+ p2[1] = gridRect.y + gridRect.height;
179
+ }
180
+ else {
181
+ p1[0] = gridRect.x;
182
+ p1[1] = tickCoord;
183
+ p2[0] = gridRect.x + gridRect.width;
184
+ p2[1] = tickCoord;
185
+ }
186
+
187
+ this._axisGroup.add(new graphic.Line({
188
+ anid: 'minor_line_' + minorTicksCoords[i][k].tickValue,
189
+ subPixelOptimize: true,
190
+ shape: {
191
+ x1: p1[0],
192
+ y1: p1[1],
193
+ x2: p2[0],
194
+ y2: p2[1]
195
+ },
196
+ style: lineStyle,
197
+ silent: true
198
+ }));
199
+ }
200
+ }
201
+ },
202
+
156
203
  /**
157
204
  * @param {module:echarts/coord/cartesian/AxisModel} axisModel
158
205
  * @param {module:echarts/coord/cartesian/GridModel} gridModel
@@ -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
  */
@@ -450,10 +450,6 @@ var SliderZoomView = DataZoomView.extend({
450
450
  draggable: true,
451
451
  cursor: getCursor(this._orient),
452
452
  drift: bind(this._onDragMove, this, 'all'),
453
- onmousemove: function (e) {
454
- // Fot mobile devicem, prevent screen slider on the button.
455
- eventTool.stop(e.event);
456
- },
457
453
  ondragstart: bind(this._showDataInfo, this, true),
458
454
  ondragend: bind(this._onDragEnd, this),
459
455
  onmouseover: bind(this._showDataInfo, this, true),
@@ -489,10 +485,6 @@ var SliderZoomView = DataZoomView.extend({
489
485
  cursor: getCursor(this._orient),
490
486
  draggable: true,
491
487
  drift: bind(this._onDragMove, this, handleIndex),
492
- onmousemove: function (e) {
493
- // Fot mobile devicem, prevent screen slider on the button.
494
- eventTool.stop(e.event);
495
- },
496
488
  ondragend: bind(this._onDragEnd, this),
497
489
  onmouseover: bind(this._showDataInfo, this, true),
498
490
  onmouseout: bind(this._showDataInfo, this, false)
@@ -714,9 +706,12 @@ var SliderZoomView = DataZoomView.extend({
714
706
  handleLabels[1].attr('invisible', !showOrHide);
715
707
  },
716
708
 
717
- _onDragMove: function (handleIndex, dx, dy) {
709
+ _onDragMove: function (handleIndex, dx, dy, event) {
718
710
  this._dragging = true;
719
711
 
712
+ // For mobile device, prevent screen slider on the button.
713
+ eventTool.stop(event.event);
714
+
720
715
  // Transform dx, dy to bar coordination.
721
716
  var barTransform = this._displayables.barGroup.getLocalTransform();
722
717
  var vertex = graphic.applyTransform([dx, dy], barTransform, true);