Commit 14103492 by BellCodeEditor

save project

parent 0bdd1a77
Showing with 61 additions and 23 deletions
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="82084d75f8074556822923249db36a3f" class="chart-container" style="width:900px; height:500px;"></div> <div id="39b63a45dba24dcf875cfb837b10e6ff" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_82084d75f8074556822923249db36a3f = echarts.init( var chart_39b63a45dba24dcf875cfb837b10e6ff = echarts.init(
document.getElementById('82084d75f8074556822923249db36a3f'), 'white', {renderer: 'canvas'}); document.getElementById('39b63a45dba24dcf875cfb837b10e6ff'), 'white', {renderer: 'canvas'});
var option_82084d75f8074556822923249db36a3f = { var option_39b63a45dba24dcf875cfb837b10e6ff = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -49,13 +49,12 @@ ...@@ -49,13 +49,12 @@
"series": [ "series": [
{ {
"type": "bar", "type": "bar",
"name": "\u671f\u4e2d", "name": "\u7b2c\u4e00\u5929",
"legendHoverLink": true, "legendHoverLink": true,
"data": [ "data": [
92, 5453,
95, 7548,
82, 6543
88
], ],
"showBackground": false, "showBackground": false,
"barWidth": 40, "barWidth": 40,
...@@ -77,13 +76,39 @@ ...@@ -77,13 +76,39 @@
}, },
{ {
"type": "bar", "type": "bar",
"name": "\u671f\u672b", "name": "\u7b2c\u4e8c\u5929",
"legendHoverLink": true, "legendHoverLink": true,
"data": [ "data": [
95, 1840,
79, 4013,
93, 3421
90 ],
"showBackground": false,
"barWidth": 40,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
"large": false,
"largeThreshold": 400,
"seriesLayoutBy": "column",
"datasetIndex": 0,
"clip": true,
"zlevel": 0,
"z": 2,
"label": {
"show": true,
"position": "top",
"margin": 8
}
},
{
"type": "bar",
"name": "\u7b2c\u4e09\u5929",
"legendHoverLink": true,
"data": [
1080,
1673,
2342
], ],
"showBackground": false, "showBackground": false,
"barWidth": 40, "barWidth": 40,
...@@ -107,12 +132,14 @@ ...@@ -107,12 +132,14 @@
"legend": [ "legend": [
{ {
"data": [ "data": [
"\u671f\u4e2d", "\u7b2c\u4e00\u5929",
"\u671f\u672b" "\u7b2c\u4e8c\u5929",
"\u7b2c\u4e09\u5929"
], ],
"selected": { "selected": {
"\u671f\u4e2d": true, "\u7b2c\u4e00\u5929": true,
"\u671f\u672b": true "\u7b2c\u4e8c\u5929": true,
"\u7b2c\u4e09\u5929": true
} }
} }
], ],
...@@ -155,10 +182,9 @@ ...@@ -155,10 +182,9 @@
} }
}, },
"data": [ "data": [
"\u6d48\u6d48", "\u5343\u4e0e\u5343\u5bfb",
"\u806a\u806a", "\u73a9\u5177\u603b\u52a8\u5458 4",
"\u5c0f\u667a", "\u2fca\u2f90\u2f08\uff1a\u5168\u7403\u8ffd\u7f09"
"\u6ce2\u5947"
] ]
} }
], ],
...@@ -186,7 +212,7 @@ ...@@ -186,7 +212,7 @@
} }
] ]
}; };
chart_82084d75f8074556822923249db36a3f.setOption(option_82084d75f8074556822923249db36a3f); chart_39b63a45dba24dcf875cfb837b10e6ff.setOption(option_39b63a45dba24dcf875cfb837b10e6ff);
</script> </script>
</body> </body>
</html> </html>
from pyecharts.charts import Bar
names=['千与千寻','玩具总动员 4','⿊⾐⼈:全球追缉']
day1=[5453,7548,6543]
day2=[1840,4013,3421]
day3=[1080,1673,2342]
bar=Bar()
bar.add_xaxis(names)
bar.add_yaxis("第一天",day1,bar_width=40)
bar.add_yaxis("第二天",day2,bar_width=40)
bar.add_yaxis("第三天",day3,bar_width=40)
bar.render("analysis.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