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
@@ -0,0 +1,163 @@
1
+ /*
2
+ * Licensed to the Apache Software Foundation (ASF) under one
3
+ * or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information
5
+ * regarding copyright ownership. The ASF licenses this file
6
+ * to you under the Apache License, Version 2.0 (the
7
+ * "License"); you may not use this file except in compliance
8
+ * with the License. You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing,
13
+ * software distributed under the License is distributed on an
14
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ * KIND, either express or implied. See the License for the
16
+ * specific language governing permissions and limitations
17
+ * under the License.
18
+ */
19
+
20
+ (function(root, factory) {
21
+ if (typeof define === 'function' && define.amd) {
22
+ // AMD. Register as an anonymous module.
23
+ define(['exports', 'echarts'], factory);
24
+ } else if (
25
+ typeof exports === 'object' &&
26
+ typeof exports.nodeName !== 'string'
27
+ ) {
28
+ // CommonJS
29
+ factory(exports, require('echarts'));
30
+ } else {
31
+ // Browser globals
32
+ factory({}, root.echarts);
33
+ }
34
+ })(this, function(exports, echarts) {
35
+ var log = function(msg) {
36
+ if (typeof console !== 'undefined') {
37
+ console && console.error && console.error(msg);
38
+ }
39
+ };
40
+ if (!echarts) {
41
+ log('ECharts is not Loaded');
42
+ return;
43
+ }
44
+
45
+ var colorPalette = [
46
+ '#02151a',
47
+ '#043a47',
48
+ '#087891',
49
+ '#c8c8c8',
50
+ '#b31d14',
51
+ '#0b9cc1',
52
+ '#f2f2f2',
53
+ '#f07b75'
54
+ ];
55
+
56
+ var theme = {
57
+ color: colorPalette,
58
+
59
+ title: {
60
+ textStyle: {
61
+ fontWeight: 'normal',
62
+ color: '#02151a'
63
+ }
64
+ },
65
+
66
+ visualMap: {
67
+ color: ['#02151a', '#a2d4e6']
68
+ },
69
+
70
+ toolbox: {
71
+ color: ['#02151a', '#02151a', '#02151a', '#02151a']
72
+ },
73
+
74
+ tooltip: {
75
+ backgroundColor: 'rgba(0,0,0,0.5)',
76
+ axisPointer: {
77
+ // Axis indicator, coordinate trigger effective
78
+ type: 'line', // The default is a straight line: 'line' | 'shadow'
79
+ lineStyle: {
80
+ // Straight line indicator style settings
81
+ color: '#02151a',
82
+ type: 'dashed'
83
+ },
84
+ crossStyle: {
85
+ color: '#02151a'
86
+ },
87
+ shadowStyle: {
88
+ // Shadow indicator style settings
89
+ color: 'rgba(200,200,200,0.3)'
90
+ }
91
+ }
92
+ },
93
+
94
+ // Area scaling controller
95
+ dataZoom: {
96
+ dataBackgroundColor: '#eee', // Data background color
97
+ fillerColor: 'rgba(144,197,237,0.2)', // Fill the color
98
+ handleColor: '#02151a' // Handle color
99
+ },
100
+
101
+ timeline: {
102
+ lineStyle: {
103
+ color: '#02151a'
104
+ },
105
+ controlStyle: {
106
+ color: '#02151a',
107
+ borderColor: '#02151a'
108
+ }
109
+ },
110
+
111
+ candlestick: {
112
+ itemStyle: {
113
+ color: '#043a47',
114
+ color0: '#087891'
115
+ },
116
+ lineStyle: {
117
+ width: 1,
118
+ color: '#b31d14',
119
+ color0: '#c8c8c8'
120
+ },
121
+ areaStyle: {
122
+ color: '#087891',
123
+ color0: '#c8c8c8'
124
+ }
125
+ },
126
+
127
+ map: {
128
+ itemStyle: {
129
+ color: '#ddd'
130
+ },
131
+ areaStyle: {
132
+ color: '#087891'
133
+ },
134
+ label: {
135
+ color: '#c12e34'
136
+ }
137
+ },
138
+
139
+ graph: {
140
+ itemStyle: {
141
+ color: '#c12e34'
142
+ },
143
+ linkStyle: {
144
+ color: '#02151a'
145
+ }
146
+ },
147
+
148
+ gauge: {
149
+ axisLine: {
150
+ lineStyle: {
151
+ color: [
152
+ [0.2, '#043a47'],
153
+ [0.8, '#02151a'],
154
+ [1, '#b31d14']
155
+ ],
156
+ width: 8
157
+ }
158
+ }
159
+ }
160
+ };
161
+
162
+ echarts.registerTheme('london', theme);
163
+ });
package/theme/macarons.js CHANGED
@@ -17,19 +17,22 @@
17
17
  * under the License.
18
18
  */
19
19
 
20
- (function (root, factory) {
20
+ (function(root, factory) {
21
21
  if (typeof define === 'function' && define.amd) {
22
22
  // AMD. Register as an anonymous module.
23
23
  define(['exports', 'echarts'], factory);
24
- } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
24
+ } else if (
25
+ typeof exports === 'object' &&
26
+ typeof exports.nodeName !== 'string'
27
+ ) {
25
28
  // CommonJS
26
29
  factory(exports, require('echarts'));
27
30
  } else {
28
31
  // Browser globals
29
32
  factory({}, root.echarts);
30
33
  }
31
- }(this, function (exports, echarts) {
32
- var log = function (msg) {
34
+ })(this, function(exports, echarts) {
35
+ var log = function(msg) {
33
36
  if (typeof console !== 'undefined') {
34
37
  console && console.error && console.error(msg);
35
38
  }
@@ -40,13 +43,28 @@
40
43
  }
41
44
 
42
45
  var colorPalette = [
43
- '#2ec7c9','#b6a2de','#5ab1ef','#ffb980','#d87a80',
44
- '#8d98b3','#e5cf0d','#97b552','#95706d','#dc69aa',
45
- '#07a2a4','#9a7fd1','#588dd5','#f5994e','#c05050',
46
- '#59678c','#c9ab00','#7eb00a','#6f5553','#c14089'
46
+ '#2ec7c9',
47
+ '#b6a2de',
48
+ '#5ab1ef',
49
+ '#ffb980',
50
+ '#d87a80',
51
+ '#8d98b3',
52
+ '#e5cf0d',
53
+ '#97b552',
54
+ '#95706d',
55
+ '#dc69aa',
56
+ '#07a2a4',
57
+ '#9a7fd1',
58
+ '#588dd5',
59
+ '#f5994e',
60
+ '#c05050',
61
+ '#59678c',
62
+ '#c9ab00',
63
+ '#7eb00a',
64
+ '#6f5553',
65
+ '#c14089'
47
66
  ];
48
67
 
49
-
50
68
  var theme = {
51
69
  color: colorPalette,
52
70
 
@@ -59,7 +77,7 @@
59
77
 
60
78
  visualMap: {
61
79
  itemWidth: 15,
62
- color: ['#5ab1ef','#e0ffff']
80
+ color: ['#5ab1ef', '#e0ffff']
63
81
  },
64
82
 
65
83
  toolbox: {
@@ -72,15 +90,15 @@
72
90
 
73
91
  tooltip: {
74
92
  backgroundColor: 'rgba(50,50,50,0.5)',
75
- axisPointer : {
76
- type : 'line',
77
- lineStyle : {
93
+ axisPointer: {
94
+ type: 'line',
95
+ lineStyle: {
78
96
  color: '#008acd'
79
97
  },
80
98
  crossStyle: {
81
99
  color: '#008acd'
82
100
  },
83
- shadowStyle : {
101
+ shadowStyle: {
84
102
  color: 'rgba(200,200,200,0.2)'
85
103
  }
86
104
  }
@@ -115,10 +133,10 @@
115
133
  color: '#008acd'
116
134
  }
117
135
  },
118
- splitArea : {
119
- show : true,
120
- areaStyle : {
121
- color: ['rgba(250,250,250,0.1)','rgba(200,200,200,0.1)']
136
+ splitArea: {
137
+ show: true,
138
+ areaStyle: {
139
+ color: ['rgba(250,250,250,0.1)', 'rgba(200,200,200,0.1)']
122
140
  }
123
141
  },
124
142
  splitLine: {
@@ -128,34 +146,37 @@
128
146
  }
129
147
  },
130
148
 
131
- timeline : {
132
- lineStyle : {
133
- color : '#008acd'
149
+ timeline: {
150
+ lineStyle: {
151
+ color: '#008acd'
134
152
  },
135
- controlStyle : {
136
- normal : { color : '#008acd'},
137
- emphasis : { color : '#008acd'}
153
+ controlStyle: {
154
+ color: '#008acd',
155
+ borderColor: '#008acd'
138
156
  },
139
- symbol : 'emptyCircle',
140
- symbolSize : 3
157
+ symbol: 'emptyCircle',
158
+ symbolSize: 3
141
159
  },
142
160
 
143
161
  line: {
144
- smooth : true,
162
+ smooth: true,
145
163
  symbol: 'emptyCircle',
146
164
  symbolSize: 3
147
165
  },
148
166
 
149
167
  candlestick: {
150
168
  itemStyle: {
151
- normal: {
152
- color: '#d87a80',
153
- color0: '#2ec7c9',
154
- lineStyle: {
155
- color: '#d87a80',
156
- color0: '#2ec7c9'
157
- }
158
- }
169
+ color: '#d87a80',
170
+ color0: '#2ec7c9'
171
+ },
172
+ lineStyle: {
173
+ width: 1,
174
+ color: '#d87a80',
175
+ color0: '#2ec7c9'
176
+ },
177
+ areaStyle: {
178
+ color: '#2ec7c9',
179
+ color0: '#b6a2de'
159
180
  }
160
181
  },
161
182
 
@@ -165,53 +186,55 @@
165
186
  },
166
187
 
167
188
  map: {
168
- label: {
169
- normal: {
170
- textStyle: {
171
- color: '#d87a80'
172
- }
173
- }
174
- },
175
189
  itemStyle: {
176
- normal: {
177
- borderColor: '#eee',
178
- areaColor: '#ddd'
179
- },
180
- emphasis: {
181
- areaColor: '#fe994e'
182
- }
190
+ color: '#ddd'
191
+ },
192
+ areaStyle: {
193
+ color: '#fe994e'
194
+ },
195
+ label: {
196
+ color: '#d87a80'
183
197
  }
184
198
  },
185
199
 
186
200
  graph: {
187
- color: colorPalette
201
+ itemStyle: {
202
+ color: '#d87a80'
203
+ },
204
+ linkStyle: {
205
+ color: '#2ec7c9'
206
+ }
188
207
  },
189
208
 
190
- gauge : {
209
+ gauge: {
191
210
  axisLine: {
192
211
  lineStyle: {
193
- color: [[0.2, '#2ec7c9'],[0.8, '#5ab1ef'],[1, '#d87a80']],
212
+ color: [
213
+ [0.2, '#2ec7c9'],
214
+ [0.8, '#5ab1ef'],
215
+ [1, '#d87a80']
216
+ ],
194
217
  width: 10
195
218
  }
196
219
  },
197
220
  axisTick: {
198
221
  splitNumber: 10,
199
- length :15,
222
+ length: 15,
200
223
  lineStyle: {
201
224
  color: 'auto'
202
225
  }
203
226
  },
204
227
  splitLine: {
205
- length :22,
228
+ length: 22,
206
229
  lineStyle: {
207
230
  color: 'auto'
208
231
  }
209
232
  },
210
- pointer : {
211
- width : 5
233
+ pointer: {
234
+ width: 5
212
235
  }
213
236
  }
214
237
  };
215
238
 
216
239
  echarts.registerTheme('macarons', theme);
217
- }));
240
+ });
@@ -0,0 +1,251 @@
1
+ /*
2
+ * Licensed to the Apache Software Foundation (ASF) under one
3
+ * or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information
5
+ * regarding copyright ownership. The ASF licenses this file
6
+ * to you under the Apache License, Version 2.0 (the
7
+ * "License"); you may not use this file except in compliance
8
+ * with the License. You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing,
13
+ * software distributed under the License is distributed on an
14
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ * KIND, either express or implied. See the License for the
16
+ * specific language governing permissions and limitations
17
+ * under the License.
18
+ */
19
+
20
+ (function(root, factory) {
21
+ if (typeof define === 'function' && define.amd) {
22
+ // AMD. Register as an anonymous module.
23
+ define(['exports', 'echarts'], factory);
24
+ } else if (
25
+ typeof exports === 'object' &&
26
+ typeof exports.nodeName !== 'string'
27
+ ) {
28
+ // CommonJS
29
+ factory(exports, require('echarts'));
30
+ } else {
31
+ // Browser globals
32
+ factory({}, root.echarts);
33
+ }
34
+ })(this, function(exports, echarts) {
35
+ var log = function(msg) {
36
+ if (typeof console !== 'undefined') {
37
+ console && console.error && console.error(msg);
38
+ }
39
+ };
40
+ if (!echarts) {
41
+ log('ECharts is not Loaded');
42
+ return;
43
+ }
44
+
45
+ var colorPalette = [
46
+ '#ed9678',
47
+ '#e7dac9',
48
+ '#cb8e85',
49
+ '#f3f39d',
50
+ '#c8e49c',
51
+ '#f16d7a',
52
+ '#f3d999',
53
+ '#d3758f',
54
+ '#dcc392',
55
+ '#2e4783',
56
+ '#82b6e9',
57
+ '#ff6347',
58
+ '#a092f1',
59
+ '#0a915d',
60
+ '#eaf889',
61
+ '#6699FF',
62
+ '#ff6666',
63
+ '#3cb371',
64
+ '#d5b158',
65
+ '#38b6b6'
66
+ ];
67
+
68
+ var theme = {
69
+ color: colorPalette,
70
+
71
+ title: {
72
+ textStyle: {
73
+ fontWeight: 'normal',
74
+ color: '#cb8e85'
75
+ }
76
+ },
77
+
78
+ dataRange: {
79
+ color: ['#cb8e85', '#e7dac9'], //颜色
80
+ //text:['高','低'], // 文本,默认为数值文本
81
+ textStyle: {
82
+ color: '#333' // 值域文字颜色
83
+ }
84
+ },
85
+
86
+ bar: {
87
+ barMinHeight: 0, // 最小高度改为0
88
+ // barWidth: null, // 默认自适应
89
+ barGap: '30%', // 柱间距离,默认为柱形宽度的30%,可设固定值
90
+ barCategoryGap: '20%', // 类目间柱形距离,默认为类目间距的20%,可设固定值
91
+ itemStyle: {
92
+ normal: {
93
+ // color: '各异',
94
+ barBorderColor: '#fff', // 柱条边线
95
+ barBorderRadius: 0, // 柱条边线圆角,单位px,默认为0
96
+ barBorderWidth: 1, // 柱条边线线宽,单位px,默认为1
97
+ label: {
98
+ show: false
99
+ // position: 默认自适应,水平布局为'top',垂直布局为'right',可选为
100
+ // 'inside'|'left'|'right'|'top'|'bottom'
101
+ // textStyle: null // 默认使用全局文本样式,详见TEXTSTYLE
102
+ }
103
+ },
104
+ emphasis: {
105
+ // color: '各异',
106
+ barBorderColor: 'rgba(0,0,0,0)', // 柱条边线
107
+ barBorderRadius: 0, // 柱条边线圆角,单位px,默认为0
108
+ barBorderWidth: 1, // 柱条边线线宽,单位px,默认为1
109
+ label: {
110
+ show: false
111
+ // position: 默认自适应,水平布局为'top',垂直布局为'right',可选为
112
+ // 'inside'|'left'|'right'|'top'|'bottom'
113
+ // textStyle: null // 默认使用全局文本样式,详见TEXTSTYLE
114
+ }
115
+ }
116
+ }
117
+ },
118
+
119
+ line: {
120
+ itemStyle: {
121
+ normal: {
122
+ // color: 各异,
123
+ label: {
124
+ show: false
125
+ // position: 默认自适应,水平布局为'top',垂直布局为'right',可选为
126
+ // 'inside'|'left'|'right'|'top'|'bottom'
127
+ // textStyle: null // 默认使用全局文本样式,详见TEXTSTYLE
128
+ },
129
+ lineStyle: {
130
+ width: 2,
131
+ type: 'solid',
132
+ shadowColor: 'rgba(0,0,0,0)', //默认透明
133
+ shadowBlur: 5,
134
+ shadowOffsetX: 3,
135
+ shadowOffsetY: 3
136
+ }
137
+ },
138
+ emphasis: {
139
+ // color: 各异,
140
+ label: {
141
+ show: false
142
+ // position: 默认自适应,水平布局为'top',垂直布局为'right',可选为
143
+ // 'inside'|'left'|'right'|'top'|'bottom'
144
+ // textStyle: null // 默认使用全局文本样式,详见TEXTSTYLE
145
+ }
146
+ }
147
+ },
148
+ //smooth : false,
149
+ //symbol: null, // 拐点图形类型
150
+ symbolSize: 2, // 拐点图形大小
151
+ //symbolRotate : null, // 拐点图形旋转控制
152
+ showAllSymbol: false // 标志图形默认只有主轴显示(随主轴标签间隔隐藏策略)
153
+ },
154
+
155
+ candlestick: {
156
+ itemStyle: {
157
+ color: '#fe9778',
158
+ color0: '#e7dac9'
159
+ },
160
+ lineStyle: {
161
+ width: 1,
162
+ color: '#f78766',
163
+ color0: '#f1ccb8'
164
+ },
165
+ areaStyle: {
166
+ color: '#e7dac9',
167
+ color0: '#c8e49c'
168
+ }
169
+ },
170
+
171
+ // 饼图默认参数
172
+ pie: {
173
+ center: ['50%', '50%'], // 默认全局居中
174
+ radius: [0, '75%'],
175
+ clockWise: false, // 默认逆时针
176
+ startAngle: 90,
177
+ minAngle: 0, // 最小角度改为0
178
+ selectedOffset: 10, // 选中是扇区偏移量
179
+ itemStyle: {
180
+ normal: {
181
+ // color: 各异,
182
+ borderColor: '#fff',
183
+ borderWidth: 1,
184
+ label: {
185
+ show: true,
186
+ position: 'outer',
187
+ textStyle: { color: '#1b1b1b' },
188
+ lineStyle: { color: '#1b1b1b' }
189
+ // textStyle: null // 默认使用全局文本样式,详见TEXTSTYLE
190
+ },
191
+ labelLine: {
192
+ show: true,
193
+ length: 20,
194
+ lineStyle: {
195
+ // color: 各异,
196
+ width: 1,
197
+ type: 'solid'
198
+ }
199
+ }
200
+ }
201
+ }
202
+ },
203
+
204
+ map: {
205
+ itemStyle: {
206
+ color: '#ddd',
207
+ borderColor: '#fff',
208
+ borderWidth: 1
209
+ },
210
+ areaStyle: {
211
+ color: '#f3f39d'
212
+ },
213
+ label: {
214
+ show: false,
215
+ color: 'rgba(139,69,19,1)'
216
+ },
217
+ showLegendSymbol: true
218
+ },
219
+
220
+ graph: {
221
+ itemStyle: {
222
+ color: '#d87a80'
223
+ },
224
+ linkStyle: {
225
+ strokeColor: '#a17e6e'
226
+ },
227
+ nodeStyle: {
228
+ brushType: 'both',
229
+ strokeColor: '#a17e6e'
230
+ },
231
+ label: {
232
+ show: false
233
+ }
234
+ },
235
+
236
+ gauge: {
237
+ axisLine: {
238
+ lineStyle: {
239
+ color: [
240
+ [0.2, '#ed9678'],
241
+ [0.8, '#e7dac9'],
242
+ [1, '#cb8e85']
243
+ ],
244
+ width: 8
245
+ }
246
+ }
247
+ }
248
+ };
249
+
250
+ echarts.registerTheme('macarons2', theme);
251
+ });