Commit 83e289c5 by BellCodeEditor

save project

parent aefdd0f8
Showing with 18 additions and 15 deletions
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="23af9850c270401988ed035f2883b891" class="chart-container" style="width:900px; height:500px;"></div> <div id="141941ff109d4b4db0300509a1713bd2" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_23af9850c270401988ed035f2883b891 = echarts.init( var chart_141941ff109d4b4db0300509a1713bd2 = echarts.init(
document.getElementById('23af9850c270401988ed035f2883b891'), 'white', {renderer: 'canvas'}); document.getElementById('141941ff109d4b4db0300509a1713bd2'), 'white', {renderer: 'canvas'});
var option_23af9850c270401988ed035f2883b891 = { var option_141941ff109d4b4db0300509a1713bd2 = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
} }
] ]
}; };
chart_23af9850c270401988ed035f2883b891.setOption(option_23af9850c270401988ed035f2883b891); chart_141941ff109d4b4db0300509a1713bd2.setOption(option_141941ff109d4b4db0300509a1713bd2);
</script> </script>
</body> </body>
</html> </html>
from pyecharts.charts import Bar from pyecharts.charts import Line
subjects = ["浈浈", "聪聪", "小智", "波奇"] text = ["1","2","3","4","5","6","7","8","9","10"]
scores1 = [92, 95, 82, 88] # 期中成绩 student1 = [112,110,118,124,132,136,144,143]
scores2 = [95, 79, 93, 90] # 期末成绩 student2 = [128,131,132,129,130,127,129,123]
bar=Bar() student3 = [145,134,121,133,154,131,132,134]
bar.add_xaxis(subjects) Line=Line()
bar.add_yaxis("期中成绩",scores1,bar_width=40) line.add_xaxis(test)
bar.add_yaxis("期末成绩",scores2,bar_width=40) line.add_yaxis("聪聪",student1)
bar.render('asd.html') line.add_yaxis("小杰",student2)
\ No newline at end of file line.add_yaxis("皮皮",student3)
line.set_jlobal_opts(title_opts={"text":"成绩走势图","stutext":"高524班数学"})
line.render("a.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