rails_charts 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -3
  3. data/app/assets/javascripts/echarts/extension/bmap.js +36 -81
  4. data/app/assets/javascripts/echarts/extension/bmap.js.map +1 -1
  5. data/app/assets/javascripts/echarts/extension/dataTool.js +14 -48
  6. data/app/assets/javascripts/echarts/extension/dataTool.js.map +1 -1
  7. data/app/assets/javascripts/echarts/i18n/langAR-obj.js +178 -0
  8. data/app/assets/javascripts/echarts/i18n/langAR.js +174 -0
  9. data/app/assets/javascripts/echarts/i18n/langCS-obj.js +4 -1
  10. data/app/assets/javascripts/echarts/i18n/langCS.js +4 -1
  11. data/app/assets/javascripts/echarts/i18n/langDE-obj.js +5 -2
  12. data/app/assets/javascripts/echarts/i18n/langDE.js +5 -2
  13. data/app/assets/javascripts/echarts/i18n/langEN-obj.js +3 -1
  14. data/app/assets/javascripts/echarts/i18n/langEN.js +3 -1
  15. data/app/assets/javascripts/echarts/i18n/langES-obj.js +60 -0
  16. data/app/assets/javascripts/echarts/i18n/langES.js +60 -0
  17. data/app/assets/javascripts/echarts/i18n/langFA-obj.js +175 -0
  18. data/app/assets/javascripts/echarts/i18n/langFA.js +171 -0
  19. data/app/assets/javascripts/echarts/i18n/langFI-obj.js +60 -0
  20. data/app/assets/javascripts/echarts/i18n/langFI.js +60 -0
  21. data/app/assets/javascripts/echarts/i18n/langFR-obj.js +3 -1
  22. data/app/assets/javascripts/echarts/i18n/langFR.js +3 -1
  23. data/app/assets/javascripts/echarts/i18n/langHU-obj.js +175 -0
  24. data/app/assets/javascripts/echarts/i18n/langHU.js +171 -0
  25. data/app/assets/javascripts/echarts/i18n/langIT-obj.js +3 -1
  26. data/app/assets/javascripts/echarts/i18n/langIT.js +3 -1
  27. data/app/assets/javascripts/echarts/i18n/langJA-obj.js +3 -1
  28. data/app/assets/javascripts/echarts/i18n/langJA.js +3 -1
  29. data/app/assets/javascripts/echarts/i18n/langKO-obj.js +3 -1
  30. data/app/assets/javascripts/echarts/i18n/langKO.js +3 -1
  31. data/app/assets/javascripts/echarts/i18n/langNL-obj.js +175 -0
  32. data/app/assets/javascripts/echarts/i18n/langNL.js +171 -0
  33. data/app/assets/javascripts/echarts/i18n/langPL-obj.js +3 -1
  34. data/app/assets/javascripts/echarts/i18n/langPL.js +3 -1
  35. data/app/assets/javascripts/echarts/i18n/langPT-br-obj.js +14 -12
  36. data/app/assets/javascripts/echarts/i18n/langPT-br.js +14 -12
  37. data/app/assets/javascripts/echarts/i18n/langRO-obj.js +3 -1
  38. data/app/assets/javascripts/echarts/i18n/langRO.js +3 -1
  39. data/app/assets/javascripts/echarts/i18n/langRU-obj.js +3 -1
  40. data/app/assets/javascripts/echarts/i18n/langRU.js +3 -1
  41. data/app/assets/javascripts/echarts/i18n/langSI-obj.js +4 -1
  42. data/app/assets/javascripts/echarts/i18n/langSI.js +4 -1
  43. data/app/assets/javascripts/echarts/i18n/langSV-obj.js +174 -0
  44. data/app/assets/javascripts/echarts/i18n/langSV.js +170 -0
  45. data/app/assets/javascripts/echarts/i18n/langTH-obj.js +60 -0
  46. data/app/assets/javascripts/echarts/i18n/langTH.js +60 -0
  47. data/app/assets/javascripts/echarts/i18n/langTR-obj.js +175 -0
  48. data/app/assets/javascripts/echarts/i18n/langTR.js +171 -0
  49. data/app/assets/javascripts/echarts/i18n/{langUA-obj.js → langUK-obj.js} +3 -1
  50. data/app/assets/javascripts/echarts/i18n/{langUA.js → langUK.js} +4 -2
  51. data/app/assets/javascripts/echarts/i18n/langVI-obj.js +200 -0
  52. data/app/assets/javascripts/echarts/i18n/langVI.js +196 -0
  53. data/app/assets/javascripts/echarts/i18n/langZH-obj.js +4 -1
  54. data/app/assets/javascripts/echarts/i18n/langZH.js +4 -1
  55. data/app/assets/javascripts/echarts/i18n/package.json +3 -0
  56. data/app/assets/javascripts/echarts/theme/azul.js +1 -1
  57. data/app/assets/javascripts/echarts/theme/bee-inspired.js +1 -1
  58. data/app/assets/javascripts/echarts/theme/blue.js +1 -1
  59. data/app/assets/javascripts/echarts/theme/caravan.js +1 -1
  60. data/app/assets/javascripts/echarts/theme/carp.js +1 -1
  61. data/app/assets/javascripts/echarts/theme/cool.js +1 -1
  62. data/app/assets/javascripts/echarts/theme/dark-blue.js +1 -1
  63. data/app/assets/javascripts/echarts/theme/dark-bold.js +1 -1
  64. data/app/assets/javascripts/echarts/theme/dark-digerati.js +1 -1
  65. data/app/assets/javascripts/echarts/theme/dark-fresh-cut.js +1 -1
  66. data/app/assets/javascripts/echarts/theme/dark-mushroom.js +1 -1
  67. data/app/assets/javascripts/echarts/theme/dark.js +1 -1
  68. data/app/assets/javascripts/echarts/theme/eduardo.js +1 -1
  69. data/app/assets/javascripts/echarts/theme/forest.js +1 -1
  70. data/app/assets/javascripts/echarts/theme/fresh-cut.js +1 -1
  71. data/app/assets/javascripts/echarts/theme/fruit.js +1 -1
  72. data/app/assets/javascripts/echarts/theme/gray.js +1 -1
  73. data/app/assets/javascripts/echarts/theme/green.js +1 -1
  74. data/app/assets/javascripts/echarts/theme/helianthus.js +1 -1
  75. data/app/assets/javascripts/echarts/theme/infographic.js +6 -6
  76. data/app/assets/javascripts/echarts/theme/inspired.js +1 -1
  77. data/app/assets/javascripts/echarts/theme/jazz.js +1 -1
  78. data/app/assets/javascripts/echarts/theme/london.js +1 -1
  79. data/app/assets/javascripts/echarts/theme/macarons.js +6 -4
  80. data/app/assets/javascripts/echarts/theme/macarons2.js +59 -62
  81. data/app/assets/javascripts/echarts/theme/mint.js +1 -1
  82. data/app/assets/javascripts/echarts/theme/package.json +3 -0
  83. data/app/assets/javascripts/echarts/theme/red-velvet.js +1 -1
  84. data/app/assets/javascripts/echarts/theme/red.js +1 -1
  85. data/app/assets/javascripts/echarts/theme/roma.js +1 -1
  86. data/app/assets/javascripts/echarts/theme/royal.js +1 -1
  87. data/app/assets/javascripts/echarts/theme/sakura.js +1 -1
  88. data/app/assets/javascripts/echarts/theme/shine.js +2 -4
  89. data/app/assets/javascripts/echarts/theme/tech-blue.js +7 -3
  90. data/app/assets/javascripts/echarts/theme/tool/option/area.js +88 -0
  91. data/app/assets/javascripts/echarts/theme/tool/option/bar.js +107 -0
  92. data/app/assets/javascripts/echarts/theme/tool/option/graph.js +2824 -0
  93. data/app/assets/javascripts/echarts/theme/tool/option/map.js +141 -0
  94. data/app/assets/javascripts/echarts/theme/tool/option/pie.js +87 -0
  95. data/app/assets/javascripts/echarts/theme/tool/option/scatter.js +201 -0
  96. data/app/assets/javascripts/echarts/theme/tool/thumb.html +65 -0
  97. data/app/assets/javascripts/echarts/theme/tool/thumb.js +63 -0
  98. data/app/assets/javascripts/echarts/theme/vintage.js +1 -1
  99. data/app/assets/javascripts/echarts.min.js +2 -2
  100. data/lib/rails_charts/base_chart.rb +5 -4
  101. data/lib/rails_charts/javascript.rb +1 -1
  102. data/lib/rails_charts/stacked_bar_chart.rb +1 -1
  103. data/lib/rails_charts/version.rb +1 -1
  104. metadata +29 -22
@@ -0,0 +1,141 @@
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
+ export default {
21
+ visualMap: {
22
+ show: true,
23
+ min: 0,
24
+ max: 1500,
25
+ right: 50,
26
+ top: 'middle',
27
+ text:['高','低']
28
+ // orient: 'horizontal'
29
+ },
30
+ selectedMode: 'single',
31
+ series : [
32
+ {
33
+ name: 'iphone3',
34
+ type: 'map',
35
+ map: 'china',
36
+ showLegendSymbol: true,
37
+ label: {
38
+ show: false,
39
+ },
40
+ emphasis: {
41
+ label: {
42
+ show: false,
43
+ }
44
+ },
45
+ data:[
46
+ {name: '北京',value: 500},
47
+ {name: '天津',value: 500},
48
+ {name: '上海',value: 500},
49
+ {name: '重庆',value: 500},
50
+ {name: '河北',value: 500},
51
+ {name: '河南',value: 500},
52
+ {name: '云南',value: 500},
53
+ {name: '辽宁',value: 500},
54
+ {name: '黑龙江',value: 500},
55
+ {name: '湖南',value: 500},
56
+ {name: '安徽',value: 500},
57
+ {name: '山东',value: 500},
58
+ {name: '新疆',value: 500},
59
+ {name: '江苏',value: 500},
60
+ {name: '浙江',value: 500},
61
+ {name: '江西',value: 500},
62
+ {name: '湖北',value: 500},
63
+ {name: '广西',value: 500},
64
+ {name: '甘肃',value: 500},
65
+ {name: '山西',value: 500},
66
+ {name: '内蒙古',value: 500},
67
+ {name: '陕西',value: 500},
68
+ {name: '吉林',value: 500},
69
+ {name: '福建',value: 500},
70
+ {name: '贵州',value: 500},
71
+ {name: '广东',value: 500},
72
+ {name: '青海',value: 500},
73
+ {name: '西藏',value: 500},
74
+ {name: '四川',value: 500},
75
+ {name: '宁夏',value: 500},
76
+ {name: '海南',value: 500},
77
+ {name: '台湾',value: 500},
78
+ {name: '香港',value: 500},
79
+ {name: '澳门',value: 500}
80
+ ]
81
+ },
82
+ {
83
+ name: 'iphone4',
84
+ type: 'map',
85
+ mapType: 'china',
86
+ showLegendSymbol: true,
87
+ label: {
88
+ show: false,
89
+ },
90
+ emphasis: {
91
+ label: {
92
+ show: false
93
+ }
94
+ },
95
+ data:[
96
+ {name: '北京',value: 500},
97
+ {name: '天津',value: 500},
98
+ {name: '上海',value: 500},
99
+ {name: '重庆',value: 500},
100
+ {name: '河北',value: 500},
101
+ {name: '安徽',value: 500},
102
+ {name: '新疆',value: 500},
103
+ {name: '浙江',value: 500},
104
+ {name: '江西',value: 500},
105
+ {name: '山西',value: 500},
106
+ {name: '内蒙古',value: 500},
107
+ {name: '吉林',value: 500},
108
+ {name: '福建',value: 500},
109
+ {name: '广东',value: 500},
110
+ {name: '西藏',value: 500},
111
+ {name: '四川',value: 500},
112
+ {name: '宁夏',value: 500},
113
+ {name: '香港',value: 500},
114
+ {name: '澳门',value: 500}
115
+ ]
116
+ },
117
+ {
118
+ name: 'iphone5',
119
+ type: 'map',
120
+ mapType: 'china',
121
+ showLegendSymbol: true,
122
+ label: {
123
+ show: false,
124
+ },
125
+ emphasis: {
126
+ label: {
127
+ show: false
128
+ }
129
+ },
130
+ data:[
131
+ {name: '北京',value: 500},
132
+ {name: '天津',value: 500},
133
+ {name: '上海',value: 500},
134
+ {name: '广东',value: 500},
135
+ {name: '台湾',value: 500},
136
+ {name: '香港',value: 500},
137
+ {name: '澳门',value: 500}
138
+ ]
139
+ }
140
+ ]
141
+ };
@@ -0,0 +1,87 @@
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
+ export default {
21
+ legend: {
22
+ bottom: '5%',
23
+ data: ['rose1', 'rose2', 'rose3', 'rose4']
24
+ },
25
+ series : [
26
+ {
27
+ name:'半径模式',
28
+ type:'pie',
29
+ radius : [20, 80],
30
+ center : ['25%', 110],
31
+ label: {
32
+ show: false,
33
+ },
34
+ lableLine: {
35
+ show: false,
36
+ },
37
+ emphasis: {
38
+ label: {
39
+ show: true
40
+ },
41
+ lableLine: {
42
+ show: true
43
+ }
44
+ },
45
+ data:[
46
+ {value:10, name:'rose1'},
47
+ {value:5, name:'rose2'},
48
+ {value:15, name:'rose3'},
49
+ {value:25, name:'rose4'},
50
+ {value:20, name:'rose5'},
51
+ {value:35, name:'rose6'},
52
+ {value:30, name:'rose7'},
53
+ {value:40, name:'rose8'}
54
+ ]
55
+ },
56
+ {
57
+ name:'面积模式',
58
+ type:'pie',
59
+ radius : [30, 80],
60
+ center : ['75%', 110],
61
+ roseType : 'area',
62
+ labelLine: {
63
+ length: 5
64
+ },
65
+ data:[
66
+ {value:10, name:'rose1'},
67
+ {value:5, name:'rose2'},
68
+ {value:15, name:'rose3'},
69
+ {value:25, name:'rose4'},
70
+ {value:20, name:'rose5'},
71
+ {value:35, name:'rose6'},
72
+ {value:30, name:'rose7'},
73
+ {value:40, name:'rose8'}
74
+ ]
75
+ },
76
+ {
77
+ name:'仪表盘',
78
+ type:'gauge',
79
+ radius : 100,
80
+ center : ['50%', 280],
81
+ detail : {formatter:'{value}%'},
82
+ data:[
83
+ {value:50, name:'Gauge'}
84
+ ]
85
+ }
86
+ ]
87
+ };
@@ -0,0 +1,201 @@
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
+ export default {
21
+ timeline: {
22
+ left: '2%',
23
+ right: '2%',
24
+ data: [
25
+ '2002-01-01','2003-01-01','2004-01-01',
26
+ {
27
+ value: '2005-01-01',
28
+ symbol: 'diamond',
29
+ symbolSize: 16
30
+ },
31
+ '2006-01-01', '2007-01-01','2008-01-01','2009-01-01','2010-01-01',
32
+ {
33
+ value: '2011-01-01',
34
+ symbol: 'diamond',
35
+ symbolSize: 18
36
+ }
37
+ ],
38
+ label: {
39
+ formatter : function(s) {
40
+ return (new Date(s)).getFullYear();
41
+ }
42
+ }
43
+ },
44
+ options: [{
45
+ grid: {
46
+ left: '13%',
47
+ right: '5%',
48
+ bottom: '20%'
49
+ },
50
+ xAxis: {
51
+ type : 'value',
52
+ scale:true,
53
+ axisLabel : {
54
+ formatter: '{value} cm'
55
+ }
56
+ },
57
+ yAxis: {
58
+ type : 'value',
59
+ scale:true,
60
+ axisLabel : {
61
+ formatter: '{value} kg'
62
+ }
63
+ },
64
+ series : [
65
+ {
66
+ name:'女性',
67
+ type:'scatter',
68
+ data: [[161.2, 51.6], [167.5, 59.0], [159.5, 49.2], [157.0, 63.0], [155.8, 53.6],
69
+ [170.0, 59.0], [159.1, 47.6], [166.0, 69.8], [176.2, 66.8], [160.2, 75.2],
70
+ [172.5, 55.2], [170.9, 54.2], [172.9, 62.5], [153.4, 42.0], [160.0, 50.0],
71
+ [147.2, 49.8], [168.2, 49.2], [175.0, 73.2], [157.0, 47.8], [167.6, 68.8],
72
+ [159.5, 50.6], [175.0, 82.5], [166.8, 57.2], [176.5, 87.8], [170.2, 72.8],
73
+ [174.0, 54.5], [173.0, 59.8], [179.9, 67.3], [170.5, 67.8], [160.0, 47.0],
74
+ [154.4, 46.2], [162.0, 55.0], [176.5, 83.0], [160.0, 54.4], [152.0, 45.8],
75
+ [162.1, 53.6], [170.0, 73.2], [160.2, 52.1], [161.3, 67.9], [166.4, 56.6],
76
+ [168.9, 62.3], [163.8, 58.5], [167.6, 54.5], [160.0, 50.2], [161.3, 60.3],
77
+ [167.6, 58.3], [165.1, 56.2], [160.0, 50.2], [170.0, 72.9], [157.5, 59.8],
78
+ [167.6, 61.0], [160.7, 69.1], [163.2, 55.9], [152.4, 46.5], [157.5, 54.3],
79
+ [168.3, 54.8], [180.3, 60.7], [165.5, 60.0], [165.0, 62.0], [164.5, 60.3],
80
+ [156.0, 52.7], [160.0, 74.3], [163.0, 62.0], [165.7, 73.1], [161.0, 80.0],
81
+ [162.0, 54.7], [166.0, 53.2], [174.0, 75.7], [172.7, 61.1], [167.6, 55.7],
82
+ [151.1, 48.7], [164.5, 52.3], [163.5, 50.0], [152.0, 59.3], [169.0, 62.5],
83
+ [164.0, 55.7], [161.2, 54.8], [155.0, 45.9], [170.0, 70.6], [176.2, 67.2],
84
+ [170.0, 69.4], [162.5, 58.2], [170.3, 64.8], [164.1, 71.6], [169.5, 52.8],
85
+ [163.2, 59.8], [154.5, 49.0], [159.8, 50.0], [173.2, 69.2], [170.0, 55.9],
86
+ [161.4, 63.4], [169.0, 58.2], [166.2, 58.6], [159.4, 45.7], [162.5, 52.2],
87
+ [159.0, 48.6], [162.8, 57.8], [159.0, 55.6], [179.8, 66.8], [162.9, 59.4],
88
+ [161.0, 53.6], [151.1, 73.2], [168.2, 53.4], [168.9, 69.0], [173.2, 58.4],
89
+ [171.8, 56.2], [178.0, 70.6], [164.3, 59.8], [163.0, 72.0], [168.5, 65.2],
90
+ [166.8, 56.6], [172.7, 105.2], [163.5, 51.8], [169.4, 63.4], [167.8, 59.0],
91
+ [159.5, 47.6], [167.6, 63.0], [161.2, 55.2], [160.0, 45.0], [163.2, 54.0],
92
+ [162.2, 50.2], [161.3, 60.2], [149.5, 44.8], [157.5, 58.8], [163.2, 56.4],
93
+ [172.7, 62.0], [155.0, 49.2], [156.5, 67.2], [164.0, 53.8], [160.9, 54.4],
94
+ [162.8, 58.0], [167.0, 59.8], [160.0, 54.8], [160.0, 43.2], [168.9, 60.5],
95
+ [158.2, 46.4], [156.0, 64.4], [160.0, 48.8], [167.1, 62.2], [158.0, 55.5],
96
+ [167.6, 57.8], [156.0, 54.6], [162.1, 59.2], [173.4, 52.7], [159.8, 53.2],
97
+ [170.5, 64.5], [159.2, 51.8], [157.5, 56.0], [161.3, 63.6], [162.6, 63.2],
98
+ [160.0, 59.5], [168.9, 56.8], [165.1, 64.1], [162.6, 50.0], [165.1, 72.3],
99
+ [166.4, 55.0], [160.0, 55.9], [152.4, 60.4], [170.2, 69.1], [162.6, 84.5],
100
+ [170.2, 55.9], [158.8, 55.5], [172.7, 69.5], [167.6, 76.4], [162.6, 61.4],
101
+ [167.6, 65.9], [156.2, 58.6], [175.2, 66.8], [172.1, 56.6], [162.6, 58.6],
102
+ [160.0, 55.9], [165.1, 59.1], [182.9, 81.8], [166.4, 70.7], [165.1, 56.8],
103
+ [177.8, 60.0], [165.1, 58.2], [175.3, 72.7], [154.9, 54.1], [158.8, 49.1],
104
+ [172.7, 75.9], [168.9, 55.0], [161.3, 57.3], [167.6, 55.0], [165.1, 65.5],
105
+ [175.3, 65.5], [157.5, 48.6], [163.8, 58.6], [167.6, 63.6], [165.1, 55.2],
106
+ [165.1, 62.7], [168.9, 56.6], [162.6, 53.9], [164.5, 63.2], [176.5, 73.6],
107
+ [168.9, 62.0], [175.3, 63.6], [159.4, 53.2], [160.0, 53.4], [170.2, 55.0],
108
+ [162.6, 70.5], [167.6, 54.5], [162.6, 54.5], [160.7, 55.9], [160.0, 59.0],
109
+ [157.5, 63.6], [162.6, 54.5], [152.4, 47.3], [170.2, 67.7], [165.1, 80.9],
110
+ [172.7, 70.5], [165.1, 60.9], [170.2, 63.6], [170.2, 54.5], [170.2, 59.1],
111
+ [161.3, 70.5], [167.6, 52.7], [167.6, 62.7], [165.1, 86.3], [162.6, 66.4],
112
+ [152.4, 67.3], [168.9, 63.0], [170.2, 73.6], [175.2, 62.3], [175.2, 57.7],
113
+ [160.0, 55.4], [165.1, 104.1], [174.0, 55.5], [170.2, 77.3], [160.0, 80.5],
114
+ [167.6, 64.5], [167.6, 72.3], [167.6, 61.4], [154.9, 58.2], [162.6, 81.8],
115
+ [175.3, 63.6], [171.4, 53.4], [157.5, 54.5], [165.1, 53.6], [160.0, 60.0],
116
+ [174.0, 73.6], [162.6, 61.4], [174.0, 55.5], [162.6, 63.6], [161.3, 60.9],
117
+ [156.2, 60.0], [149.9, 46.8], [169.5, 57.3], [160.0, 64.1], [175.3, 63.6],
118
+ [169.5, 67.3], [160.0, 75.5], [172.7, 68.2], [162.6, 61.4], [157.5, 76.8],
119
+ [176.5, 71.8], [164.4, 55.5], [160.7, 48.6], [174.0, 66.4], [163.8, 67.3]
120
+ ],
121
+ markPoint : {
122
+ data : [
123
+ {type : 'max', name: '最大值'},
124
+ {type : 'min', name: '最小值'}
125
+ ]
126
+ },
127
+ markLine : {
128
+ data : [
129
+ {type : 'average', name: '平均值'}
130
+ ]
131
+ }
132
+ },
133
+ {
134
+ name:'男性',
135
+ type:'scatter',
136
+ data: [[174.0, 65.6], [175.3, 71.8], [193.5, 80.7], [186.5, 72.6], [187.2, 78.8],
137
+ [181.5, 74.8], [184.0, 86.4], [184.5, 78.4], [175.0, 62.0], [184.0, 81.6],
138
+ [180.0, 76.6], [177.8, 83.6], [192.0, 90.0], [176.0, 74.6], [174.0, 71.0],
139
+ [184.0, 79.6], [192.7, 93.8], [171.5, 70.0], [173.0, 72.4], [176.0, 85.9],
140
+ [176.0, 78.8], [180.5, 77.8], [172.7, 66.2], [176.0, 86.4], [173.5, 81.8],
141
+ [178.0, 89.6], [180.3, 82.8], [180.3, 76.4], [164.5, 63.2], [173.0, 60.9],
142
+ [183.5, 74.8], [175.5, 70.0], [188.0, 72.4], [189.2, 84.1], [172.8, 69.1],
143
+ [170.0, 59.5], [182.0, 67.2], [170.0, 61.3], [177.8, 68.6], [184.2, 80.1],
144
+ [186.7, 87.8], [171.4, 84.7], [172.7, 73.4], [175.3, 72.1], [180.3, 82.6],
145
+ [182.9, 88.7], [188.0, 84.1], [177.2, 94.1], [172.1, 74.9], [167.0, 59.1],
146
+ [169.5, 75.6], [174.0, 86.2], [172.7, 75.3], [182.2, 87.1], [164.1, 55.2],
147
+ [163.0, 57.0], [171.5, 61.4], [184.2, 76.8], [174.0, 86.8], [174.0, 72.2],
148
+ [177.0, 71.6], [186.0, 84.8], [167.0, 68.2], [171.8, 66.1], [182.0, 72.0],
149
+ [167.0, 64.6], [177.8, 74.8], [164.5, 70.0], [192.0, 101.6], [175.5, 63.2],
150
+ [171.2, 79.1], [181.6, 78.9], [167.4, 67.7], [181.1, 66.0], [177.0, 68.2],
151
+ [174.5, 63.9], [177.5, 72.0], [170.5, 56.8], [182.4, 74.5], [197.1, 90.9],
152
+ [180.1, 93.0], [175.5, 80.9], [180.6, 72.7], [184.4, 68.0], [175.5, 70.9],
153
+ [180.6, 72.5], [177.0, 72.5], [177.1, 83.4], [181.6, 75.5], [176.5, 73.0],
154
+ [175.0, 70.2], [174.0, 73.4], [165.1, 70.5], [177.0, 68.9], [192.0, 102.3],
155
+ [176.5, 68.4], [169.4, 65.9], [182.1, 75.7], [179.8, 84.5], [175.3, 87.7],
156
+ [184.9, 86.4], [177.3, 73.2], [167.4, 53.9], [178.1, 72.0], [168.9, 55.5],
157
+ [157.2, 58.4], [180.3, 83.2], [170.2, 72.7], [177.8, 64.1], [172.7, 72.3],
158
+ [165.1, 65.0], [186.7, 86.4], [165.1, 65.0], [174.0, 88.6], [175.3, 84.1],
159
+ [185.4, 66.8], [177.8, 75.5], [180.3, 93.2], [180.3, 82.7], [177.8, 58.0],
160
+ [177.8, 79.5], [177.8, 78.6], [177.8, 71.8], [177.8, 116.4], [163.8, 72.2],
161
+ [188.0, 83.6], [198.1, 85.5], [175.3, 90.9], [166.4, 85.9], [190.5, 89.1],
162
+ [166.4, 75.0], [177.8, 77.7], [179.7, 86.4], [172.7, 90.9], [190.5, 73.6],
163
+ [185.4, 76.4], [168.9, 69.1], [167.6, 84.5], [175.3, 64.5], [170.2, 69.1],
164
+ [190.5, 108.6], [177.8, 86.4], [190.5, 80.9], [177.8, 87.7], [184.2, 94.5],
165
+ [176.5, 80.2], [177.8, 72.0], [180.3, 71.4], [171.4, 72.7], [172.7, 84.1],
166
+ [172.7, 76.8], [177.8, 63.6], [177.8, 80.9], [182.9, 80.9], [170.2, 85.5],
167
+ [167.6, 68.6], [175.3, 67.7], [165.1, 66.4], [185.4, 102.3], [181.6, 70.5],
168
+ [172.7, 95.9], [190.5, 84.1], [179.1, 87.3], [175.3, 71.8], [170.2, 65.9],
169
+ [193.0, 95.9], [171.4, 91.4], [177.8, 81.8], [177.8, 96.8], [167.6, 69.1],
170
+ [167.6, 82.7], [180.3, 75.5], [182.9, 79.5], [176.5, 73.6], [186.7, 91.8],
171
+ [188.0, 84.1], [188.0, 85.9], [177.8, 81.8], [174.0, 82.5], [177.8, 80.5],
172
+ [171.4, 70.0], [185.4, 81.8], [185.4, 84.1], [188.0, 90.5], [188.0, 91.4],
173
+ [182.9, 89.1], [176.5, 85.0], [175.3, 69.1], [175.3, 73.6], [188.0, 80.5],
174
+ [188.0, 82.7], [175.3, 86.4], [170.5, 67.7], [179.1, 92.7], [177.8, 93.6],
175
+ [175.3, 70.9], [182.9, 75.0], [170.8, 93.2], [188.0, 93.2], [180.3, 77.7],
176
+ [177.8, 61.4], [185.4, 94.1], [168.9, 75.0], [185.4, 83.6], [180.3, 85.5],
177
+ [174.0, 73.9], [167.6, 66.8], [182.9, 87.3], [160.0, 72.3], [180.3, 88.6],
178
+ [167.6, 75.5], [186.7, 101.4], [175.3, 91.1], [175.3, 67.3], [175.9, 77.7],
179
+ [175.3, 81.8], [179.1, 75.5], [181.6, 84.5], [177.8, 76.6], [182.9, 85.0],
180
+ [177.8, 102.5], [184.2, 77.3], [179.1, 71.8], [176.5, 87.9], [188.0, 94.3],
181
+ [174.0, 70.9], [167.6, 64.5], [170.2, 77.3], [167.6, 72.3], [188.0, 87.3],
182
+ [174.0, 80.0], [176.5, 82.3], [180.3, 73.6], [167.6, 74.1], [188.0, 85.9],
183
+ [180.3, 73.2], [167.6, 76.3], [183.0, 65.9], [183.0, 90.9], [179.1, 89.1],
184
+ [170.2, 62.3], [177.8, 82.7], [179.1, 79.1], [190.5, 98.2], [177.8, 84.1],
185
+ [180.3, 83.2], [180.3, 83.2]
186
+ ],
187
+ markPoint : {
188
+ data : [
189
+ {type : 'max', name: '最大值'},
190
+ {type : 'min', name: '最小值'}
191
+ ]
192
+ },
193
+ markLine : {
194
+ data : [
195
+ {type : 'average', name: '平均值'}
196
+ ]
197
+ }
198
+ }
199
+ ]
200
+ }]
201
+ };
@@ -0,0 +1,65 @@
1
+ <!DOCTYPE html>
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
+
22
+ <html lang="en">
23
+ <head>
24
+ <meta charset="UTF-8">
25
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
26
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
27
+ <script src="../../dist/echarts.js"></script>
28
+ <script src="../../map/js/china.js"></script>
29
+ </head>
30
+ <body>
31
+ <style>
32
+ body {
33
+ margin: 0;
34
+ }
35
+ </style>
36
+ <div id="main"></div>
37
+ <script type="module">
38
+ import bar from './option/bar';
39
+ import area from './option/area';
40
+ import scatter from './option/scatter';
41
+ import pie from './option/pie';
42
+ import graph from './option/graph';
43
+ import map from './option/map';
44
+
45
+ let options = [bar, area, scatter, pie, graph, map];
46
+ let mainDiv = document.querySelector('#main');
47
+
48
+ let theme = window.location.hash.slice(1);
49
+
50
+ let scriptTag = document.createElement('script');
51
+ scriptTag.src = '../' + theme + '.js';
52
+ scriptTag.onload = function () {
53
+ options.forEach(option => {
54
+ let div = document.createElement('div');
55
+ mainDiv.appendChild(div);
56
+ div.style.cssText = 'float:left;width:50%;height:400px';
57
+ let chart = echarts.init(div, theme);
58
+ option.animation = false;
59
+ chart.setOption(option);
60
+ });
61
+ }
62
+ document.body.appendChild(scriptTag);
63
+ </script>
64
+ </body>
65
+ </html>
@@ -0,0 +1,63 @@
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
+ const glob = require('glob');
21
+ const puppeteer = require('puppeteer');
22
+ const fs = require('fs');
23
+ const path = require('path');
24
+
25
+ async function wait(time) {
26
+ return new Promise(resolve => {
27
+ setTimeout(resolve, time);
28
+ });
29
+ }
30
+
31
+ async function snapshot(browser, themePath) {
32
+ let themeName = path.basename(themePath, '.js');
33
+ let code = fs.readFileSync(themePath, 'utf-8');
34
+
35
+ let page = await browser.newPage();
36
+ await page.evaluateOnNewDocument(code);
37
+ await page.setViewport({ width: 1200, height: 1200 });
38
+ try {
39
+ await page.goto('http://localhost/echarts/theme/tool/thumb.html#' + themeName);
40
+ await wait(200);
41
+ await page.screenshot({ path: __dirname + '/../thumb/' + themeName + '.png' });
42
+ }
43
+ catch (e) {
44
+ console.log(e);
45
+ }
46
+ await page.close();
47
+
48
+ console.log('Updated ' + themeName);
49
+ }
50
+
51
+ glob('../*.js', async function (err, themePathList) {
52
+
53
+ let browser = await puppeteer.launch();
54
+ for (let themePath of themePathList) {
55
+ try {
56
+ await snapshot(browser, themePath);
57
+ }
58
+ catch(e) {
59
+ console.log(e);
60
+ }
61
+ }
62
+ await browser.close();
63
+ });
@@ -31,7 +31,7 @@
31
31
  // Browser globals
32
32
  factory({}, root.echarts);
33
33
  }
34
- })(window, function(exports, echarts) {
34
+ })(this, function(exports, echarts) {
35
35
  var log = function(msg) {
36
36
  if (typeof console !== 'undefined') {
37
37
  console && console.error && console.error(msg);