Commit 7c7effee by BellCodeEditor

auto save

parent e617302e
Showing with 105 additions and 28 deletions
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="ccc317775b4047289e606f4e5588a68b" class="chart-container" style="width:900px; height:500px;"></div> <div id="399cbb309a4c440a97f93ff4ffde8fe1" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_ccc317775b4047289e606f4e5588a68b = echarts.init( var chart_399cbb309a4c440a97f93ff4ffde8fe1 = echarts.init(
document.getElementById('ccc317775b4047289e606f4e5588a68b'), 'white', {renderer: 'canvas'}); document.getElementById('399cbb309a4c440a97f93ff4ffde8fe1'), 'white', {renderer: 'canvas'});
var option_ccc317775b4047289e606f4e5588a68b = { var option_399cbb309a4c440a97f93ff4ffde8fe1 = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -49,20 +49,92 @@ ...@@ -49,20 +49,92 @@
"series": [ "series": [
{ {
"type": "bar", "type": "bar",
"name": "11", "name": "\u6d48\u6d48",
"legendHoverLink": true,
"data": [
92,
95
],
"showBackground": false,
"barWidth": 30,
"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": "\u806a\u806a",
"legendHoverLink": true,
"data": [
85,
79
],
"showBackground": false,
"barWidth": 30,
"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": "\u5c0f\u667a",
"legendHoverLink": true,
"data": [
82,
93
],
"showBackground": false,
"barWidth": 30,
"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": "\u6ce2\u5947",
"legendHoverLink": true, "legendHoverLink": true,
"data": [ "data": [
88, 88,
95, 90
96,
94,
62,
66,
64,
93,
89
], ],
"showBackground": false, "showBackground": false,
"barWidth": 30,
"barMinHeight": 0, "barMinHeight": 0,
"barCategoryGap": "20%", "barCategoryGap": "20%",
"barGap": "30%", "barGap": "30%",
...@@ -83,10 +155,16 @@ ...@@ -83,10 +155,16 @@
"legend": [ "legend": [
{ {
"data": [ "data": [
"11" "\u6d48\u6d48",
"\u806a\u806a",
"\u5c0f\u667a",
"\u6ce2\u5947"
], ],
"selected": { "selected": {
"11": true "\u6d48\u6d48": true,
"\u806a\u806a": true,
"\u5c0f\u667a": true,
"\u6ce2\u5947": true
} }
} }
], ],
...@@ -129,15 +207,7 @@ ...@@ -129,15 +207,7 @@
} }
}, },
"data": [ "data": [
"\u8bed\u6587", "\u59d3\u540d\u671f\u4e2d\u671f\u672b"
"\u6570\u5b66",
"\u82f1\u8bed",
"\u5730\u7406",
"\u5386\u53f2",
"\u653f\u6cbb",
"\u751f\u7269",
"\u5316\u5b66",
"\u7269\u7406"
] ]
} }
], ],
...@@ -165,7 +235,7 @@ ...@@ -165,7 +235,7 @@
} }
] ]
}; };
chart_ccc317775b4047289e606f4e5588a68b.setOption(option_ccc317775b4047289e606f4e5588a68b); chart_399cbb309a4c440a97f93ff4ffde8fe1.setOption(option_399cbb309a4c440a97f93ff4ffde8fe1);
</script> </script>
</body> </body>
</html> </html>
from pyecharts.charts import Bar from pyecharts.charts import Bar
q=[92,95]
w=[85,79]
e=[82,93]
r=[88,90]
bar=Bar() bar=Bar()
bar.add_xaxis(["语文","数学","英语","地理","历史","政治","生物","化学","物理"]) bar.add_xaxis(["姓名","期中","期末"])
bar.add_yaxis("11",[88, 95, 96, 94, 62, 66, 64, 93, 89]) bar.add_yaxis("浈浈",q,bar_width=30)
bar.add_yaxis("聪聪",w,bar_width=30)
bar.add_yaxis("小智",e,bar_width=30)
bar.add_yaxis("波奇",r,bar_width=30)
bar.render("12.html") bar.render("12.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