Commit ba8a55d2 by BellCodeEditor

save project

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