Commit 2902c9a3 by BellCodeEditor

save project

parent 637b6daf
Showing with 14 additions and 12 deletions
......@@ -7,11 +7,11 @@
</head>
<body>
<div id="2f2a760f4ae74cddaedc79dc8b0590f9" class="chart-container" style="width:900px; height:500px;"></div>
<div id="8e74337d4a054ec5b5e29de1b2e541da" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_2f2a760f4ae74cddaedc79dc8b0590f9 = echarts.init(
document.getElementById('2f2a760f4ae74cddaedc79dc8b0590f9'), 'white', {renderer: 'canvas'});
var option_2f2a760f4ae74cddaedc79dc8b0590f9 = {
var chart_8e74337d4a054ec5b5e29de1b2e541da = echarts.init(
document.getElementById('8e74337d4a054ec5b5e29de1b2e541da'), 'white', {renderer: 'canvas'});
var option_8e74337d4a054ec5b5e29de1b2e541da = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
......@@ -201,7 +201,7 @@
}
]
};
chart_2f2a760f4ae74cddaedc79dc8b0590f9.setOption(option_2f2a760f4ae74cddaedc79dc8b0590f9);
chart_8e74337d4a054ec5b5e29de1b2e541da.setOption(option_8e74337d4a054ec5b5e29de1b2e541da);
</script>
</body>
</html>
from pyecharts.charts import Bar
from pyecharts.charts import Line
subjects = ["语文","数学","英语","地理","历史","政治","生物","化学","物理"]
scores1 = [88, 95, 96, 94, 62, 66, 64, 93, 89]
scores2 = [88, 95, 96, 94, 62, 66, 64, 93, 89]
bar=Bar()
bar.add_xaxis(subjects)
bar.add_yaxis("期中",scores1,bar_width=40)
bar.add_yaxis("期末",scores2,bar_width=40)
bar.render("666.html")
\ No newline at end of file
scores3 = [88, 95, 96, 94, 62, 66, 64, 93, 89]
line=Line()
line.add_xaxis()
line.add_yaxis("聪聪",scores1)
line.add_yaxis("小杰",scores2)
line.add_yaxis("皮皮",scores3)
line.render("888.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