rails_charts 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +487 -0
- data/Rakefile +3 -0
- data/lib/rails_charts/area_chart.rb +31 -0
- data/lib/rails_charts/bar_chart.rb +25 -0
- data/lib/rails_charts/base_chart.rb +123 -0
- data/lib/rails_charts/calendar_chart.rb +36 -0
- data/lib/rails_charts/candlestick_chart.rb +25 -0
- data/lib/rails_charts/custom_chart.rb +14 -0
- data/lib/rails_charts/donut_chart.rb +36 -0
- data/lib/rails_charts/engine.rb +33 -0
- data/lib/rails_charts/funnel_chart.rb +30 -0
- data/lib/rails_charts/gauge_chart.rb +30 -0
- data/lib/rails_charts/helpers.rb +83 -0
- data/lib/rails_charts/javascript.rb +17 -0
- data/lib/rails_charts/line_chart.rb +78 -0
- data/lib/rails_charts/parallel_chart.rb +30 -0
- data/lib/rails_charts/pie_chart.rb +55 -0
- data/lib/rails_charts/radar_chart.rb +38 -0
- data/lib/rails_charts/ruby_ext.rb +28 -0
- data/lib/rails_charts/sankey_chart.rb +31 -0
- data/lib/rails_charts/scatter_chart.rb +34 -0
- data/lib/rails_charts/stacked_bar_chart.rb +13 -0
- data/lib/rails_charts/version.rb +3 -0
- data/lib/rails_charts.rb +43 -0
- data/vendor/assets/rails_charts/echarts.min.js +45 -0
- data/vendor/assets/rails_charts/extension/bmap.js +413 -0
- data/vendor/assets/rails_charts/extension/bmap.js.map +1 -0
- data/vendor/assets/rails_charts/extension/bmap.min.js +22 -0
- data/vendor/assets/rails_charts/extension/dataTool.js +436 -0
- data/vendor/assets/rails_charts/extension/dataTool.js.map +1 -0
- data/vendor/assets/rails_charts/extension/dataTool.min.js +22 -0
- data/vendor/assets/rails_charts/i18n/langCS-obj.js +172 -0
- data/vendor/assets/rails_charts/i18n/langCS.js +168 -0
- data/vendor/assets/rails_charts/i18n/langDE-obj.js +172 -0
- data/vendor/assets/rails_charts/i18n/langDE.js +168 -0
- data/vendor/assets/rails_charts/i18n/langEN-obj.js +173 -0
- data/vendor/assets/rails_charts/i18n/langEN.js +169 -0
- data/vendor/assets/rails_charts/i18n/langES-obj.js +111 -0
- data/vendor/assets/rails_charts/i18n/langES.js +107 -0
- data/vendor/assets/rails_charts/i18n/langFI-obj.js +111 -0
- data/vendor/assets/rails_charts/i18n/langFI.js +107 -0
- data/vendor/assets/rails_charts/i18n/langFR-obj.js +173 -0
- data/vendor/assets/rails_charts/i18n/langFR.js +169 -0
- data/vendor/assets/rails_charts/i18n/langIT-obj.js +173 -0
- data/vendor/assets/rails_charts/i18n/langIT.js +169 -0
- data/vendor/assets/rails_charts/i18n/langJA-obj.js +173 -0
- data/vendor/assets/rails_charts/i18n/langJA.js +169 -0
- data/vendor/assets/rails_charts/i18n/langKO-obj.js +173 -0
- data/vendor/assets/rails_charts/i18n/langKO.js +169 -0
- data/vendor/assets/rails_charts/i18n/langPL-obj.js +173 -0
- data/vendor/assets/rails_charts/i18n/langPL.js +169 -0
- data/vendor/assets/rails_charts/i18n/langPT-br-obj.js +174 -0
- data/vendor/assets/rails_charts/i18n/langPT-br.js +170 -0
- data/vendor/assets/rails_charts/i18n/langRO-obj.js +173 -0
- data/vendor/assets/rails_charts/i18n/langRO.js +169 -0
- data/vendor/assets/rails_charts/i18n/langRU-obj.js +174 -0
- data/vendor/assets/rails_charts/i18n/langRU.js +170 -0
- data/vendor/assets/rails_charts/i18n/langSI-obj.js +172 -0
- data/vendor/assets/rails_charts/i18n/langSI.js +168 -0
- data/vendor/assets/rails_charts/i18n/langTH-obj.js +111 -0
- data/vendor/assets/rails_charts/i18n/langTH.js +107 -0
- data/vendor/assets/rails_charts/i18n/langZH-obj.js +168 -0
- data/vendor/assets/rails_charts/i18n/langZH.js +164 -0
- data/vendor/assets/rails_charts/theme/azul.js +163 -0
- data/vendor/assets/rails_charts/theme/bee-inspired.js +178 -0
- data/vendor/assets/rails_charts/theme/blue.js +178 -0
- data/vendor/assets/rails_charts/theme/caravan.js +178 -0
- data/vendor/assets/rails_charts/theme/carp.js +163 -0
- data/vendor/assets/rails_charts/theme/cool.js +180 -0
- data/vendor/assets/rails_charts/theme/dark-blue.js +164 -0
- data/vendor/assets/rails_charts/theme/dark-bold.js +164 -0
- data/vendor/assets/rails_charts/theme/dark-digerati.js +164 -0
- data/vendor/assets/rails_charts/theme/dark-fresh-cut.js +164 -0
- data/vendor/assets/rails_charts/theme/dark-mushroom.js +164 -0
- data/vendor/assets/rails_charts/theme/dark.js +224 -0
- data/vendor/assets/rails_charts/theme/eduardo.js +178 -0
- data/vendor/assets/rails_charts/theme/forest.js +163 -0
- data/vendor/assets/rails_charts/theme/fresh-cut.js +163 -0
- data/vendor/assets/rails_charts/theme/fruit.js +178 -0
- data/vendor/assets/rails_charts/theme/gray.js +220 -0
- data/vendor/assets/rails_charts/theme/green.js +222 -0
- data/vendor/assets/rails_charts/theme/helianthus.js +263 -0
- data/vendor/assets/rails_charts/theme/infographic.js +236 -0
- data/vendor/assets/rails_charts/theme/inspired.js +163 -0
- data/vendor/assets/rails_charts/theme/jazz.js +163 -0
- data/vendor/assets/rails_charts/theme/london.js +163 -0
- data/vendor/assets/rails_charts/theme/macarons.js +240 -0
- data/vendor/assets/rails_charts/theme/macarons2.js +249 -0
- data/vendor/assets/rails_charts/theme/mint.js +155 -0
- data/vendor/assets/rails_charts/theme/red-velvet.js +163 -0
- data/vendor/assets/rails_charts/theme/red.js +225 -0
- data/vendor/assets/rails_charts/theme/roma.js +119 -0
- data/vendor/assets/rails_charts/theme/royal.js +163 -0
- data/vendor/assets/rails_charts/theme/sakura.js +140 -0
- data/vendor/assets/rails_charts/theme/shine.js +177 -0
- data/vendor/assets/rails_charts/theme/tech-blue.js +180 -0
- data/vendor/assets/rails_charts/theme/vintage.js +63 -0
- metadata +268 -0
@@ -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/lib/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
|
+
});
|
@@ -0,0 +1,240 @@
|
|
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/lib/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
|
+
'#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'
|
66
|
+
];
|
67
|
+
|
68
|
+
var theme = {
|
69
|
+
color: colorPalette,
|
70
|
+
|
71
|
+
title: {
|
72
|
+
textStyle: {
|
73
|
+
fontWeight: 'normal',
|
74
|
+
color: '#008acd'
|
75
|
+
}
|
76
|
+
},
|
77
|
+
|
78
|
+
visualMap: {
|
79
|
+
itemWidth: 15,
|
80
|
+
color: ['#5ab1ef', '#e0ffff']
|
81
|
+
},
|
82
|
+
|
83
|
+
toolbox: {
|
84
|
+
iconStyle: {
|
85
|
+
normal: {
|
86
|
+
borderColor: colorPalette[0]
|
87
|
+
}
|
88
|
+
}
|
89
|
+
},
|
90
|
+
|
91
|
+
tooltip: {
|
92
|
+
backgroundColor: 'rgba(50,50,50,0.5)',
|
93
|
+
axisPointer: {
|
94
|
+
type: 'line',
|
95
|
+
lineStyle: {
|
96
|
+
color: '#008acd'
|
97
|
+
},
|
98
|
+
crossStyle: {
|
99
|
+
color: '#008acd'
|
100
|
+
},
|
101
|
+
shadowStyle: {
|
102
|
+
color: 'rgba(200,200,200,0.2)'
|
103
|
+
}
|
104
|
+
}
|
105
|
+
},
|
106
|
+
|
107
|
+
dataZoom: {
|
108
|
+
dataBackgroundColor: '#efefff',
|
109
|
+
fillerColor: 'rgba(182,162,222,0.2)',
|
110
|
+
handleColor: '#008acd'
|
111
|
+
},
|
112
|
+
|
113
|
+
grid: {
|
114
|
+
borderColor: '#eee'
|
115
|
+
},
|
116
|
+
|
117
|
+
categoryAxis: {
|
118
|
+
axisLine: {
|
119
|
+
lineStyle: {
|
120
|
+
color: '#008acd'
|
121
|
+
}
|
122
|
+
},
|
123
|
+
splitLine: {
|
124
|
+
lineStyle: {
|
125
|
+
color: ['#eee']
|
126
|
+
}
|
127
|
+
}
|
128
|
+
},
|
129
|
+
|
130
|
+
valueAxis: {
|
131
|
+
axisLine: {
|
132
|
+
lineStyle: {
|
133
|
+
color: '#008acd'
|
134
|
+
}
|
135
|
+
},
|
136
|
+
splitArea: {
|
137
|
+
show: true,
|
138
|
+
areaStyle: {
|
139
|
+
color: ['rgba(250,250,250,0.1)', 'rgba(200,200,200,0.1)']
|
140
|
+
}
|
141
|
+
},
|
142
|
+
splitLine: {
|
143
|
+
lineStyle: {
|
144
|
+
color: ['#eee']
|
145
|
+
}
|
146
|
+
}
|
147
|
+
},
|
148
|
+
|
149
|
+
timeline: {
|
150
|
+
lineStyle: {
|
151
|
+
color: '#008acd'
|
152
|
+
},
|
153
|
+
controlStyle: {
|
154
|
+
color: '#008acd',
|
155
|
+
borderColor: '#008acd'
|
156
|
+
},
|
157
|
+
symbol: 'emptyCircle',
|
158
|
+
symbolSize: 3
|
159
|
+
},
|
160
|
+
|
161
|
+
line: {
|
162
|
+
smooth: true,
|
163
|
+
symbol: 'emptyCircle',
|
164
|
+
symbolSize: 3
|
165
|
+
},
|
166
|
+
|
167
|
+
candlestick: {
|
168
|
+
itemStyle: {
|
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'
|
180
|
+
}
|
181
|
+
},
|
182
|
+
|
183
|
+
scatter: {
|
184
|
+
symbol: 'circle',
|
185
|
+
symbolSize: 4
|
186
|
+
},
|
187
|
+
|
188
|
+
map: {
|
189
|
+
itemStyle: {
|
190
|
+
color: '#ddd'
|
191
|
+
},
|
192
|
+
areaStyle: {
|
193
|
+
color: '#fe994e'
|
194
|
+
},
|
195
|
+
label: {
|
196
|
+
color: '#d87a80'
|
197
|
+
}
|
198
|
+
},
|
199
|
+
|
200
|
+
graph: {
|
201
|
+
itemStyle: {
|
202
|
+
color: '#d87a80'
|
203
|
+
},
|
204
|
+
linkStyle: {
|
205
|
+
color: '#2ec7c9'
|
206
|
+
}
|
207
|
+
},
|
208
|
+
|
209
|
+
gauge: {
|
210
|
+
axisLine: {
|
211
|
+
lineStyle: {
|
212
|
+
color: [
|
213
|
+
[0.2, '#2ec7c9'],
|
214
|
+
[0.8, '#5ab1ef'],
|
215
|
+
[1, '#d87a80']
|
216
|
+
],
|
217
|
+
width: 10
|
218
|
+
}
|
219
|
+
},
|
220
|
+
axisTick: {
|
221
|
+
splitNumber: 10,
|
222
|
+
length: 15,
|
223
|
+
lineStyle: {
|
224
|
+
color: 'auto'
|
225
|
+
}
|
226
|
+
},
|
227
|
+
splitLine: {
|
228
|
+
length: 22,
|
229
|
+
lineStyle: {
|
230
|
+
color: 'auto'
|
231
|
+
}
|
232
|
+
},
|
233
|
+
pointer: {
|
234
|
+
width: 5
|
235
|
+
}
|
236
|
+
}
|
237
|
+
};
|
238
|
+
|
239
|
+
echarts.registerTheme('macarons', theme);
|
240
|
+
});
|
@@ -0,0 +1,249 @@
|
|
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/lib/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
|
+
// color: 各异,
|
181
|
+
borderColor: '#fff',
|
182
|
+
borderWidth: 1,
|
183
|
+
label: {
|
184
|
+
show: true,
|
185
|
+
position: 'outer',
|
186
|
+
color: '#1b1b1b',
|
187
|
+
lineStyle: { color: '#1b1b1b' }
|
188
|
+
// textStyle: null // 默认使用全局文本样式,详见TEXTSTYLE
|
189
|
+
},
|
190
|
+
labelLine: {
|
191
|
+
show: true,
|
192
|
+
length: 20,
|
193
|
+
lineStyle: {
|
194
|
+
// color: 各异,
|
195
|
+
width: 1,
|
196
|
+
type: 'solid'
|
197
|
+
}
|
198
|
+
}
|
199
|
+
}
|
200
|
+
},
|
201
|
+
|
202
|
+
map: {
|
203
|
+
itemStyle: {
|
204
|
+
color: '#ddd',
|
205
|
+
borderColor: '#fff',
|
206
|
+
borderWidth: 1
|
207
|
+
},
|
208
|
+
areaStyle: {
|
209
|
+
color: '#f3f39d'
|
210
|
+
},
|
211
|
+
label: {
|
212
|
+
show: false,
|
213
|
+
color: 'rgba(139,69,19,1)'
|
214
|
+
},
|
215
|
+
showLegendSymbol: true
|
216
|
+
},
|
217
|
+
|
218
|
+
graph: {
|
219
|
+
itemStyle: {
|
220
|
+
color: '#d87a80'
|
221
|
+
},
|
222
|
+
linkStyle: {
|
223
|
+
strokeColor: '#a17e6e'
|
224
|
+
},
|
225
|
+
nodeStyle: {
|
226
|
+
brushType: 'both',
|
227
|
+
strokeColor: '#a17e6e'
|
228
|
+
},
|
229
|
+
label: {
|
230
|
+
show: false
|
231
|
+
}
|
232
|
+
},
|
233
|
+
|
234
|
+
gauge: {
|
235
|
+
axisLine: {
|
236
|
+
lineStyle: {
|
237
|
+
color: [
|
238
|
+
[0.2, '#ed9678'],
|
239
|
+
[0.8, '#e7dac9'],
|
240
|
+
[1, '#cb8e85']
|
241
|
+
],
|
242
|
+
width: 8
|
243
|
+
}
|
244
|
+
}
|
245
|
+
}
|
246
|
+
};
|
247
|
+
|
248
|
+
echarts.registerTheme('macarons2', theme);
|
249
|
+
});
|