Commit 4631db3d by BellCodeEditor

auto save

parent b60f0cfc
Showing with 19 additions and 17 deletions
from pyecharts.charts import Bar from pyecharts.charts import Bar
subjects = ["语文","数学","英语","地理","历史","政治","生物","化学","物理"] subjects = ["语文","数学","英语","地理","历史","政治","生物","化学","物理","xxx"]
scores = [88, 95, 96, 94, 62, 66, 64, 93, 89] scores = [88000000, 95000000, 96000000, 94000000, 62000000, 66000000, 64000000, 93000000, 89000000,100000000]
bar=Bar() bar=Bar()
bar.add_xaxis(subjects) bar.add_xaxis(subjects)
bar.add_yaxis("xx同学",scores) bar.add_yaxis("xx同学",scores)
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="363732d9433b42bca1a285b6891b3f24" class="chart-container" style="width:900px; height:500px;"></div> <div id="819eff70f34f4e41ad24c28c756029c9" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_363732d9433b42bca1a285b6891b3f24 = echarts.init( var chart_819eff70f34f4e41ad24c28c756029c9 = echarts.init(
document.getElementById('363732d9433b42bca1a285b6891b3f24'), 'white', {renderer: 'canvas'}); document.getElementById('819eff70f34f4e41ad24c28c756029c9'), 'white', {renderer: 'canvas'});
var option_363732d9433b42bca1a285b6891b3f24 = { var option_819eff70f34f4e41ad24c28c756029c9 = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -52,15 +52,16 @@ ...@@ -52,15 +52,16 @@
"name": "xx\u540c\u5b66", "name": "xx\u540c\u5b66",
"legendHoverLink": true, "legendHoverLink": true,
"data": [ "data": [
88, 88000000,
95, 95000000,
96, 96000000,
94, 94000000,
62, 62000000,
66, 66000000,
64, 64000000,
93, 93000000,
89 89000000,
100000000
], ],
"showBackground": false, "showBackground": false,
"barMinHeight": 0, "barMinHeight": 0,
...@@ -137,7 +138,8 @@ ...@@ -137,7 +138,8 @@
"\u653f\u6cbb", "\u653f\u6cbb",
"\u751f\u7269", "\u751f\u7269",
"\u5316\u5b66", "\u5316\u5b66",
"\u7269\u7406" "\u7269\u7406",
"xxx"
] ]
} }
], ],
...@@ -165,7 +167,7 @@ ...@@ -165,7 +167,7 @@
} }
] ]
}; };
chart_363732d9433b42bca1a285b6891b3f24.setOption(option_363732d9433b42bca1a285b6891b3f24); chart_819eff70f34f4e41ad24c28c756029c9.setOption(option_819eff70f34f4e41ad24c28c756029c9);
</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