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,178 @@
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
+ '#001727',
47
+ '#805500',
48
+ '#ffff00',
49
+ '#ffd11a',
50
+ '#f2d71f',
51
+ '#f2be19',
52
+ '#f3a81a',
53
+ '#fff5cc'
54
+ ];
55
+
56
+ var theme = {
57
+ color: colorPalette,
58
+
59
+ title: {
60
+ textStyle: {
61
+ fontWeight: 'normal',
62
+ color: '#001727'
63
+ }
64
+ },
65
+
66
+ visualMap: {
67
+ color: ['#001727', '#805500']
68
+ },
69
+
70
+ toolbox: {
71
+ color: ['#001727', '#001727', '#001727', '#001727']
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: '#001727',
82
+ type: 'dashed'
83
+ },
84
+ crossStyle: {
85
+ color: '#001727'
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(200,200,200,0.2)', // Fill the color
98
+ handleColor: '#001727' // Handle color
99
+ },
100
+
101
+ timeline: {
102
+ lineStyle: {
103
+ color: '#001727'
104
+ },
105
+ controlStyle: {
106
+ color: '#001727',
107
+ borderColor: '#001727'
108
+ }
109
+ },
110
+
111
+ candlestick: {
112
+ itemStyle: {
113
+ color: '#f3a81a',
114
+ color0: '#ffff00'
115
+ },
116
+ lineStyle: {
117
+ width: 1,
118
+ color: '#ffff00',
119
+ color0: '#f3a81a'
120
+ },
121
+ areaStyle: {
122
+ color: '#805500',
123
+ color0: '#ffff00'
124
+ }
125
+ },
126
+
127
+ chord: {
128
+ padding: 4,
129
+ itemStyle: {
130
+ color: '#f3a81a',
131
+ borderWidth: 1,
132
+ borderColor: 'rgba(128, 128, 128, 0.5)'
133
+ },
134
+ lineStyle: {
135
+ color: 'rgba(128, 128, 128, 0.5)'
136
+ },
137
+ areaStyle: {
138
+ color: '#805500'
139
+ }
140
+ },
141
+
142
+ map: {
143
+ itemStyle: {
144
+ color: '#ffd11a'
145
+ },
146
+ areaStyle: {
147
+ color: '#f2be19'
148
+ },
149
+ label: {
150
+ color: '#ffd11a'
151
+ }
152
+ },
153
+
154
+ graph: {
155
+ itemStyle: {
156
+ color: '#001727'
157
+ },
158
+ linkStyle: {
159
+ color: '#001727'
160
+ }
161
+ },
162
+
163
+ gauge: {
164
+ axisLine: {
165
+ lineStyle: {
166
+ color: [
167
+ [0.2, '#f2d71f'],
168
+ [0.8, '#001727'],
169
+ [1, '#ffff00']
170
+ ],
171
+ width: 8
172
+ }
173
+ }
174
+ }
175
+ };
176
+
177
+ echarts.registerTheme('bee-inspired', theme);
178
+ });
package/theme/blue.js ADDED
@@ -0,0 +1,178 @@
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
+ '#1790cf',
47
+ '#1bb2d8',
48
+ '#99d2dd',
49
+ '#88b0bb',
50
+ '#1c7099',
51
+ '#038cc4',
52
+ '#75abd0',
53
+ '#afd6dd'
54
+ ];
55
+
56
+ var theme = {
57
+ color: colorPalette,
58
+
59
+ title: {
60
+ textStyle: {
61
+ fontWeight: 'normal',
62
+ color: '#1790cf'
63
+ }
64
+ },
65
+
66
+ visualMap: {
67
+ color: ['#1790cf', '#a2d4e6']
68
+ },
69
+
70
+ toolbox: {
71
+ color: ['#1790cf', '#1790cf', '#1790cf', '#1790cf']
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: '#1790cf',
82
+ type: 'dashed'
83
+ },
84
+ crossStyle: {
85
+ color: '#1790cf'
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: '#1790cf' // Handle color
99
+ },
100
+
101
+ timeline: {
102
+ lineStyle: {
103
+ color: '#1790cfa'
104
+ },
105
+ controlStyle: {
106
+ color: '#1790cf',
107
+ borderColor: '#1790cf'
108
+ }
109
+ },
110
+
111
+ candlestick: {
112
+ itemStyle: {
113
+ color: '#1bb2d8',
114
+ color0: '#99d2dd'
115
+ },
116
+ lineStyle: {
117
+ width: 1,
118
+ color: '#1c7099',
119
+ color0: '#88b0bb'
120
+ },
121
+ areaStyle: {
122
+ color: '#1790cf',
123
+ color0: '#1bb2d8'
124
+ }
125
+ },
126
+
127
+ chord: {
128
+ padding: 4,
129
+ itemStyle: {
130
+ color: '#1bb2d8',
131
+ borderWidth: 1,
132
+ borderColor: 'rgba(128, 128, 128, 0.5)'
133
+ },
134
+ lineStyle: {
135
+ color: 'rgba(128, 128, 128, 0.5)'
136
+ },
137
+ areaStyle: {
138
+ color: '#1790cf'
139
+ }
140
+ },
141
+
142
+ graph: {
143
+ itemStyle: {
144
+ color: '#1bb2d8'
145
+ },
146
+ linkStyle: {
147
+ color: '#88b0bb'
148
+ }
149
+ },
150
+
151
+ map: {
152
+ itemStyle: {
153
+ color: '#ddd'
154
+ },
155
+ areaStyle: {
156
+ color: '99d2dd'
157
+ },
158
+ label: {
159
+ color: '#c12e34'
160
+ }
161
+ },
162
+
163
+ gauge: {
164
+ axisLine: {
165
+ lineStyle: {
166
+ color: [
167
+ [0.2, '#1bb2d8'],
168
+ [0.8, '#1790cf'],
169
+ [1, '#1c7099']
170
+ ],
171
+ width: 8
172
+ }
173
+ }
174
+ }
175
+ };
176
+
177
+ echarts.registerTheme('blue', theme);
178
+ });
@@ -0,0 +1,178 @@
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
+ '#fad089',
47
+ '#ff9c5b',
48
+ '#f5634a',
49
+ '#ed303c',
50
+ '#3b8183',
51
+ '#f7826e',
52
+ '#faac9e',
53
+ '#fcd5cf'
54
+ ];
55
+
56
+ var theme = {
57
+ color: colorPalette,
58
+
59
+ title: {
60
+ textStyle: {
61
+ fontWeight: 'normal',
62
+ color: '#fad089'
63
+ }
64
+ },
65
+
66
+ visualMap: {
67
+ color: ['#fad089', '#a2d4e6']
68
+ },
69
+
70
+ toolbox: {
71
+ color: ['#fad089', '#fad089', '#fad089', '#fad089']
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: '#fad089',
82
+ type: 'dashed'
83
+ },
84
+ crossStyle: {
85
+ color: '#fad089'
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: '#fad089' // Handle color
99
+ },
100
+
101
+ timeline: {
102
+ lineStyle: {
103
+ color: '#fad089'
104
+ },
105
+ controlStyle: {
106
+ color: '#fad089',
107
+ borderColor: '#fad089'
108
+ }
109
+ },
110
+
111
+ candlestick: {
112
+ itemStyle: {
113
+ color: '#ff9c5b',
114
+ color0: '#f5634a'
115
+ },
116
+ lineStyle: {
117
+ width: 1,
118
+ color: '#3b8183',
119
+ color0: '#ed303c'
120
+ },
121
+ areaStyle: {
122
+ color: '#fad089',
123
+ color0: '#ed303c'
124
+ }
125
+ },
126
+
127
+ chord: {
128
+ padding: 4,
129
+ itemStyle: {
130
+ color: '#fad089',
131
+ borderWidth: 1,
132
+ borderColor: 'rgba(128, 128, 128, 0.5)'
133
+ },
134
+ lineStyle: {
135
+ color: 'rgba(128, 128, 128, 0.5)'
136
+ },
137
+ areaStyle: {
138
+ color: '#ed303c'
139
+ }
140
+ },
141
+
142
+ map: {
143
+ itemStyle: {
144
+ color: '#ddd'
145
+ },
146
+ areaStyle: {
147
+ color: '#f5634a'
148
+ },
149
+ label: {
150
+ color: '#c12e34'
151
+ }
152
+ },
153
+
154
+ graph: {
155
+ itemStyle: {
156
+ color: '#f5634a'
157
+ },
158
+ linkStyle: {
159
+ color: '#fad089'
160
+ }
161
+ },
162
+
163
+ gauge: {
164
+ axisLine: {
165
+ lineStyle: {
166
+ color: [
167
+ [0.2, '#ff9c5b'],
168
+ [0.8, '#fad089'],
169
+ [1, '#3b8183']
170
+ ],
171
+ width: 8
172
+ }
173
+ }
174
+ }
175
+ };
176
+
177
+ echarts.registerTheme('caravan', theme);
178
+ });
package/theme/carp.js ADDED
@@ -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
+ '#f0d8A8',
47
+ '#3d1c00',
48
+ '#86b8b1',
49
+ '#f2d694',
50
+ '#fa2a00',
51
+ '#ff8066',
52
+ '#ffd5cc',
53
+ '#f9edd2'
54
+ ];
55
+
56
+ var theme = {
57
+ color: colorPalette,
58
+
59
+ title: {
60
+ textStyle: {
61
+ fontWeight: 'normal',
62
+ color: '#f0d8A8'
63
+ }
64
+ },
65
+
66
+ visualMap: {
67
+ color: ['#f0d8A8', '#3d1c00']
68
+ },
69
+
70
+ toolbox: {
71
+ color: ['#f0d8A8', '#f0d8A8', '#f0d8A8', '#f0d8A8']
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: '#f0d8A8',
82
+ type: 'dashed'
83
+ },
84
+ crossStyle: {
85
+ color: '#f0d8A8'
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(200,200,200,0.2)', // Fill the color
98
+ handleColor: '#f0d8A8' // Handle color
99
+ },
100
+
101
+ timeline: {
102
+ lineStyle: {
103
+ color: '#f0dba8'
104
+ },
105
+ controlStyle: {
106
+ color: '#f0dba8',
107
+ borderColor: '#f0dba8'
108
+ }
109
+ },
110
+
111
+ candlestick: {
112
+ itemStyle: {
113
+ color: '#3d1c00',
114
+ color0: '#86b8b1'
115
+ },
116
+ lineStyle: {
117
+ width: 1,
118
+ color: '#fa2a00',
119
+ color0: '#f2d694'
120
+ },
121
+ areaStyle: {
122
+ color: '#f0d8A8',
123
+ color0: '#86b8b1'
124
+ }
125
+ },
126
+
127
+ map: {
128
+ itemStyle: {
129
+ color: '#ddd'
130
+ },
131
+ areaStyle: {
132
+ color: '#86b8b1'
133
+ },
134
+ label: {
135
+ color: '#c12e34'
136
+ }
137
+ },
138
+
139
+ graph: {
140
+ itemStyle: {
141
+ color: '#3d1c00'
142
+ },
143
+ linkStyle: {
144
+ color: '#f0d8A8'
145
+ }
146
+ },
147
+
148
+ gauge: {
149
+ axisLine: {
150
+ lineStyle: {
151
+ color: [
152
+ [0.2, '#3d1c00'],
153
+ [0.8, '#f0d8A8'],
154
+ [1, '#fa2a00']
155
+ ],
156
+ width: 8
157
+ }
158
+ }
159
+ }
160
+ };
161
+
162
+ echarts.registerTheme('carp', theme);
163
+ });