Commit 035eefa8 by BellCodeEditor

save project

parent da4c08c7
Showing with 54 additions and 29 deletions
......@@ -7,11 +7,11 @@
</head>
<body>
<div id="1ad87376b08f4aefbf3ea1739acfa49b" class="chart-container" style="width:900px; height:500px;"></div>
<div id="a22b9795f70145d9bdfeb139787c734c" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_1ad87376b08f4aefbf3ea1739acfa49b = echarts.init(
document.getElementById('1ad87376b08f4aefbf3ea1739acfa49b'), 'white', {renderer: 'canvas'});
var option_1ad87376b08f4aefbf3ea1739acfa49b = {
var chart_a22b9795f70145d9bdfeb139787c734c = echarts.init(
document.getElementById('a22b9795f70145d9bdfeb139787c734c'), 'white', {renderer: 'canvas'});
var option_a22b9795f70145d9bdfeb139787c734c = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
......@@ -49,20 +49,44 @@
"series": [
{
"type": "bar",
"name": "\u897f\u74dc\u7684\u6210\u7ee9",
"name": "\u671f\u4e2d",
"legendHoverLink": true,
"data": [
0,
0,
0,
0,
0,
66,
64,
1,
0
10000000000000000000000000000,
1000000000000000000000,
1000000000000000000000000000000000000000000000000000000000000000,
-10000000000000000000
],
"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": "\u671f\u672b",
"legendHoverLink": true,
"data": [
950000000000000000000000000000,
79000000000000000000000000000,
90000000000000000000000000000000000000000000000000,
-90000000000000000
],
"showBackground": false,
"barWidth": 40,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
......@@ -83,10 +107,12 @@
"legend": [
{
"data": [
"\u897f\u74dc\u7684\u6210\u7ee9"
"\u671f\u4e2d",
"\u671f\u672b"
],
"selected": {
"\u897f\u74dc\u7684\u6210\u7ee9": true
"\u671f\u4e2d": true,
"\u671f\u672b": true
}
}
],
......@@ -129,15 +155,10 @@
}
},
"data": [
"\u8bed\u6587",
"\u6570\u5b66",
"\u82f1\u8bed",
"\u5730\u7406",
"\u5386\u53f2",
"\u653f\u6cbb",
"\u751f\u7269",
"\u5316\u5b66",
"\u7269\u7406"
"\u6d48\u6d48",
"\u806a\u806a",
"\u5c0f\u667a",
"\u897f\u74dc"
]
}
],
......@@ -165,7 +186,7 @@
}
]
};
chart_1ad87376b08f4aefbf3ea1739acfa49b.setOption(option_1ad87376b08f4aefbf3ea1739acfa49b);
chart_a22b9795f70145d9bdfeb139787c734c.setOption(option_a22b9795f70145d9bdfeb139787c734c);
</script>
</body>
</html>
from pyecharts.charts import Bar
subjects = ["语文","数学","英语","地理","历史","政治","生物","化学","物理"]
scores = [0, 0, 0, 0, 0, 66, 64, 1, 0]
subjects = ["浈浈","聪聪","小智","西瓜"]
scores1 = [10000000000000000000000000000,1000000000000000000000,1000000000000000000000000000000000000000000000000000000000000000,-10000000000000000000]
scores2 = [950000000000000000000000000000,79000000000000000000000000000,90000000000000000000000000000000000000000000000000,-90000000000000000]
bar = Bar()
bar.add_xaxis(subjects)
bar.add_yaxis("西瓜的成绩",scores)
bar.add_yaxis("期中",scores1, bar_width=40)
bar.add_yaxis("期末",scores2, bar_width=40)
bar.render("analysis.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