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,107 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
/*
|
4
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
5
|
+
* or more contributor license agreements. See the NOTICE file
|
6
|
+
* distributed with this work for additional information
|
7
|
+
* regarding copyright ownership. The ASF licenses this file
|
8
|
+
* to you under the Apache License, Version 2.0 (the
|
9
|
+
* "License"); you may not use this file except in compliance
|
10
|
+
* with the License. You may obtain a copy of the License at
|
11
|
+
*
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
*
|
14
|
+
* Unless required by applicable law or agreed to in writing,
|
15
|
+
* software distributed under the License is distributed on an
|
16
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
17
|
+
* KIND, either express or implied. See the License for the
|
18
|
+
* specific language governing permissions and limitations
|
19
|
+
* under the License.
|
20
|
+
*/
|
21
|
+
|
22
|
+
|
23
|
+
/**
|
24
|
+
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
25
|
+
*/
|
26
|
+
(function(root, factory) {
|
27
|
+
if (typeof define === 'function' && define.amd) {
|
28
|
+
// AMD. Register as an anonymous module.
|
29
|
+
define(['exports', 'echarts'], factory);
|
30
|
+
} else if (
|
31
|
+
typeof exports === 'object' &&
|
32
|
+
typeof exports.nodeName !== 'string'
|
33
|
+
) {
|
34
|
+
// CommonJS
|
35
|
+
factory(exports, require('echarts/lib/echarts'));
|
36
|
+
} else {
|
37
|
+
// Browser globals
|
38
|
+
factory({}, root.echarts);
|
39
|
+
}
|
40
|
+
})(this, function(exports, echarts) {
|
41
|
+
|
42
|
+
|
43
|
+
var localeObj = {
|
44
|
+
time: {
|
45
|
+
month: [
|
46
|
+
'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน',
|
47
|
+
'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'
|
48
|
+
],
|
49
|
+
monthAbbr: [
|
50
|
+
'ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.',
|
51
|
+
'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.'
|
52
|
+
],
|
53
|
+
dayOfWeek: [
|
54
|
+
'วันอาทิตย์', 'วันจันทร์', 'วันอังคาร', 'วันพุธ', 'วันพฤหัสบดี', 'วันศุกร์', 'วันเสาร์'
|
55
|
+
],
|
56
|
+
dayOfWeekAbbr: [
|
57
|
+
'อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'
|
58
|
+
]
|
59
|
+
},
|
60
|
+
legend: {
|
61
|
+
selector: {
|
62
|
+
all: 'ทั้งหมด',
|
63
|
+
inverse: 'ผกผัน'
|
64
|
+
}
|
65
|
+
},
|
66
|
+
toolbox: {
|
67
|
+
brush: {
|
68
|
+
title: {
|
69
|
+
rect: 'ตัวเลือกแบบกล่อง',
|
70
|
+
polygon: 'ตัวเลือกแบบบ่วงบาศ',
|
71
|
+
lineX: 'ตัวเลือกแบบแนวนอน',
|
72
|
+
lineY: 'ตัวเลือกแบบแนวตั้ง',
|
73
|
+
keep: 'บันทึกตัวเลือก',
|
74
|
+
clear: 'ล้างตัวเลือก'
|
75
|
+
}
|
76
|
+
},
|
77
|
+
dataView: {
|
78
|
+
title: 'มุมมองข้อมูล',
|
79
|
+
lang: ['มุมมองข้อมูล', 'ปิด', 'รีเฟรช']
|
80
|
+
},
|
81
|
+
dataZoom: {
|
82
|
+
title: {
|
83
|
+
zoom: 'ซูม',
|
84
|
+
back: 'ตั้งซูมใหม่'
|
85
|
+
}
|
86
|
+
},
|
87
|
+
magicType: {
|
88
|
+
title: {
|
89
|
+
line: 'สวิตซ์แบบแผนภาพเส้น',
|
90
|
+
bar: 'สวิตซ์แบบแผนภาพแท่ง',
|
91
|
+
stack: 'กองไว้',
|
92
|
+
tiled: 'แยกไว้'
|
93
|
+
}
|
94
|
+
},
|
95
|
+
restore: {
|
96
|
+
title: 'ตั้งค่าใหม่'
|
97
|
+
},
|
98
|
+
saveAsImage: {
|
99
|
+
title: 'บันทึกไปยังรูปภาพ',
|
100
|
+
lang: ['คลิกขวาเพื่อบันทึกรูปภาพ']
|
101
|
+
}
|
102
|
+
}
|
103
|
+
};
|
104
|
+
|
105
|
+
echarts.registerLocale('TH', localeObj);
|
106
|
+
|
107
|
+
});
|
@@ -0,0 +1,168 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
/*
|
4
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
5
|
+
* or more contributor license agreements. See the NOTICE file
|
6
|
+
* distributed with this work for additional information
|
7
|
+
* regarding copyright ownership. The ASF licenses this file
|
8
|
+
* to you under the Apache License, Version 2.0 (the
|
9
|
+
* "License"); you may not use this file except in compliance
|
10
|
+
* with the License. You may obtain a copy of the License at
|
11
|
+
*
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
*
|
14
|
+
* Unless required by applicable law or agreed to in writing,
|
15
|
+
* software distributed under the License is distributed on an
|
16
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
17
|
+
* KIND, either express or implied. See the License for the
|
18
|
+
* specific language governing permissions and limitations
|
19
|
+
* under the License.
|
20
|
+
*/
|
21
|
+
|
22
|
+
|
23
|
+
/**
|
24
|
+
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
25
|
+
*/
|
26
|
+
(function(root, factory) {
|
27
|
+
if (typeof define === 'function' && define.amd) {
|
28
|
+
// AMD. Register as an anonymous module.
|
29
|
+
define(['exports'], factory);
|
30
|
+
} else if (
|
31
|
+
typeof exports === 'object' &&
|
32
|
+
typeof exports.nodeName !== 'string'
|
33
|
+
) {
|
34
|
+
// CommonJS
|
35
|
+
factory(exports);
|
36
|
+
} else {
|
37
|
+
// Browser globals
|
38
|
+
factory({});
|
39
|
+
}
|
40
|
+
})(this, function(exports) {
|
41
|
+
|
42
|
+
|
43
|
+
var localeObj = {
|
44
|
+
time: {
|
45
|
+
month: [
|
46
|
+
'一月', '二月', '三月', '四月', '五月', '六月',
|
47
|
+
'七月', '八月', '九月', '十月', '十一月', '十二月'
|
48
|
+
],
|
49
|
+
monthAbbr: [
|
50
|
+
'1月', '2月', '3月', '4月', '5月', '6月',
|
51
|
+
'7月', '8月', '9月', '10月', '11月', '12月'
|
52
|
+
],
|
53
|
+
dayOfWeek: [
|
54
|
+
'星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'
|
55
|
+
],
|
56
|
+
dayOfWeekAbbr: [
|
57
|
+
'日', '一', '二', '三', '四', '五', '六'
|
58
|
+
]
|
59
|
+
},
|
60
|
+
legend: {
|
61
|
+
selector: {
|
62
|
+
all: '全选',
|
63
|
+
inverse: '反选'
|
64
|
+
}
|
65
|
+
},
|
66
|
+
toolbox: {
|
67
|
+
brush: {
|
68
|
+
title: {
|
69
|
+
rect: '矩形选择',
|
70
|
+
polygon: '圈选',
|
71
|
+
lineX: '横向选择',
|
72
|
+
lineY: '纵向选择',
|
73
|
+
keep: '保持选择',
|
74
|
+
clear: '清除选择'
|
75
|
+
}
|
76
|
+
},
|
77
|
+
dataView: {
|
78
|
+
title: '数据视图',
|
79
|
+
lang: ['数据视图', '关闭', '刷新']
|
80
|
+
},
|
81
|
+
dataZoom: {
|
82
|
+
title: {
|
83
|
+
zoom: '区域缩放',
|
84
|
+
back: '区域缩放还原'
|
85
|
+
}
|
86
|
+
},
|
87
|
+
magicType: {
|
88
|
+
title: {
|
89
|
+
line: '切换为折线图',
|
90
|
+
bar: '切换为柱状图',
|
91
|
+
stack: '切换为堆叠',
|
92
|
+
tiled: '切换为平铺'
|
93
|
+
}
|
94
|
+
},
|
95
|
+
restore: {
|
96
|
+
title: '还原'
|
97
|
+
},
|
98
|
+
saveAsImage: {
|
99
|
+
title: '保存为图片',
|
100
|
+
lang: ['右键另存为图片']
|
101
|
+
}
|
102
|
+
},
|
103
|
+
series: {
|
104
|
+
typeNames: {
|
105
|
+
pie: '饼图',
|
106
|
+
bar: '柱状图',
|
107
|
+
line: '折线图',
|
108
|
+
scatter: '散点图',
|
109
|
+
effectScatter: '涟漪散点图',
|
110
|
+
radar: '雷达图',
|
111
|
+
tree: '树图',
|
112
|
+
treemap: '矩形树图',
|
113
|
+
boxplot: '箱型图',
|
114
|
+
candlestick: 'K线图',
|
115
|
+
k: 'K线图',
|
116
|
+
heatmap: '热力图',
|
117
|
+
map: '地图',
|
118
|
+
parallel: '平行坐标图',
|
119
|
+
lines: '线图',
|
120
|
+
graph: '关系图',
|
121
|
+
sankey: '桑基图',
|
122
|
+
funnel: '漏斗图',
|
123
|
+
gauge: '仪表盘图',
|
124
|
+
pictorialBar: '象形柱图',
|
125
|
+
themeRiver: '主题河流图',
|
126
|
+
sunburst: '旭日图'
|
127
|
+
}
|
128
|
+
},
|
129
|
+
aria: {
|
130
|
+
general: {
|
131
|
+
withTitle: '这是一个关于“{title}”的图表。',
|
132
|
+
withoutTitle: '这是一个图表,'
|
133
|
+
},
|
134
|
+
series: {
|
135
|
+
single: {
|
136
|
+
prefix: '',
|
137
|
+
withName: '图表类型是{seriesType},表示{seriesName}。',
|
138
|
+
withoutName: '图表类型是{seriesType}。'
|
139
|
+
},
|
140
|
+
multiple: {
|
141
|
+
prefix: '它由{seriesCount}个图表系列组成。',
|
142
|
+
withName: '第{seriesId}个系列是一个表示{seriesName}的{seriesType},',
|
143
|
+
withoutName: '第{seriesId}个系列是一个{seriesType},',
|
144
|
+
separator: {
|
145
|
+
middle: ';',
|
146
|
+
end: '。'
|
147
|
+
}
|
148
|
+
}
|
149
|
+
},
|
150
|
+
data: {
|
151
|
+
allData: '其数据是——',
|
152
|
+
partialData: '其中,前{displayCnt}项是——',
|
153
|
+
withName: '{name}的数据是{value}',
|
154
|
+
withoutName: '{value}',
|
155
|
+
separator: {
|
156
|
+
middle: ',',
|
157
|
+
end: ''
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
};
|
162
|
+
for (var key in localeObj) {
|
163
|
+
if (localeObj.hasOwnProperty(key)) {
|
164
|
+
exports[key] = localeObj[key];
|
165
|
+
}
|
166
|
+
}
|
167
|
+
|
168
|
+
});
|
@@ -0,0 +1,164 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
/*
|
4
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
5
|
+
* or more contributor license agreements. See the NOTICE file
|
6
|
+
* distributed with this work for additional information
|
7
|
+
* regarding copyright ownership. The ASF licenses this file
|
8
|
+
* to you under the Apache License, Version 2.0 (the
|
9
|
+
* "License"); you may not use this file except in compliance
|
10
|
+
* with the License. You may obtain a copy of the License at
|
11
|
+
*
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
*
|
14
|
+
* Unless required by applicable law or agreed to in writing,
|
15
|
+
* software distributed under the License is distributed on an
|
16
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
17
|
+
* KIND, either express or implied. See the License for the
|
18
|
+
* specific language governing permissions and limitations
|
19
|
+
* under the License.
|
20
|
+
*/
|
21
|
+
|
22
|
+
|
23
|
+
/**
|
24
|
+
* AUTO-GENERATED FILE. DO NOT MODIFY.
|
25
|
+
*/
|
26
|
+
(function(root, factory) {
|
27
|
+
if (typeof define === 'function' && define.amd) {
|
28
|
+
// AMD. Register as an anonymous module.
|
29
|
+
define(['exports', 'echarts'], factory);
|
30
|
+
} else if (
|
31
|
+
typeof exports === 'object' &&
|
32
|
+
typeof exports.nodeName !== 'string'
|
33
|
+
) {
|
34
|
+
// CommonJS
|
35
|
+
factory(exports, require('echarts/lib/echarts'));
|
36
|
+
} else {
|
37
|
+
// Browser globals
|
38
|
+
factory({}, root.echarts);
|
39
|
+
}
|
40
|
+
})(this, function(exports, echarts) {
|
41
|
+
|
42
|
+
|
43
|
+
var localeObj = {
|
44
|
+
time: {
|
45
|
+
month: [
|
46
|
+
'一月', '二月', '三月', '四月', '五月', '六月',
|
47
|
+
'七月', '八月', '九月', '十月', '十一月', '十二月'
|
48
|
+
],
|
49
|
+
monthAbbr: [
|
50
|
+
'1月', '2月', '3月', '4月', '5月', '6月',
|
51
|
+
'7月', '8月', '9月', '10月', '11月', '12月'
|
52
|
+
],
|
53
|
+
dayOfWeek: [
|
54
|
+
'星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'
|
55
|
+
],
|
56
|
+
dayOfWeekAbbr: [
|
57
|
+
'日', '一', '二', '三', '四', '五', '六'
|
58
|
+
]
|
59
|
+
},
|
60
|
+
legend: {
|
61
|
+
selector: {
|
62
|
+
all: '全选',
|
63
|
+
inverse: '反选'
|
64
|
+
}
|
65
|
+
},
|
66
|
+
toolbox: {
|
67
|
+
brush: {
|
68
|
+
title: {
|
69
|
+
rect: '矩形选择',
|
70
|
+
polygon: '圈选',
|
71
|
+
lineX: '横向选择',
|
72
|
+
lineY: '纵向选择',
|
73
|
+
keep: '保持选择',
|
74
|
+
clear: '清除选择'
|
75
|
+
}
|
76
|
+
},
|
77
|
+
dataView: {
|
78
|
+
title: '数据视图',
|
79
|
+
lang: ['数据视图', '关闭', '刷新']
|
80
|
+
},
|
81
|
+
dataZoom: {
|
82
|
+
title: {
|
83
|
+
zoom: '区域缩放',
|
84
|
+
back: '区域缩放还原'
|
85
|
+
}
|
86
|
+
},
|
87
|
+
magicType: {
|
88
|
+
title: {
|
89
|
+
line: '切换为折线图',
|
90
|
+
bar: '切换为柱状图',
|
91
|
+
stack: '切换为堆叠',
|
92
|
+
tiled: '切换为平铺'
|
93
|
+
}
|
94
|
+
},
|
95
|
+
restore: {
|
96
|
+
title: '还原'
|
97
|
+
},
|
98
|
+
saveAsImage: {
|
99
|
+
title: '保存为图片',
|
100
|
+
lang: ['右键另存为图片']
|
101
|
+
}
|
102
|
+
},
|
103
|
+
series: {
|
104
|
+
typeNames: {
|
105
|
+
pie: '饼图',
|
106
|
+
bar: '柱状图',
|
107
|
+
line: '折线图',
|
108
|
+
scatter: '散点图',
|
109
|
+
effectScatter: '涟漪散点图',
|
110
|
+
radar: '雷达图',
|
111
|
+
tree: '树图',
|
112
|
+
treemap: '矩形树图',
|
113
|
+
boxplot: '箱型图',
|
114
|
+
candlestick: 'K线图',
|
115
|
+
k: 'K线图',
|
116
|
+
heatmap: '热力图',
|
117
|
+
map: '地图',
|
118
|
+
parallel: '平行坐标图',
|
119
|
+
lines: '线图',
|
120
|
+
graph: '关系图',
|
121
|
+
sankey: '桑基图',
|
122
|
+
funnel: '漏斗图',
|
123
|
+
gauge: '仪表盘图',
|
124
|
+
pictorialBar: '象形柱图',
|
125
|
+
themeRiver: '主题河流图',
|
126
|
+
sunburst: '旭日图'
|
127
|
+
}
|
128
|
+
},
|
129
|
+
aria: {
|
130
|
+
general: {
|
131
|
+
withTitle: '这是一个关于“{title}”的图表。',
|
132
|
+
withoutTitle: '这是一个图表,'
|
133
|
+
},
|
134
|
+
series: {
|
135
|
+
single: {
|
136
|
+
prefix: '',
|
137
|
+
withName: '图表类型是{seriesType},表示{seriesName}。',
|
138
|
+
withoutName: '图表类型是{seriesType}。'
|
139
|
+
},
|
140
|
+
multiple: {
|
141
|
+
prefix: '它由{seriesCount}个图表系列组成。',
|
142
|
+
withName: '第{seriesId}个系列是一个表示{seriesName}的{seriesType},',
|
143
|
+
withoutName: '第{seriesId}个系列是一个{seriesType},',
|
144
|
+
separator: {
|
145
|
+
middle: ';',
|
146
|
+
end: '。'
|
147
|
+
}
|
148
|
+
}
|
149
|
+
},
|
150
|
+
data: {
|
151
|
+
allData: '其数据是——',
|
152
|
+
partialData: '其中,前{displayCnt}项是——',
|
153
|
+
withName: '{name}的数据是{value}',
|
154
|
+
withoutName: '{value}',
|
155
|
+
separator: {
|
156
|
+
middle: ',',
|
157
|
+
end: ''
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
};
|
162
|
+
echarts.registerLocale('ZH', localeObj);
|
163
|
+
|
164
|
+
});
|
@@ -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
|
+
'#f2385a',
|
47
|
+
'#f5a503',
|
48
|
+
'#4ad9d9',
|
49
|
+
'#f7879c',
|
50
|
+
'#c1d7a8',
|
51
|
+
'#4dffd2',
|
52
|
+
'#fccfd7',
|
53
|
+
'#d5f6f6'
|
54
|
+
];
|
55
|
+
|
56
|
+
var theme = {
|
57
|
+
color: colorPalette,
|
58
|
+
|
59
|
+
title: {
|
60
|
+
textStyle: {
|
61
|
+
fontWeight: 'normal',
|
62
|
+
color: '#f2385a'
|
63
|
+
}
|
64
|
+
},
|
65
|
+
|
66
|
+
visualMap: {
|
67
|
+
color: ['#f2385a', '#f5a503']
|
68
|
+
},
|
69
|
+
|
70
|
+
toolbox: {
|
71
|
+
color: ['#f2385a', '#f2385a', '#f2385a', '#f2385a']
|
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: '#f2385a',
|
82
|
+
type: 'dashed'
|
83
|
+
},
|
84
|
+
crossStyle: {
|
85
|
+
color: '#f2385a'
|
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: '#f2385a' // Handle color
|
99
|
+
},
|
100
|
+
|
101
|
+
timeline: {
|
102
|
+
lineStyle: {
|
103
|
+
color: '#f2385a'
|
104
|
+
},
|
105
|
+
controlStyle: {
|
106
|
+
color: '#f2385a',
|
107
|
+
borderColor: '#f2385a'
|
108
|
+
}
|
109
|
+
},
|
110
|
+
|
111
|
+
candlestick: {
|
112
|
+
itemStyle: {
|
113
|
+
color: '#f2385a',
|
114
|
+
color0: '#f5a503'
|
115
|
+
},
|
116
|
+
lineStyle: {
|
117
|
+
width: 1,
|
118
|
+
color: '#f2385a',
|
119
|
+
color0: '#f5a503'
|
120
|
+
},
|
121
|
+
areaStyle: {
|
122
|
+
color: '#c1d7a8',
|
123
|
+
color0: '#4ad9d9'
|
124
|
+
}
|
125
|
+
},
|
126
|
+
|
127
|
+
map: {
|
128
|
+
itemStyle: {
|
129
|
+
color: '#f2385a'
|
130
|
+
},
|
131
|
+
areaStyle: {
|
132
|
+
color: '#ddd'
|
133
|
+
},
|
134
|
+
label: {
|
135
|
+
color: '#c12e34'
|
136
|
+
}
|
137
|
+
},
|
138
|
+
|
139
|
+
graph: {
|
140
|
+
itemStyle: {
|
141
|
+
color: '#f2385a'
|
142
|
+
},
|
143
|
+
linkStyle: {
|
144
|
+
color: '#f2385a'
|
145
|
+
}
|
146
|
+
},
|
147
|
+
|
148
|
+
gauge: {
|
149
|
+
axisLine: {
|
150
|
+
lineStyle: {
|
151
|
+
color: [
|
152
|
+
[0.2, '#f5a503'],
|
153
|
+
[0.8, '#f2385a'],
|
154
|
+
[1, '#c1d7a8']
|
155
|
+
],
|
156
|
+
width: 8
|
157
|
+
}
|
158
|
+
}
|
159
|
+
}
|
160
|
+
};
|
161
|
+
|
162
|
+
echarts.registerTheme('azul', theme);
|
163
|
+
});
|