Commit cfd0d642 by BellCodeEditor

save project

parent b15ddd8a
Showing with 12 additions and 12 deletions
from pyecharts.charts import Line
from pyecharts.charts import Bar
subjects = ["浈浈", "聪聪", "小智", "波奇"]
scores1 = [92, 95, 82, 88] # 期中成绩
scores2 = [95, 79, 93, 90] # 期末成绩
line=Line()
line.add_xaxis(subjects)
line.add_yaxis(scores1)
line.add_yaxis(scores2)
line.render("render.html")
\ No newline at end of file
bar=Bar()
bar.add_xaxis(subjects)
bar.add_yaxis("期中",scores1,bar_width=40)
bar.add_yaxis("期末",scores2,bar_width=40)
bar.render("render.html")
\ No newline at end of file
......@@ -7,11 +7,11 @@
</head>
<body>
<div id="a1e6ff8353c64bdeb70841dcfb78c997" class="chart-container" style="width:900px; height:500px;"></div>
<div id="e7dcda64c7b8409681ad45b38f5bd30f" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_a1e6ff8353c64bdeb70841dcfb78c997 = echarts.init(
document.getElementById('a1e6ff8353c64bdeb70841dcfb78c997'), 'white', {renderer: 'canvas'});
var option_a1e6ff8353c64bdeb70841dcfb78c997 = {
var chart_e7dcda64c7b8409681ad45b38f5bd30f = echarts.init(
document.getElementById('e7dcda64c7b8409681ad45b38f5bd30f'), 'white', {renderer: 'canvas'});
var option_e7dcda64c7b8409681ad45b38f5bd30f = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
......@@ -186,7 +186,7 @@
}
]
};
chart_a1e6ff8353c64bdeb70841dcfb78c997.setOption(option_a1e6ff8353c64bdeb70841dcfb78c997);
chart_e7dcda64c7b8409681ad45b38f5bd30f.setOption(option_e7dcda64c7b8409681ad45b38f5bd30f);
</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