Commit a8e99e03 by BellCodeEditor

save project

parent ffa4f80f
Showing with 10 additions and 7 deletions
...@@ -5,6 +5,6 @@ scores1 = [92, 95, 82, 88] # 期中成绩 ...@@ -5,6 +5,6 @@ scores1 = [92, 95, 82, 88] # 期中成绩
scores2 = [95, 79, 93, 90] # 期末成绩 scores2 = [95, 79, 93, 90] # 期末成绩
bar=charts.Bar() bar=charts.Bar()
bar.add_xaxis(subjects) bar.add_xaxis(subjects)
bar.add_yaxis("期中成绩",scores1) bar.add_yaxis("期中成绩",scores1,bar_width=40)
bar.add_yaxis("期末成绩",scores2) bar.add_yaxis("期末成绩",scores2,bar_width=40)
bar.render() bar.render()
\ No newline at end of file
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="470107a16daf4ba589066f7cf81475fa" class="chart-container" style="width:900px; height:500px;"></div> <div id="bedbfd2d828e4d60a444996e8325e30f" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_470107a16daf4ba589066f7cf81475fa = echarts.init( var chart_bedbfd2d828e4d60a444996e8325e30f = echarts.init(
document.getElementById('470107a16daf4ba589066f7cf81475fa'), 'white', {renderer: 'canvas'}); document.getElementById('bedbfd2d828e4d60a444996e8325e30f'), 'white', {renderer: 'canvas'});
var option_470107a16daf4ba589066f7cf81475fa = { var option_bedbfd2d828e4d60a444996e8325e30f = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
88 88
], ],
"showBackground": false, "showBackground": false,
"barWidth": 40,
"barMinHeight": 0, "barMinHeight": 0,
"barCategoryGap": "20%", "barCategoryGap": "20%",
"barGap": "30%", "barGap": "30%",
...@@ -85,6 +86,7 @@ ...@@ -85,6 +86,7 @@
90 90
], ],
"showBackground": false, "showBackground": false,
"barWidth": 40,
"barMinHeight": 0, "barMinHeight": 0,
"barCategoryGap": "20%", "barCategoryGap": "20%",
"barGap": "30%", "barGap": "30%",
...@@ -184,7 +186,7 @@ ...@@ -184,7 +186,7 @@
} }
] ]
}; };
chart_470107a16daf4ba589066f7cf81475fa.setOption(option_470107a16daf4ba589066f7cf81475fa); chart_bedbfd2d828e4d60a444996e8325e30f.setOption(option_bedbfd2d828e4d60a444996e8325e30f);
</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