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,155 @@
|
|
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
|
+
'#8aedd5',
|
47
|
+
'#93bc9e',
|
48
|
+
'#cef1db',
|
49
|
+
'#7fe579',
|
50
|
+
'#a6d7c2',
|
51
|
+
'#bef0bb',
|
52
|
+
'#99e2vb',
|
53
|
+
'#94f8a8',
|
54
|
+
'#7de5b8',
|
55
|
+
'#4dfb70'
|
56
|
+
];
|
57
|
+
|
58
|
+
var theme = {
|
59
|
+
color: colorPalette,
|
60
|
+
|
61
|
+
title: {
|
62
|
+
textStyle: {
|
63
|
+
fontWeight: 'normal',
|
64
|
+
color: '#8aedd5'
|
65
|
+
}
|
66
|
+
},
|
67
|
+
|
68
|
+
toolbox: {
|
69
|
+
color: ['#8aedd5', '#8aedd5', '#8aedd5', '#8aedd5']
|
70
|
+
},
|
71
|
+
|
72
|
+
tooltip: {
|
73
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
74
|
+
axisPointer: {
|
75
|
+
// Axis indicator, coordinate trigger effective
|
76
|
+
type: 'line', // The default is a straight line: 'line' | 'shadow'
|
77
|
+
lineStyle: {
|
78
|
+
// Straight line indicator style settings
|
79
|
+
color: '#8aedd5',
|
80
|
+
type: 'dashed'
|
81
|
+
},
|
82
|
+
crossStyle: {
|
83
|
+
color: '#8aedd5'
|
84
|
+
},
|
85
|
+
shadowStyle: {
|
86
|
+
// Shadow indicator style settings
|
87
|
+
color: 'rgba(200,200,200,0.3)'
|
88
|
+
}
|
89
|
+
}
|
90
|
+
},
|
91
|
+
|
92
|
+
// Area scaling controller
|
93
|
+
dataZoom: {
|
94
|
+
dataBackgroundColor: '#eee', // Data background color
|
95
|
+
fillerColor: 'rgba(64,136,41,0.2)', // Fill the color
|
96
|
+
handleColor: '#408829' // Handle color
|
97
|
+
},
|
98
|
+
|
99
|
+
dataRange: {
|
100
|
+
color: ['#93bc92', '#bef0bb']
|
101
|
+
},
|
102
|
+
|
103
|
+
candlestick: {
|
104
|
+
itemStyle: {
|
105
|
+
color: '#8aedd5',
|
106
|
+
color0: '#7fe579'
|
107
|
+
},
|
108
|
+
lineStyle: {
|
109
|
+
width: 1,
|
110
|
+
color: '#8aedd5',
|
111
|
+
color0: '#7fe579'
|
112
|
+
},
|
113
|
+
areaStyle: {
|
114
|
+
color: '#8aedd5',
|
115
|
+
color0: '#93bc9e'
|
116
|
+
}
|
117
|
+
},
|
118
|
+
|
119
|
+
graph: {
|
120
|
+
itemStyle: {
|
121
|
+
color: '#8aedd5'
|
122
|
+
},
|
123
|
+
linkStyle: {
|
124
|
+
color: '#93bc9e'
|
125
|
+
}
|
126
|
+
},
|
127
|
+
|
128
|
+
map: {
|
129
|
+
itemStyle: {
|
130
|
+
color: '#8aedd5'
|
131
|
+
},
|
132
|
+
areaStyle: {
|
133
|
+
color: '#93bc9e'
|
134
|
+
},
|
135
|
+
label: {
|
136
|
+
color: '#cef1db'
|
137
|
+
}
|
138
|
+
},
|
139
|
+
|
140
|
+
gauge: {
|
141
|
+
axisLine: {
|
142
|
+
lineStyle: {
|
143
|
+
color: [
|
144
|
+
[0.2, '#93bc9e'],
|
145
|
+
[0.8, '#8aedd5'],
|
146
|
+
[1, '#a6d7c2']
|
147
|
+
],
|
148
|
+
width: 8
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
};
|
153
|
+
|
154
|
+
echarts.registerTheme('mint', theme);
|
155
|
+
});
|
@@ -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
|
+
'#8b1a2d',
|
47
|
+
'#a7314b',
|
48
|
+
'#e6004c',
|
49
|
+
'#ff8066',
|
50
|
+
'#8e5c4e',
|
51
|
+
'#ff1a66',
|
52
|
+
'#d6c582',
|
53
|
+
'#f0d4af'
|
54
|
+
];
|
55
|
+
|
56
|
+
var theme = {
|
57
|
+
color: colorPalette,
|
58
|
+
|
59
|
+
title: {
|
60
|
+
textStyle: {
|
61
|
+
fontWeight: 'normal',
|
62
|
+
color: '#8b1a2d'
|
63
|
+
}
|
64
|
+
},
|
65
|
+
|
66
|
+
visualMap: {
|
67
|
+
color: ['#8b1a2d', '#a7314b']
|
68
|
+
},
|
69
|
+
|
70
|
+
toolbox: {
|
71
|
+
color: ['#8b1a2d', '#8b1a2d', '#8b1a2d', '#8b1a2d']
|
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: '#8b1a2d',
|
82
|
+
type: 'dashed'
|
83
|
+
},
|
84
|
+
crossStyle: {
|
85
|
+
color: '#8b1a2d'
|
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: '#8b1a2d' // Handle color
|
99
|
+
},
|
100
|
+
|
101
|
+
timeline: {
|
102
|
+
lineStyle: {
|
103
|
+
color: '#8b1a2d'
|
104
|
+
},
|
105
|
+
controlStyle: {
|
106
|
+
color: '#8b1a2d',
|
107
|
+
borderColor: '#8b1a2d'
|
108
|
+
}
|
109
|
+
},
|
110
|
+
|
111
|
+
candlestick: {
|
112
|
+
itemStyle: {
|
113
|
+
color: '#a7314b',
|
114
|
+
color0: '#d6c582'
|
115
|
+
},
|
116
|
+
lineStyle: {
|
117
|
+
width: 1,
|
118
|
+
color: '#8e5c4e',
|
119
|
+
color0: '#f0d4af'
|
120
|
+
},
|
121
|
+
areaStyle: {
|
122
|
+
color: '#8b1a2d',
|
123
|
+
color0: '#ff8066'
|
124
|
+
}
|
125
|
+
},
|
126
|
+
|
127
|
+
map: {
|
128
|
+
itemStyle: {
|
129
|
+
color: '#8b1a2d'
|
130
|
+
},
|
131
|
+
areaStyle: {
|
132
|
+
color: '#ff8066'
|
133
|
+
},
|
134
|
+
label: {
|
135
|
+
color: '#c12e34'
|
136
|
+
}
|
137
|
+
},
|
138
|
+
|
139
|
+
graph: {
|
140
|
+
itemStyle: {
|
141
|
+
color: '#ff8066'
|
142
|
+
},
|
143
|
+
linkStyle: {
|
144
|
+
color: '#8b1a2d'
|
145
|
+
}
|
146
|
+
},
|
147
|
+
|
148
|
+
gauge: {
|
149
|
+
axisLine: {
|
150
|
+
lineStyle: {
|
151
|
+
color: [
|
152
|
+
[0.2, '#a7314b'],
|
153
|
+
[0.8, '#8b1a2d'],
|
154
|
+
[1, '#8e5c4e']
|
155
|
+
],
|
156
|
+
width: 8
|
157
|
+
}
|
158
|
+
}
|
159
|
+
}
|
160
|
+
};
|
161
|
+
|
162
|
+
echarts.registerTheme('red-velvet', theme);
|
163
|
+
});
|
@@ -0,0 +1,225 @@
|
|
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
|
+
'#d8361b',
|
47
|
+
'#f16b4c',
|
48
|
+
'#f7b4a9',
|
49
|
+
'#d26666',
|
50
|
+
'#99311c',
|
51
|
+
'#c42703',
|
52
|
+
'#d07e75'
|
53
|
+
];
|
54
|
+
|
55
|
+
var theme = {
|
56
|
+
color: colorPalette,
|
57
|
+
|
58
|
+
title: {
|
59
|
+
textStyle: {
|
60
|
+
fontWeight: 'normal',
|
61
|
+
color: '#d8361b'
|
62
|
+
}
|
63
|
+
},
|
64
|
+
|
65
|
+
visualMap: {
|
66
|
+
color: ['#d8361b', '#ffd2d2']
|
67
|
+
},
|
68
|
+
|
69
|
+
dataRange: {
|
70
|
+
color: ['#bd0707', '#ffd2d2']
|
71
|
+
},
|
72
|
+
|
73
|
+
toolbox: {
|
74
|
+
color: ['#d8361b', '#d8361b', '#d8361b', '#d8361b']
|
75
|
+
},
|
76
|
+
|
77
|
+
tooltip: {
|
78
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
79
|
+
axisPointer: {
|
80
|
+
// Axis indicator, coordinate trigger effective
|
81
|
+
type: 'line', // The default is a straight line: 'line' | 'shadow'
|
82
|
+
lineStyle: {
|
83
|
+
// Straight line indicator style settings
|
84
|
+
color: '#d8361b',
|
85
|
+
type: 'dashed'
|
86
|
+
},
|
87
|
+
crossStyle: {
|
88
|
+
color: '#d8361b'
|
89
|
+
},
|
90
|
+
shadowStyle: {
|
91
|
+
// Shadow indicator style settings
|
92
|
+
color: 'rgba(200,200,200,0.3)'
|
93
|
+
}
|
94
|
+
}
|
95
|
+
},
|
96
|
+
|
97
|
+
// Area scaling controller
|
98
|
+
dataZoom: {
|
99
|
+
dataBackgroundColor: '#eee', // Data background color
|
100
|
+
fillerColor: 'rgba(216,54,27,0.2)', // Fill the color
|
101
|
+
handleColor: '#d8361b' // Handle color
|
102
|
+
},
|
103
|
+
|
104
|
+
grid: {
|
105
|
+
borderWidth: 0
|
106
|
+
},
|
107
|
+
|
108
|
+
categoryAxis: {
|
109
|
+
axisLine: {
|
110
|
+
// Coordinate axis
|
111
|
+
lineStyle: {
|
112
|
+
// Property 'lineStyle' controls line styles
|
113
|
+
color: '#d8361b'
|
114
|
+
}
|
115
|
+
},
|
116
|
+
splitLine: {
|
117
|
+
// Separation line
|
118
|
+
lineStyle: {
|
119
|
+
// Property 'lineStyle' (see lineStyle) controls line styles
|
120
|
+
color: ['#eee']
|
121
|
+
}
|
122
|
+
}
|
123
|
+
},
|
124
|
+
|
125
|
+
valueAxis: {
|
126
|
+
axisLine: {
|
127
|
+
// Coordinate axis
|
128
|
+
lineStyle: {
|
129
|
+
// Property 'lineStyle' controls line styles
|
130
|
+
color: '#d8361b'
|
131
|
+
}
|
132
|
+
},
|
133
|
+
splitArea: {
|
134
|
+
show: true,
|
135
|
+
areaStyle: {
|
136
|
+
color: ['rgba(250,250,250,0.1)', 'rgba(200,200,200,0.1)']
|
137
|
+
}
|
138
|
+
},
|
139
|
+
splitLine: {
|
140
|
+
// Separation line
|
141
|
+
lineStyle: {
|
142
|
+
// Property 'lineStyle' (see lineStyle) controls line styles
|
143
|
+
color: ['#eee']
|
144
|
+
}
|
145
|
+
}
|
146
|
+
},
|
147
|
+
|
148
|
+
timeline: {
|
149
|
+
lineStyle: {
|
150
|
+
color: '#d8361b'
|
151
|
+
},
|
152
|
+
controlStyle: {
|
153
|
+
color: '#d8361b',
|
154
|
+
borderColor: '#d8361b'
|
155
|
+
}
|
156
|
+
},
|
157
|
+
|
158
|
+
candlestick: {
|
159
|
+
itemStyle: {
|
160
|
+
color: '#f16b4c',
|
161
|
+
color0: '#f7b4a9'
|
162
|
+
},
|
163
|
+
lineStyle: {
|
164
|
+
width: 1,
|
165
|
+
color: '#d8361b',
|
166
|
+
color0: '#d26666'
|
167
|
+
},
|
168
|
+
areaStyle: {
|
169
|
+
color: '#d8361b',
|
170
|
+
color0: '#d07e75'
|
171
|
+
}
|
172
|
+
},
|
173
|
+
|
174
|
+
graph: {
|
175
|
+
itemStyle: {
|
176
|
+
color: '#d07e75'
|
177
|
+
},
|
178
|
+
linkStyle: {
|
179
|
+
color: '#d8361b'
|
180
|
+
}
|
181
|
+
},
|
182
|
+
|
183
|
+
chord: {
|
184
|
+
padding: 4,
|
185
|
+
itemStyle: {
|
186
|
+
color: '#d07e75',
|
187
|
+
borderWidth: 1,
|
188
|
+
borderColor: 'rgba(128, 128, 128, 0.5)'
|
189
|
+
},
|
190
|
+
lineStyle: {
|
191
|
+
color: 'rgba(128, 128, 128, 0.5)'
|
192
|
+
},
|
193
|
+
areaStyle: {
|
194
|
+
color: '#d8361b'
|
195
|
+
}
|
196
|
+
},
|
197
|
+
|
198
|
+
map: {
|
199
|
+
itemStyle: {
|
200
|
+
color: '#d8361b'
|
201
|
+
},
|
202
|
+
areaStyle: {
|
203
|
+
color: '#d07e75'
|
204
|
+
},
|
205
|
+
label: {
|
206
|
+
color: '#c12e34'
|
207
|
+
}
|
208
|
+
},
|
209
|
+
|
210
|
+
gauge: {
|
211
|
+
axisLine: {
|
212
|
+
lineStyle: {
|
213
|
+
color: [
|
214
|
+
[0.2, '#f16b4c'],
|
215
|
+
[0.8, '#d8361b'],
|
216
|
+
[1, '#99311c']
|
217
|
+
],
|
218
|
+
width: 8
|
219
|
+
}
|
220
|
+
}
|
221
|
+
}
|
222
|
+
};
|
223
|
+
|
224
|
+
echarts.registerTheme('red', theme);
|
225
|
+
});
|
@@ -0,0 +1,119 @@
|
|
1
|
+
|
2
|
+
/*
|
3
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
4
|
+
* or more contributor license agreements. See the NOTICE file
|
5
|
+
* distributed with this work for additional information
|
6
|
+
* regarding copyright ownership. The ASF licenses this file
|
7
|
+
* to you under the Apache License, Version 2.0 (the
|
8
|
+
* "License"); you may not use this file except in compliance
|
9
|
+
* with the License. You may obtain a copy of the License at
|
10
|
+
*
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
*
|
13
|
+
* Unless required by applicable law or agreed to in writing,
|
14
|
+
* software distributed under the License is distributed on an
|
15
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
16
|
+
* KIND, either express or implied. See the License for the
|
17
|
+
* specific language governing permissions and limitations
|
18
|
+
* under the License.
|
19
|
+
*/
|
20
|
+
|
21
|
+
(function(root, factory) {
|
22
|
+
if (typeof define === 'function' && define.amd) {
|
23
|
+
// AMD. Register as an anonymous module.
|
24
|
+
define(['exports', 'echarts'], factory);
|
25
|
+
} else if (
|
26
|
+
typeof exports === 'object' &&
|
27
|
+
typeof exports.nodeName !== 'string'
|
28
|
+
) {
|
29
|
+
// CommonJS
|
30
|
+
factory(exports, require('echarts/lib/echarts'));
|
31
|
+
} else {
|
32
|
+
// Browser globals
|
33
|
+
factory({}, root.echarts);
|
34
|
+
}
|
35
|
+
})(this, function(exports, echarts) {
|
36
|
+
var log = function(msg) {
|
37
|
+
if (typeof console !== 'undefined') {
|
38
|
+
console && console.error && console.error(msg);
|
39
|
+
}
|
40
|
+
};
|
41
|
+
if (!echarts) {
|
42
|
+
log('ECharts is not Loaded');
|
43
|
+
return;
|
44
|
+
}
|
45
|
+
|
46
|
+
var colorPalette = [
|
47
|
+
'#E01F54',
|
48
|
+
'#001852',
|
49
|
+
'#f5e8c8',
|
50
|
+
'#b8d2c7',
|
51
|
+
'#c6b38e',
|
52
|
+
'#a4d8c2',
|
53
|
+
'#f3d999',
|
54
|
+
'#d3758f',
|
55
|
+
'#dcc392',
|
56
|
+
'#2e4783',
|
57
|
+
'#82b6e9',
|
58
|
+
'#ff6347',
|
59
|
+
'#a092f1',
|
60
|
+
'#0a915d',
|
61
|
+
'#eaf889',
|
62
|
+
'#6699FF',
|
63
|
+
'#ff6666',
|
64
|
+
'#3cb371',
|
65
|
+
'#d5b158',
|
66
|
+
'#38b6b6'
|
67
|
+
];
|
68
|
+
|
69
|
+
var theme = {
|
70
|
+
color: colorPalette,
|
71
|
+
|
72
|
+
visualMap: {
|
73
|
+
color: ['#e01f54', '#e7dbc3'],
|
74
|
+
textStyle: {
|
75
|
+
color: '#333'
|
76
|
+
}
|
77
|
+
},
|
78
|
+
|
79
|
+
candlestick: {
|
80
|
+
itemStyle: {
|
81
|
+
color: '#e01f54',
|
82
|
+
color0: '#001852'
|
83
|
+
},
|
84
|
+
lineStyle: {
|
85
|
+
width: 1,
|
86
|
+
color: '#f5e8c8',
|
87
|
+
color0: '#b8d2c7'
|
88
|
+
},
|
89
|
+
areaStyle: {
|
90
|
+
color: '#a4d8c2',
|
91
|
+
color0: '#f3d999'
|
92
|
+
}
|
93
|
+
},
|
94
|
+
|
95
|
+
graph: {
|
96
|
+
itemStyle: {
|
97
|
+
color: '#a4d8c2'
|
98
|
+
},
|
99
|
+
linkStyle: {
|
100
|
+
color: '#f3d999'
|
101
|
+
}
|
102
|
+
},
|
103
|
+
|
104
|
+
gauge: {
|
105
|
+
axisLine: {
|
106
|
+
lineStyle: {
|
107
|
+
color: [
|
108
|
+
[0.2, '#E01F54'],
|
109
|
+
[0.8, '#b8d2c7'],
|
110
|
+
[1, '#001852']
|
111
|
+
],
|
112
|
+
width: 8
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
};
|
117
|
+
|
118
|
+
echarts.registerTheme('roma', theme);
|
119
|
+
});
|