Commit ba8a55d2 by BellCodeEditor

save project

parent 58b989bd
Showing with 19 additions and 16 deletions
......@@ -3,6 +3,6 @@ from pyecharts.charts import Bar
subjects = ["语文","数学","英语","地理","历史","政治","生物","化学","物理"]
scores = [88, 95, 96, 94, 62, 66, 64, 93, 89]
bar=Bar()
bar.add_xaxis(["语文","数学","英语","地理","历史","政治","生物","化学","物理"])
bar.add_yaxis("成绩",[88, 95, 96, 94, 62, 66, 64, 93, 89])
bar.add_xaxis(subjects)
bar.add_yaxis("成绩",[scores])
bar.render()
\ No newline at end of file
......@@ -7,11 +7,11 @@
</head>
<body>
<div id="1c81bff498e347fb84a3d744c64358b5" class="chart-container" style="width:900px; height:500px;"></div>
<div id="78ccb77dcce449bf88f746f0d68ee2e5" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_1c81bff498e347fb84a3d744c64358b5 = echarts.init(
document.getElementById('1c81bff498e347fb84a3d744c64358b5'), 'white', {renderer: 'canvas'});
var option_1c81bff498e347fb84a3d744c64358b5 = {
var chart_78ccb77dcce449bf88f746f0d68ee2e5 = echarts.init(
document.getElementById('78ccb77dcce449bf88f746f0d68ee2e5'), 'white', {renderer: 'canvas'});
var option_78ccb77dcce449bf88f746f0d68ee2e5 = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
......@@ -52,15 +52,17 @@
"name": "\u6210\u7ee9",
"legendHoverLink": true,
"data": [
88,
95,
96,
94,
62,
66,
64,
93,
89
[
88,
95,
96,
94,
62,
66,
64,
93,
89
]
],
"showBackground": false,
"barMinHeight": 0,
......@@ -165,7 +167,7 @@
}
]
};
chart_1c81bff498e347fb84a3d744c64358b5.setOption(option_1c81bff498e347fb84a3d744c64358b5);
chart_78ccb77dcce449bf88f746f0d68ee2e5.setOption(option_78ccb77dcce449bf88f746f0d68ee2e5);
</script>
</body>
</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