Commit d4790661 by BellCodeEditor

auto save

parent 0fee699d
Showing with 14 additions and 12 deletions
...@@ -3,8 +3,10 @@ from pyecharts.charts import Bar ...@@ -3,8 +3,10 @@ from pyecharts.charts import Bar
subjects = ["浈浈", "聪聪", "小智", "波奇"] subjects = ["浈浈", "聪聪", "小智", "波奇"]
scores1 = [92, 95, 82, 88] # 期中成绩 scores1 = [92, 95, 82, 88] # 期中成绩
scores2 = [95, 79, 93, 90] # 期末成绩 scores2 = [95, 79, 93, 90] # 期末成绩
bar = Bar() line = Line()
bar.add_xaxis(subjects) line.add_xaxis(x)
bar.add_yaxis("期中成绩",scores1,bar_width=40) line.add_yaxis("降水量",x)
bar.add_yaxis("期末成绩",scores2,bar_width=40) line.add_yaxis("蒸发量",y)
bar.render("成绩分析.html") line.render("降雨量分析.html")
\ No newline at end of file line.set_gwbal(_opts(title_opts=
{"test":"","","subtest":"单位:毫米"}
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="d77a1bdf4e3c46fc836c7fde8b1b45ce" class="chart-container" style="width:900px; height:500px;"></div> <div id="91cf11eaf2fe4c2d80fe839950abc806" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_d77a1bdf4e3c46fc836c7fde8b1b45ce = echarts.init( var chart_91cf11eaf2fe4c2d80fe839950abc806 = echarts.init(
document.getElementById('d77a1bdf4e3c46fc836c7fde8b1b45ce'), 'white', {renderer: 'canvas'}); document.getElementById('91cf11eaf2fe4c2d80fe839950abc806'), 'white', {renderer: 'canvas'});
var option_d77a1bdf4e3c46fc836c7fde8b1b45ce = { var option_91cf11eaf2fe4c2d80fe839950abc806 = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
} }
] ]
}; };
chart_d77a1bdf4e3c46fc836c7fde8b1b45ce.setOption(option_d77a1bdf4e3c46fc836c7fde8b1b45ce); chart_91cf11eaf2fe4c2d80fe839950abc806.setOption(option_91cf11eaf2fe4c2d80fe839950abc806);
</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