Commit 7999fe28 by BellCodeEditor

save project

parent 41ca6e12
Showing with 216 additions and 216 deletions
from pyecharts.charts import Bar from pyecharts.charts import Line
name = ["浈浈", "聪聪", "小智", "波奇"] test = ["第1次","第2次","第3次","第4次","第5次","第6次","第7次","第8次","第9次","第10次"]
s1 = [92, 95, 82, 88] # 期中成绩 s1 = [112, 110, 118, 124, 129, 132, 136, 139, 144, 143] # 聪聪
s2 = [95, 79, 93, 90] # 期末成绩 s2 = [128, 131, 132, 129, 130, 127, 129, 131, 132, 128] # 小杰
s3 = [55, 89, 33, 10] s3 = [143, 145, 140, 133, 134, 126, 121, 120, 114, 105] # 皮皮
s4 = [65, 73, 13, 50] line=Line()
line.add_xaxis(test)
bar = Bar() line.add_yaxis('',s1)
bar.add_xaxis(name) line.add_yaxis('',s2)
bar.add_yaxis('七种成鸡',s1,bar_width=20) line.add_yaxis('',s3)
bar.add_yaxis('七摸成鸡',s2,bar_width=20) line.render()
bar.add_yaxis('七tian==成鸡',s3,bar_width=20) \ No newline at end of file
bar.add_yaxis('七askdja成鸡',s4,bar_width=20)
bar.render()
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="f7044b1e42304152a555f89d19bda34f" class="chart-container" style="width:900px; height:500px;"></div> <div id="d74393351e7e4e108d22d532639779ab" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_f7044b1e42304152a555f89d19bda34f = echarts.init( var chart_d74393351e7e4e108d22d532639779ab = echarts.init(
document.getElementById('f7044b1e42304152a555f89d19bda34f'), 'white', {renderer: 'canvas'}); document.getElementById('d74393351e7e4e108d22d532639779ab'), 'white', {renderer: 'canvas'});
var option_f7044b1e42304152a555f89d19bda34f = { var option_d74393351e7e4e108d22d532639779ab = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -48,131 +48,222 @@ ...@@ -48,131 +48,222 @@
], ],
"series": [ "series": [
{ {
"type": "bar", "type": "line",
"name": "\u4e03\u79cd\u6210\u9e21", "connectNulls": false,
"legendHoverLink": true, "symbolSize": 4,
"data": [ "showSymbol": true,
92, "smooth": false,
95,
82,
88
],
"showBackground": false,
"barWidth": 20,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
"large": false,
"largeThreshold": 400,
"seriesLayoutBy": "column",
"datasetIndex": 0,
"clip": true, "clip": true,
"zlevel": 0, "step": false,
"z": 2, "data": [
[
"\u7b2c1\u6b21",
112
],
[
"\u7b2c2\u6b21",
110
],
[
"\u7b2c3\u6b21",
118
],
[
"\u7b2c4\u6b21",
124
],
[
"\u7b2c5\u6b21",
129
],
[
"\u7b2c6\u6b21",
132
],
[
"\u7b2c7\u6b21",
136
],
[
"\u7b2c8\u6b21",
139
],
[
"\u7b2c9\u6b21",
144
],
[
"\u7b2c10\u6b21",
143
]
],
"hoverAnimation": true,
"label": { "label": {
"show": true, "show": true,
"position": "top", "position": "top",
"margin": 8 "margin": 8
}
}, },
{ "lineStyle": {
"type": "bar",
"name": "\u4e03\u6478\u6210\u9e21",
"legendHoverLink": true,
"data": [
95,
79,
93,
90
],
"showBackground": false,
"barWidth": 20,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
"large": false,
"largeThreshold": 400,
"seriesLayoutBy": "column",
"datasetIndex": 0,
"clip": true,
"zlevel": 0,
"z": 2,
"label": {
"show": true, "show": true,
"position": "top", "width": 1,
"margin": 8 "opacity": 1,
} "curveness": 0,
"type": "solid"
},
"areaStyle": {
"opacity": 0
},
"zlevel": 0,
"z": 0
}, },
{ {
"type": "bar", "type": "line",
"name": "\u4e03tian==\u6210\u9e21", "connectNulls": false,
"legendHoverLink": true, "symbolSize": 4,
"data": [ "showSymbol": true,
55, "smooth": false,
89,
33,
10
],
"showBackground": false,
"barWidth": 20,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
"large": false,
"largeThreshold": 400,
"seriesLayoutBy": "column",
"datasetIndex": 0,
"clip": true, "clip": true,
"zlevel": 0, "step": false,
"z": 2, "data": [
[
"\u7b2c1\u6b21",
128
],
[
"\u7b2c2\u6b21",
131
],
[
"\u7b2c3\u6b21",
132
],
[
"\u7b2c4\u6b21",
129
],
[
"\u7b2c5\u6b21",
130
],
[
"\u7b2c6\u6b21",
127
],
[
"\u7b2c7\u6b21",
129
],
[
"\u7b2c8\u6b21",
131
],
[
"\u7b2c9\u6b21",
132
],
[
"\u7b2c10\u6b21",
128
]
],
"hoverAnimation": true,
"label": { "label": {
"show": true, "show": true,
"position": "top", "position": "top",
"margin": 8 "margin": 8
} },
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
},
"areaStyle": {
"opacity": 0
},
"zlevel": 0,
"z": 0
}, },
{ {
"type": "bar", "type": "line",
"name": "\u4e03askdja\u6210\u9e21", "connectNulls": false,
"legendHoverLink": true, "symbolSize": 4,
"data": [ "showSymbol": true,
65, "smooth": false,
73,
13,
50
],
"showBackground": false,
"barWidth": 20,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
"large": false,
"largeThreshold": 400,
"seriesLayoutBy": "column",
"datasetIndex": 0,
"clip": true, "clip": true,
"zlevel": 0, "step": false,
"z": 2, "data": [
[
"\u7b2c1\u6b21",
143
],
[
"\u7b2c2\u6b21",
145
],
[
"\u7b2c3\u6b21",
140
],
[
"\u7b2c4\u6b21",
133
],
[
"\u7b2c5\u6b21",
134
],
[
"\u7b2c6\u6b21",
126
],
[
"\u7b2c7\u6b21",
121
],
[
"\u7b2c8\u6b21",
120
],
[
"\u7b2c9\u6b21",
114
],
[
"\u7b2c10\u6b21",
105
]
],
"hoverAnimation": true,
"label": { "label": {
"show": true, "show": true,
"position": "top", "position": "top",
"margin": 8 "margin": 8
} },
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
},
"areaStyle": {
"opacity": 0
},
"zlevel": 0,
"z": 0
} }
], ],
"legend": [ "legend": [
{ {
"data": [ "data": [
"\u4e03\u79cd\u6210\u9e21", "",
"\u4e03\u6478\u6210\u9e21", "",
"\u4e03tian==\u6210\u9e21", ""
"\u4e03askdja\u6210\u9e21"
], ],
"selected": { "selected": {
"\u4e03\u79cd\u6210\u9e21": true, "": true
"\u4e03\u6478\u6210\u9e21": true,
"\u4e03tian==\u6210\u9e21": true,
"\u4e03askdja\u6210\u9e21": true
} }
} }
], ],
...@@ -215,10 +306,16 @@ ...@@ -215,10 +306,16 @@
} }
}, },
"data": [ "data": [
"\u6d48\u6d48", "\u7b2c1\u6b21",
"\u806a\u806a", "\u7b2c2\u6b21",
"\u5c0f\u667a", "\u7b2c3\u6b21",
"\u6ce2\u5947" "\u7b2c4\u6b21",
"\u7b2c5\u6b21",
"\u7b2c6\u6b21",
"\u7b2c7\u6b21",
"\u7b2c8\u6b21",
"\u7b2c9\u6b21",
"\u7b2c10\u6b21"
] ]
} }
], ],
...@@ -246,7 +343,7 @@ ...@@ -246,7 +343,7 @@
} }
] ]
}; };
chart_f7044b1e42304152a555f89d19bda34f.setOption(option_f7044b1e42304152a555f89d19bda34f); chart_d74393351e7e4e108d22d532639779ab.setOption(option_d74393351e7e4e108d22d532639779ab);
</script> </script>
</body> </body>
</html> </html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment