Commit 7f49e3f0 by BellCodeEditor

save project

parent 43ebbfcb
Showing with 18 additions and 20 deletions
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="2a51be0236f142f1825daba59cb5c199" class="chart-container" style="width:900px; height:500px;"></div> <div id="09dc5d43e641425e90a4deb6a0e9404a" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_2a51be0236f142f1825daba59cb5c199 = echarts.init( var chart_09dc5d43e641425e90a4deb6a0e9404a = echarts.init(
document.getElementById('2a51be0236f142f1825daba59cb5c199'), 'white', {renderer: 'canvas'}); document.getElementById('09dc5d43e641425e90a4deb6a0e9404a'), 'white', {renderer: 'canvas'});
var option_2a51be0236f142f1825daba59cb5c199 = { var option_09dc5d43e641425e90a4deb6a0e9404a = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -429,7 +429,7 @@ ...@@ -429,7 +429,7 @@
"subtext": "\u5355\u4f4d\uff1a\u4e2a" "subtext": "\u5355\u4f4d\uff1a\u4e2a"
} }
}; };
chart_2a51be0236f142f1825daba59cb5c199.setOption(option_2a51be0236f142f1825daba59cb5c199); chart_09dc5d43e641425e90a4deb6a0e9404a.setOption(option_09dc5d43e641425e90a4deb6a0e9404a);
</script> </script>
</body> </body>
</html> </html>
from pyecharts.charts import Line white open(r'C\Users\CM\Desktop\sales_list.txt''r,encoding='utf-8')as file
test = ["第1次","第2次","第3次","第4次","第5次","第6次","第7次","第8次","第9次","第10次"] a=file.readlines()
student1 = [5, 10, 88, 24, 89, 132, 136, 139, 144, 143] final_sun=[]
student2 = [8, 31, 32, 29, 90, 127, 129, 131, 132, 128] for i in a:
student3 = [3, 45, 40, 33, 134, 126, 121, 120, 114, 105] datea=i.split()
student4=[1,29,56,34,59,24,70,100,89,130] sum=0
bbbb=Line() for sales in date[1:]::
bbbb.add_xaxis(test) sum=sum+int(sales)
bbbb.add_yaxis("聪聪分数",student1) result=data[0]+str(sun)
bbbb.add_yaxis("小杰分数",student2) result=data[0]+str(sum)
bbbb.add_yaxis("皮皮分数",student3) frna_sum.append(result)
bbbb.add_yaxis("憨批分数",student4)
bbbb.set_global_opts(title_opts={"text":"打怪成绩","subtext":"单位:个"}) with open(r'C:\Users\CM\desktop\new_salist,txt''a,encoding="utf-8(as file:
bbbb.render("1234.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