Commit 0ad8c13c by BellCodeEditor

save project

parent 7177c579
Showing with 10 additions and 7 deletions
......@@ -7,11 +7,11 @@
</head>
<body>
<div id="615874541d5a4cb4b9c91ddafcee7fe6" class="chart-container" style="width:900px; height:500px;"></div>
<div id="62659f76498742c1902ab002f54243ad" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_615874541d5a4cb4b9c91ddafcee7fe6 = echarts.init(
document.getElementById('615874541d5a4cb4b9c91ddafcee7fe6'), 'white', {renderer: 'canvas'});
var option_615874541d5a4cb4b9c91ddafcee7fe6 = {
var chart_62659f76498742c1902ab002f54243ad = echarts.init(
document.getElementById('62659f76498742c1902ab002f54243ad'), 'white', {renderer: 'canvas'});
var option_62659f76498742c1902ab002f54243ad = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
......@@ -58,6 +58,7 @@
88
],
"showBackground": false,
"barWidth": 30,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
......@@ -85,6 +86,7 @@
90
],
"showBackground": false,
"barWidth": 30,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
......@@ -184,7 +186,7 @@
}
]
};
chart_615874541d5a4cb4b9c91ddafcee7fe6.setOption(option_615874541d5a4cb4b9c91ddafcee7fe6);
chart_62659f76498742c1902ab002f54243ad.setOption(option_62659f76498742c1902ab002f54243ad);
</script>
</body>
</html>
......@@ -3,8 +3,8 @@ bar=Bar()
subjects = ["浈浈", "聪聪", "小智", "波奇"]
scores1 = [92, 95, 82, 88] # 期中成绩
scores2 = [95, 79, 93, 90] # 期末成绩
bar.add_yaxis("期中成绩",scores1)
bar.add_yaxis("期末成绩",scores2)
bar.add_yaxis("期中成绩",scores1,bar_width=30)
bar.add_yaxis("期末成绩",scores2,bar_width=30)
bar.add_xaxis(subjects)
bar.render("11.html")
\ No newline at end of file
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