Commit b1761656 by BellCodeEditor

save project

parent b313faa5
Showing with 19 additions and 10 deletions
from pyecharts.charts import Bar from pyecharts.charts import Bar
bar=Bar() bar=Bar()
bar.add_xaxis(["浈浈", "聪聪", "小智", "波奇"]) bar.add_xaxis(["1月", "2月", "3月", "4月","5月","6月","7月","8月","9月","10月","11月","12月"])
bar.add_yaxis("期中成绩",[92, 95, 82, 88],) # 期中成绩 bar.add_yaxis("期中成绩",[92, 95, 82, 88],) # 期中成绩
bar.add_yaxis("期末成绩",[95, 79, 93, 90]) # 期末成绩 bar.add_yaxis("期末成绩",[95, 79, 93, 90]) # 期末成绩
bar.render() bar.render()
\ No newline at end of file
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="f8a1d9bacc3b42d7be8244e701dc5af4" class="chart-container" style="width:900px; height:500px;"></div> <div id="8a4337ff120e45739f582154610d7946" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_f8a1d9bacc3b42d7be8244e701dc5af4 = echarts.init( var chart_8a4337ff120e45739f582154610d7946 = echarts.init(
document.getElementById('f8a1d9bacc3b42d7be8244e701dc5af4'), 'white', {renderer: 'canvas'}); document.getElementById('8a4337ff120e45739f582154610d7946'), 'white', {renderer: 'canvas'});
var option_f8a1d9bacc3b42d7be8244e701dc5af4 = { var option_8a4337ff120e45739f582154610d7946 = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -153,10 +153,18 @@ ...@@ -153,10 +153,18 @@
} }
}, },
"data": [ "data": [
"\u6d48\u6d48", "1\u6708",
"\u806a\u806a", "2\u6708",
"\u5c0f\u667a", "3\u6708",
"\u6ce2\u5947" "4\u6708",
"5\u6708",
"6\u6708",
"7\u6708",
"8\u6708",
"9\u6708",
"10\u6708",
"11\u6708",
"12\u6708"
] ]
} }
], ],
...@@ -184,7 +192,7 @@ ...@@ -184,7 +192,7 @@
} }
] ]
}; };
chart_f8a1d9bacc3b42d7be8244e701dc5af4.setOption(option_f8a1d9bacc3b42d7be8244e701dc5af4); chart_8a4337ff120e45739f582154610d7946.setOption(option_8a4337ff120e45739f582154610d7946);
</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