Commit f6365c1c by BellCodeEditor

save project

parent b1fad5f3
Showing with 226 additions and 62 deletions
......@@ -7,11 +7,11 @@
</head>
<body>
<div id="3773000abfbb47d1afc8a1ec9d26cd10" class="chart-container" style="width:900px; height:500px;"></div>
<div id="28dfccd8a023474a865e87df2a95a1d0" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_3773000abfbb47d1afc8a1ec9d26cd10 = echarts.init(
document.getElementById('3773000abfbb47d1afc8a1ec9d26cd10'), 'white', {renderer: 'canvas'});
var option_3773000abfbb47d1afc8a1ec9d26cd10 = {
var chart_28dfccd8a023474a865e87df2a95a1d0 = echarts.init(
document.getElementById('28dfccd8a023474a865e87df2a95a1d0'), 'white', {renderer: 'canvas'});
var option_28dfccd8a023474a865e87df2a95a1d0 = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
......@@ -48,71 +48,227 @@
],
"series": [
{
"type": "bar",
"name": "\u671f\u4e2d",
"legendHoverLink": true,
"type": "line",
"name": "\u806a\u806a",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
92,
95,
82,
88
[
"\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
]
],
"showBackground": false,
"barWidth": 40,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
"large": false,
"largeThreshold": 400,
"seriesLayoutBy": "column",
"datasetIndex": 0,
"clip": true,
"zlevel": 0,
"z": 2,
"hoverAnimation": true,
"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": "bar",
"name": "\u671f\u672b",
"legendHoverLink": true,
"type": "line",
"name": "\u5c0f\u6770",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
95,
79,
93,
90
[
"\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
]
],
"showBackground": false,
"barWidth": 40,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
"large": false,
"largeThreshold": 400,
"seriesLayoutBy": "column",
"datasetIndex": 0,
"clip": true,
"hoverAnimation": true,
"label": {
"show": true,
"position": "top",
"margin": 8
},
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
},
"areaStyle": {
"opacity": 0
},
"zlevel": 0,
"z": 2,
"z": 0
},
{
"type": "line",
"name": "\u76ae\u76ae",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"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
]
],
"hoverAnimation": true,
"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": [
{
"data": [
"\u671f\u4e2d",
"\u671f\u672b"
"\u806a\u806a",
"\u5c0f\u6770",
"\u76ae\u76ae"
],
"selected": {
"\u671f\u4e2d": true,
"\u671f\u672b": true
"\u806a\u806a": true,
"\u5c0f\u6770": true,
"\u76ae\u76ae": true
}
}
],
......@@ -155,10 +311,16 @@
}
},
"data": [
"\u6d48\u6d48",
"\u806a\u806a",
"\u5c0f\u667a",
"\u6ce2\u5947"
"\u7b2c1\u6b21",
"\u7b2c2\u6b21",
"\u7b2c3\u6b21",
"\u7b2c4\u6b21",
"\u7b2c5\u6b21",
"\u7b2c6\u6b21",
"\u7b2c7\u6b21",
"\u7b2c8\u6b21",
"\u7b2c9\u6b21",
"\u7b2c10\u6b21"
]
}
],
......@@ -186,7 +348,7 @@
}
]
};
chart_3773000abfbb47d1afc8a1ec9d26cd10.setOption(option_3773000abfbb47d1afc8a1ec9d26cd10);
chart_28dfccd8a023474a865e87df2a95a1d0.setOption(option_28dfccd8a023474a865e87df2a95a1d0);
</script>
</body>
</html>
from pyecharts.charts import Bar
from pyecharts.charts import Line
subjects = ["浈浈", "聪聪", "小智", "波奇"]
scores1 = [92, 95, 82, 88]
scores2 = [95, 79, 93, 90]
bar=Bar()
bar.add_xaxis(subjects)
bar.add_yaxis("期中",scores1,bar_width=40)
bar.add_yaxis("期末",scores2,bar_width=40)
bar.render("123.html")
\ No newline at end of file
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=Line()
Line.add_xaxis(test)
Line.add_yaxis("聪聪",student1)
Line.add_yaxis("小杰",student2)
Line.add_yaxis("皮皮",student3)
Line.render("123.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