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,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/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
|
+
'#59535e',
|
47
|
+
'#e7dcef',
|
48
|
+
'#f1baf3',
|
49
|
+
'#5d4970',
|
50
|
+
'#372049',
|
51
|
+
'#c0b2cd',
|
52
|
+
'#ffccff',
|
53
|
+
'#f2f0f5'
|
54
|
+
];
|
55
|
+
|
56
|
+
var theme = {
|
57
|
+
color: colorPalette,
|
58
|
+
|
59
|
+
title: {
|
60
|
+
textStyle: {
|
61
|
+
fontWeight: 'normal',
|
62
|
+
color: '#59535e'
|
63
|
+
}
|
64
|
+
},
|
65
|
+
|
66
|
+
visualMap: {
|
67
|
+
color: ['#59535e', '#e7dcef']
|
68
|
+
},
|
69
|
+
|
70
|
+
toolbox: {
|
71
|
+
color: ['#59535e', '#59535e', '#59535e', '#59535e']
|
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: '#59535e',
|
82
|
+
type: 'dashed'
|
83
|
+
},
|
84
|
+
crossStyle: {
|
85
|
+
color: '#59535e'
|
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: '#59535e' // Handle color
|
99
|
+
},
|
100
|
+
|
101
|
+
timeline: {
|
102
|
+
lineStyle: {
|
103
|
+
color: '#59535e'
|
104
|
+
},
|
105
|
+
controlStyle: {
|
106
|
+
color: '#59535e',
|
107
|
+
borderColor: '#59535e'
|
108
|
+
}
|
109
|
+
},
|
110
|
+
|
111
|
+
candlestick: {
|
112
|
+
itemStyle: {
|
113
|
+
color: '#e7dcef',
|
114
|
+
color0: '#f1baf3'
|
115
|
+
},
|
116
|
+
lineStyle: {
|
117
|
+
width: 1,
|
118
|
+
color: '#372049',
|
119
|
+
color0: '#5d4970'
|
120
|
+
},
|
121
|
+
areaStyle: {
|
122
|
+
color: '#59535e',
|
123
|
+
color0: '#e7dcef'
|
124
|
+
}
|
125
|
+
},
|
126
|
+
|
127
|
+
chord: {
|
128
|
+
padding: 4,
|
129
|
+
itemStyle: {
|
130
|
+
color: '#59535e',
|
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: '#e7dcef'
|
139
|
+
}
|
140
|
+
},
|
141
|
+
|
142
|
+
map: {
|
143
|
+
itemStyle: {
|
144
|
+
color: '#ddd'
|
145
|
+
},
|
146
|
+
areaStyle: {
|
147
|
+
color: '#f1baf3'
|
148
|
+
},
|
149
|
+
label: {
|
150
|
+
color: '#c12e34'
|
151
|
+
}
|
152
|
+
},
|
153
|
+
|
154
|
+
graph: {
|
155
|
+
itemStyle: {
|
156
|
+
color: '#59535e'
|
157
|
+
},
|
158
|
+
linkStyle: {
|
159
|
+
color: '#59535e'
|
160
|
+
}
|
161
|
+
},
|
162
|
+
|
163
|
+
gauge: {
|
164
|
+
axisLine: {
|
165
|
+
lineStyle: {
|
166
|
+
color: [
|
167
|
+
[0.2, '#e7dcef'],
|
168
|
+
[0.8, '#59535e'],
|
169
|
+
[1, '#372049']
|
170
|
+
],
|
171
|
+
width: 8
|
172
|
+
}
|
173
|
+
}
|
174
|
+
}
|
175
|
+
};
|
176
|
+
|
177
|
+
echarts.registerTheme('eduardo', theme);
|
178
|
+
});
|
@@ -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
|
+
'#313b23',
|
47
|
+
'#494f2b',
|
48
|
+
'#606233',
|
49
|
+
'#d6b77b',
|
50
|
+
'#0e0e0e',
|
51
|
+
'#076278',
|
52
|
+
'#808080',
|
53
|
+
'#e7d5b1'
|
54
|
+
];
|
55
|
+
|
56
|
+
var theme = {
|
57
|
+
color: colorPalette,
|
58
|
+
|
59
|
+
title: {
|
60
|
+
textStyle: {
|
61
|
+
fontWeight: 'normal',
|
62
|
+
color: '#313b23'
|
63
|
+
}
|
64
|
+
},
|
65
|
+
|
66
|
+
visualMap: {
|
67
|
+
color: ['#313b23', '#494f2b']
|
68
|
+
},
|
69
|
+
|
70
|
+
toolbox: {
|
71
|
+
color: ['#313b23', '#313b23', '#313b23', '#313b23']
|
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: '#313b23',
|
82
|
+
type: 'dashed'
|
83
|
+
},
|
84
|
+
crossStyle: {
|
85
|
+
color: '#313b23'
|
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: '#313b23' // Handle color
|
99
|
+
},
|
100
|
+
|
101
|
+
timeline: {
|
102
|
+
lineStyle: {
|
103
|
+
color: '#313b23'
|
104
|
+
},
|
105
|
+
controlStyle: {
|
106
|
+
color: '#313b23',
|
107
|
+
borderColor: '#313b23'
|
108
|
+
}
|
109
|
+
},
|
110
|
+
|
111
|
+
candlestick: {
|
112
|
+
itemStyle: {
|
113
|
+
color: '#494f2b',
|
114
|
+
color0: '#606233'
|
115
|
+
},
|
116
|
+
lineStyle: {
|
117
|
+
width: 1,
|
118
|
+
color: '#0e0e0e',
|
119
|
+
color0: '#d6b77b'
|
120
|
+
},
|
121
|
+
areaStyle: {
|
122
|
+
color: '#494f2b',
|
123
|
+
color0: '#d6b77b'
|
124
|
+
}
|
125
|
+
},
|
126
|
+
|
127
|
+
map: {
|
128
|
+
itemStyle: {
|
129
|
+
color: '#606233'
|
130
|
+
},
|
131
|
+
areaStyle: {
|
132
|
+
color: '#ddd'
|
133
|
+
},
|
134
|
+
label: {
|
135
|
+
color: '#c12e34'
|
136
|
+
}
|
137
|
+
},
|
138
|
+
|
139
|
+
graph: {
|
140
|
+
itemStyle: {
|
141
|
+
color: '#494f2b'
|
142
|
+
},
|
143
|
+
linkStyle: {
|
144
|
+
color: '#313b23'
|
145
|
+
}
|
146
|
+
},
|
147
|
+
|
148
|
+
gauge: {
|
149
|
+
axisLine: {
|
150
|
+
lineStyle: {
|
151
|
+
color: [
|
152
|
+
[0.2, '#494f2b'],
|
153
|
+
[0.8, '#313b23'],
|
154
|
+
[1, '0e0e0e']
|
155
|
+
],
|
156
|
+
width: 8
|
157
|
+
}
|
158
|
+
}
|
159
|
+
}
|
160
|
+
};
|
161
|
+
|
162
|
+
echarts.registerTheme('forest', theme);
|
163
|
+
});
|
@@ -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
|
+
'#00a8c6',
|
47
|
+
'#40c0cb',
|
48
|
+
'#f0dec2',
|
49
|
+
'#aee239',
|
50
|
+
'#8fbe00',
|
51
|
+
'#33e0ff',
|
52
|
+
'#b3f4ff',
|
53
|
+
'#e6ff99'
|
54
|
+
];
|
55
|
+
|
56
|
+
var theme = {
|
57
|
+
color: colorPalette,
|
58
|
+
|
59
|
+
title: {
|
60
|
+
textStyle: {
|
61
|
+
fontWeight: 'normal',
|
62
|
+
color: '#00a8c6'
|
63
|
+
}
|
64
|
+
},
|
65
|
+
|
66
|
+
visualMap: {
|
67
|
+
color: ['#00a8c6', '#a2d4e6']
|
68
|
+
},
|
69
|
+
|
70
|
+
toolbox: {
|
71
|
+
color: ['#00a8c6', '#00a8c6', '#00a8c6', '#00a8c6']
|
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: '#00a8c6',
|
82
|
+
type: 'dashed'
|
83
|
+
},
|
84
|
+
crossStyle: {
|
85
|
+
color: '#00a8c6'
|
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: '#00a8c6' // Handle color
|
99
|
+
},
|
100
|
+
|
101
|
+
timeline: {
|
102
|
+
lineStyle: {
|
103
|
+
color: '#00a8c6'
|
104
|
+
},
|
105
|
+
controlStyle: {
|
106
|
+
color: '#00a8c6',
|
107
|
+
borderColor: '#00a8c6'
|
108
|
+
}
|
109
|
+
},
|
110
|
+
|
111
|
+
candlestick: {
|
112
|
+
itemStyle: {
|
113
|
+
color: '#40c0cb',
|
114
|
+
color0: '#f0dec2'
|
115
|
+
},
|
116
|
+
lineStyle: {
|
117
|
+
width: 1,
|
118
|
+
color: '#8fbe00',
|
119
|
+
color0: '#aee239'
|
120
|
+
},
|
121
|
+
areaStyle: {
|
122
|
+
color: '#00a8c6',
|
123
|
+
color0: '#aee239'
|
124
|
+
}
|
125
|
+
},
|
126
|
+
|
127
|
+
map: {
|
128
|
+
itemStyle: {
|
129
|
+
color: '#ddd'
|
130
|
+
},
|
131
|
+
areaStyle: {
|
132
|
+
color: '#f0dec2'
|
133
|
+
},
|
134
|
+
label: {
|
135
|
+
color: '#c12e34'
|
136
|
+
}
|
137
|
+
},
|
138
|
+
|
139
|
+
graph: {
|
140
|
+
itemStyle: {
|
141
|
+
color: '#f0dec2'
|
142
|
+
},
|
143
|
+
linkStyle: {
|
144
|
+
color: '#00a8c6'
|
145
|
+
}
|
146
|
+
},
|
147
|
+
|
148
|
+
gauge: {
|
149
|
+
axisLine: {
|
150
|
+
lineStyle: {
|
151
|
+
color: [
|
152
|
+
[0.2, '#40c0cb'],
|
153
|
+
[0.8, '#00a8c6'],
|
154
|
+
[1, '#8fbe00']
|
155
|
+
],
|
156
|
+
width: 8
|
157
|
+
}
|
158
|
+
}
|
159
|
+
}
|
160
|
+
};
|
161
|
+
|
162
|
+
echarts.registerTheme('fresh-cut', theme);
|
163
|
+
});
|
@@ -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/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
|
+
'#ffcb6a',
|
47
|
+
'#ffa850',
|
48
|
+
'#ffe2c4',
|
49
|
+
'#e5834e',
|
50
|
+
'#ffb081',
|
51
|
+
'#f7826e',
|
52
|
+
'#faac9e',
|
53
|
+
'#fcd5cf'
|
54
|
+
];
|
55
|
+
|
56
|
+
var theme = {
|
57
|
+
color: colorPalette,
|
58
|
+
|
59
|
+
title: {
|
60
|
+
textStyle: {
|
61
|
+
fontWeight: 'normal',
|
62
|
+
color: '#ffcb6a'
|
63
|
+
}
|
64
|
+
},
|
65
|
+
|
66
|
+
visualMap: {
|
67
|
+
color: ['#ffcb6a', '#ffa850']
|
68
|
+
},
|
69
|
+
|
70
|
+
toolbox: {
|
71
|
+
color: ['#ffcb6a', '#ffcb6a', '#ffcb6a', '#ffcb6a']
|
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: '#ffcb6a',
|
82
|
+
type: 'dashed'
|
83
|
+
},
|
84
|
+
crossStyle: {
|
85
|
+
color: '#ffcb6a'
|
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: '#ffcb6a' // Handle color
|
99
|
+
},
|
100
|
+
|
101
|
+
timeline: {
|
102
|
+
lineStyle: {
|
103
|
+
color: '#ffcb6a'
|
104
|
+
},
|
105
|
+
controlStyle: {
|
106
|
+
color: '#ffcb6a',
|
107
|
+
borderColor: '#ffcb6a'
|
108
|
+
}
|
109
|
+
},
|
110
|
+
|
111
|
+
candlestick: {
|
112
|
+
itemStyle: {
|
113
|
+
color: '#ffa850',
|
114
|
+
color0: '#ffe2c4'
|
115
|
+
},
|
116
|
+
lineStyle: {
|
117
|
+
width: 1,
|
118
|
+
color: '#ffb081',
|
119
|
+
color0: '#e5834e'
|
120
|
+
},
|
121
|
+
areaStyle: {
|
122
|
+
color: '#e5834e',
|
123
|
+
color0: '#fcd5cf'
|
124
|
+
}
|
125
|
+
},
|
126
|
+
|
127
|
+
chord: {
|
128
|
+
padding: 4,
|
129
|
+
itemStyle: {
|
130
|
+
color: '#fcd5cf',
|
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: '#e5834e'
|
139
|
+
}
|
140
|
+
},
|
141
|
+
|
142
|
+
map: {
|
143
|
+
itemStyle: {
|
144
|
+
color: '#ffe2c4'
|
145
|
+
},
|
146
|
+
areaStyle: {
|
147
|
+
color: '#ddd'
|
148
|
+
},
|
149
|
+
label: {
|
150
|
+
color: '#c12e34'
|
151
|
+
}
|
152
|
+
},
|
153
|
+
|
154
|
+
graph: {
|
155
|
+
itemStyle: {
|
156
|
+
color: '#f2385a'
|
157
|
+
},
|
158
|
+
linkStyle: {
|
159
|
+
color: '#ffcb6a'
|
160
|
+
}
|
161
|
+
},
|
162
|
+
|
163
|
+
gauge: {
|
164
|
+
axisLine: {
|
165
|
+
lineStyle: {
|
166
|
+
color: [
|
167
|
+
[0.2, '#ffa850'],
|
168
|
+
[0.8, '#ffcb6a'],
|
169
|
+
[1, '#ffb081']
|
170
|
+
],
|
171
|
+
width: 8
|
172
|
+
}
|
173
|
+
}
|
174
|
+
}
|
175
|
+
};
|
176
|
+
|
177
|
+
echarts.registerTheme('fruit', theme);
|
178
|
+
});
|