Commit 27422571 by BellCodeEditor

auto save

parent 855212c3
Showing with 15 additions and 15 deletions
from pyecharts.charts import Bar from pyecharts.charts import Bar
subjects = ["浈浈", "聪聪", "小智", "波奇"] subjects = ["浈浈", "聪聪", "小智", "波奇"]
scores1 = [92, 95, 82, 88] # 期中成绩 scores1 =[222222, 952228888888888888888888888888888888888888888888888888888888888888888888888888888888888888889, 82222, 111107] # 期中成绩
scores2 = [95, 79, 93, 90] # 期末成绩 scores2 = [229588, 333333, 93222,999900] # 期末成绩
a=Bar() a=Bar()
a.add_xaxis(subjects) a.add_xaxis(subjects)
a.add_yaxis('期中成绩',scores1,bar_width=40) a.add_yaxis('期中成绩',scores1,bar_width=40)
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="ae1bb98938e14492ad6b8511aadf4e4b" class="chart-container" style="width:900px; height:500px;"></div> <div id="681aa48adfb5451f98a0b46f482d62b0" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_ae1bb98938e14492ad6b8511aadf4e4b = echarts.init( var chart_681aa48adfb5451f98a0b46f482d62b0 = echarts.init(
document.getElementById('ae1bb98938e14492ad6b8511aadf4e4b'), 'white', {renderer: 'canvas'}); document.getElementById('681aa48adfb5451f98a0b46f482d62b0'), 'white', {renderer: 'canvas'});
var option_ae1bb98938e14492ad6b8511aadf4e4b = { var option_681aa48adfb5451f98a0b46f482d62b0 = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -52,10 +52,10 @@ ...@@ -52,10 +52,10 @@
"name": "\u671f\u4e2d\u6210\u7ee9", "name": "\u671f\u4e2d\u6210\u7ee9",
"legendHoverLink": true, "legendHoverLink": true,
"data": [ "data": [
92, 222222,
95, 952229,
82, 82222,
88 111107
], ],
"showBackground": false, "showBackground": false,
"barWidth": 40, "barWidth": 40,
...@@ -80,10 +80,10 @@ ...@@ -80,10 +80,10 @@
"name": "\u671f\u672b\u6210\u7ee9", "name": "\u671f\u672b\u6210\u7ee9",
"legendHoverLink": true, "legendHoverLink": true,
"data": [ "data": [
95, 229588,
79, 333333,
93, 93222,
90 999900
], ],
"showBackground": false, "showBackground": false,
"barWidth": 40, "barWidth": 40,
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
} }
] ]
}; };
chart_ae1bb98938e14492ad6b8511aadf4e4b.setOption(option_ae1bb98938e14492ad6b8511aadf4e4b); chart_681aa48adfb5451f98a0b46f482d62b0.setOption(option_681aa48adfb5451f98a0b46f482d62b0);
</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