Commit ebe3fc93 by BellCodeEditor

save project

parent d8ce8d1c
Showing with 93 additions and 188 deletions
......@@ -7,11 +7,11 @@
</head>
<body>
<div id="ebd0fd302da949968ac638687b54c58c" class="chart-container" style="width:900px; height:500px;"></div>
<div id="2d623747292d40659b02c551ecb8ac2d" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_ebd0fd302da949968ac638687b54c58c = echarts.init(
document.getElementById('ebd0fd302da949968ac638687b54c58c'), 'white', {renderer: 'canvas'});
var option_ebd0fd302da949968ac638687b54c58c = {
var chart_2d623747292d40659b02c551ecb8ac2d = echarts.init(
document.getElementById('2d623747292d40659b02c551ecb8ac2d'), 'white', {renderer: 'canvas'});
var option_2d623747292d40659b02c551ecb8ac2d = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
......@@ -48,214 +48,106 @@
],
"series": [
{
"type": "line",
"type": "bar",
"name": "\u806a\u806a",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"legendHoverLink": true,
"data": [
[
"\u7b2c1\u6b21",
112
],
[
"\u7b2c2\u6b21",
110
],
[
"\u7b2c3\u6b21",
118
],
[
"\u7b2c4\u6b21",
124
],
[
"\u7b2c5\u6b21",
129
],
[
"\u7b2c6\u6b21",
132
],
[
"\u7b2c7\u6b21",
136
],
[
"\u7b2c8\u6b21",
139
],
[
"\u7b2c9\u6b21",
144
],
[
"\u7b2c10\u6b21",
143
]
112,
110,
118,
124,
129,
132,
136,
139,
144,
143
],
"hoverAnimation": true,
"showBackground": false,
"barWidth": 13,
"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
},
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
},
"areaStyle": {
"opacity": 0
},
"zlevel": 0,
"z": 0
}
},
{
"type": "line",
"type": "bar",
"name": "\u5c0f\u6770",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"legendHoverLink": true,
"data": [
[
"\u7b2c1\u6b21",
128
],
[
"\u7b2c2\u6b21",
131
],
[
"\u7b2c3\u6b21",
132
],
[
"\u7b2c4\u6b21",
129
],
[
"\u7b2c5\u6b21",
130
],
[
"\u7b2c6\u6b21",
127
],
[
"\u7b2c7\u6b21",
129
],
[
"\u7b2c8\u6b21",
131
],
[
"\u7b2c9\u6b21",
132
],
[
"\u7b2c10\u6b21",
128
]
128,
131,
132,
129,
130,
127,
129,
131,
132,
128
],
"hoverAnimation": true,
"showBackground": false,
"barWidth": 13,
"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
},
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
},
"areaStyle": {
"opacity": 0
},
"zlevel": 0,
"z": 0
}
},
{
"type": "line",
"type": "bar",
"name": "\u76ae\u76ae",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"legendHoverLink": true,
"data": [
[
"\u7b2c1\u6b21",
143
],
[
"\u7b2c2\u6b21",
145
],
[
"\u7b2c3\u6b21",
140
],
[
"\u7b2c4\u6b21",
133
],
[
"\u7b2c5\u6b21",
134
],
[
"\u7b2c6\u6b21",
126
],
[
"\u7b2c7\u6b21",
121
],
[
"\u7b2c8\u6b21",
120
],
[
"\u7b2c9\u6b21",
114
],
[
"\u7b2c10\u6b21",
105
]
143,
145,
140,
133,
134,
126,
121,
120,
114,
105
],
"hoverAnimation": true,
"showBackground": false,
"barWidth": 13,
"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
},
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
},
"areaStyle": {
"opacity": 0
},
"zlevel": 0,
"z": 0
}
}
],
"legend": [
......@@ -357,7 +249,7 @@
"subtext": "\u6570\u5b66"
}
};
chart_ebd0fd302da949968ac638687b54c58c.setOption(option_ebd0fd302da949968ac638687b54c58c);
chart_2d623747292d40659b02c551ecb8ac2d.setOption(option_2d623747292d40659b02c551ecb8ac2d);
</script>
</body>
</html>
from pyecharts.charts import Bar
line=Bar()
test = ["第1次","第2次","第3次","第4次","第5次","第6次","第7次","第8次","第9次","第10次"]
student1 = [112, 110, 118, 124, 129, 132, 136, 139, 144, 143] # 聪聪
student2 = [128, 131, 132, 129, 130, 127, 129, 131, 132, 128] # 小杰
student3 = [143, 145, 140, 133, 134, 126, 121, 120, 114, 105] # 皮皮
line.add_xaxis(test)
line.add_yaxis("聪聪",student1,bar_width=13)
line.add_yaxis("小杰",student2,bar_width=13)
line.add_yaxis("皮皮",student3,bar_width=13)
line.set_global_opts(title_opts={"text":"成绩走势图","subtext":"数学"})
line.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