Commit 668ad58c by BellCodeEditor

auto save

parent c2010afc
Showing with 14 additions and 11 deletions
from pyecharts.charts import Bar from pyecharts.charts import Bar
subjects = ["浈浈", "聪聪", "小智", "波奇"] subjects = ["浈浈", "聪聪", "小智", "波奇","只因"]
scores1 = [92, 95, 82, 88] # 期中成绩 scores1 = [92, 95, 82, 88,0] # 期中成绩
scores2 = [95, 79, 93, 90] # 期末成绩 scores2 = [95, 79, 93, 90,100000] # 期末成绩
b=Bar() b=Bar()
b.add_xaxis(subjects) b.add_xaxis(subjects)
b.add_yaxis("期中成绩",scores1,bar_width=40) b.add_yaxis("期中成绩",scores1,bar_width=40)
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="62df6b8f55674ee6b9319591187c277e" class="chart-container" style="width:900px; height:500px;"></div> <div id="6d52888be1d4442782c90cb4c11da2c0" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_62df6b8f55674ee6b9319591187c277e = echarts.init( var chart_6d52888be1d4442782c90cb4c11da2c0 = echarts.init(
document.getElementById('62df6b8f55674ee6b9319591187c277e'), 'white', {renderer: 'canvas'}); document.getElementById('6d52888be1d4442782c90cb4c11da2c0'), 'white', {renderer: 'canvas'});
var option_62df6b8f55674ee6b9319591187c277e = { var option_6d52888be1d4442782c90cb4c11da2c0 = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -55,7 +55,8 @@ ...@@ -55,7 +55,8 @@
92, 92,
95, 95,
82, 82,
88 88,
0
], ],
"showBackground": false, "showBackground": false,
"barWidth": 40, "barWidth": 40,
...@@ -83,7 +84,8 @@ ...@@ -83,7 +84,8 @@
95, 95,
79, 79,
93, 93,
90 90,
100000
], ],
"showBackground": false, "showBackground": false,
"barWidth": 40, "barWidth": 40,
...@@ -158,7 +160,8 @@ ...@@ -158,7 +160,8 @@
"\u6d48\u6d48", "\u6d48\u6d48",
"\u806a\u806a", "\u806a\u806a",
"\u5c0f\u667a", "\u5c0f\u667a",
"\u6ce2\u5947" "\u6ce2\u5947",
"\u53ea\u56e0"
] ]
} }
], ],
...@@ -186,7 +189,7 @@ ...@@ -186,7 +189,7 @@
} }
] ]
}; };
chart_62df6b8f55674ee6b9319591187c277e.setOption(option_62df6b8f55674ee6b9319591187c277e); chart_6d52888be1d4442782c90cb4c11da2c0.setOption(option_6d52888be1d4442782c90cb4c11da2c0);
</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