Commit 41ca6e12 by BellCodeEditor

save project

parent a634ecf0
Showing with 79 additions and 11 deletions
...@@ -3,11 +3,19 @@ from pyecharts.charts import Bar ...@@ -3,11 +3,19 @@ from pyecharts.charts import Bar
name = ["浈浈", "聪聪", "小智", "波奇"] name = ["浈浈", "聪聪", "小智", "波奇"]
s1 = [92, 95, 82, 88] # 期中成绩 s1 = [92, 95, 82, 88] # 期中成绩
s2 = [95, 79, 93, 90] # 期末成绩 s2 = [95, 79, 93, 90] # 期末成绩
s3 = [55, 89, 33, 10]
s4 = [65, 73, 13, 50]
bar = Bar() bar = Bar()
bar.add_xaxis(name) bar.add_xaxis(name)
bar.add_yaxis('七种成鸡',s1,bar_width=40) bar.add_yaxis('七种成鸡',s1,bar_width=20)
bar.add_yaxis('七摸成鸡',s2,bar_width=40) bar.add_yaxis('七摸成鸡',s2,bar_width=20)
bar.add_yaxis('七tian==成鸡',s3,bar_width=20)
bar.add_yaxis('七askdja成鸡',s4,bar_width=20)
bar.render() bar.render()
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="dcdea365b01a41d49ddc450866ee4015" class="chart-container" style="width:900px; height:500px;"></div> <div id="f7044b1e42304152a555f89d19bda34f" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_dcdea365b01a41d49ddc450866ee4015 = echarts.init( var chart_f7044b1e42304152a555f89d19bda34f = echarts.init(
document.getElementById('dcdea365b01a41d49ddc450866ee4015'), 'white', {renderer: 'canvas'}); document.getElementById('f7044b1e42304152a555f89d19bda34f'), 'white', {renderer: 'canvas'});
var option_dcdea365b01a41d49ddc450866ee4015 = { var option_f7044b1e42304152a555f89d19bda34f = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
88 88
], ],
"showBackground": false, "showBackground": false,
"barWidth": 40, "barWidth": 20,
"barMinHeight": 0, "barMinHeight": 0,
"barCategoryGap": "20%", "barCategoryGap": "20%",
"barGap": "30%", "barGap": "30%",
...@@ -86,7 +86,63 @@ ...@@ -86,7 +86,63 @@
90 90
], ],
"showBackground": false, "showBackground": false,
"barWidth": 40, "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,
"position": "top",
"margin": 8
}
},
{
"type": "bar",
"name": "\u4e03tian==\u6210\u9e21",
"legendHoverLink": true,
"data": [
55,
89,
33,
10
],
"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,
"position": "top",
"margin": 8
}
},
{
"type": "bar",
"name": "\u4e03askdja\u6210\u9e21",
"legendHoverLink": true,
"data": [
65,
73,
13,
50
],
"showBackground": false,
"barWidth": 20,
"barMinHeight": 0, "barMinHeight": 0,
"barCategoryGap": "20%", "barCategoryGap": "20%",
"barGap": "30%", "barGap": "30%",
...@@ -108,11 +164,15 @@ ...@@ -108,11 +164,15 @@
{ {
"data": [ "data": [
"\u4e03\u79cd\u6210\u9e21", "\u4e03\u79cd\u6210\u9e21",
"\u4e03\u6478\u6210\u9e21" "\u4e03\u6478\u6210\u9e21",
"\u4e03tian==\u6210\u9e21",
"\u4e03askdja\u6210\u9e21"
], ],
"selected": { "selected": {
"\u4e03\u79cd\u6210\u9e21": true, "\u4e03\u79cd\u6210\u9e21": true,
"\u4e03\u6478\u6210\u9e21": true "\u4e03\u6478\u6210\u9e21": true,
"\u4e03tian==\u6210\u9e21": true,
"\u4e03askdja\u6210\u9e21": true
} }
} }
], ],
...@@ -186,7 +246,7 @@ ...@@ -186,7 +246,7 @@
} }
] ]
}; };
chart_dcdea365b01a41d49ddc450866ee4015.setOption(option_dcdea365b01a41d49ddc450866ee4015); chart_f7044b1e42304152a555f89d19bda34f.setOption(option_f7044b1e42304152a555f89d19bda34f);
</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