Commit e74d47d4 by BellCodeEditor

save project

parent 5a926989
Showing with 167 additions and 29 deletions
from pyecharts.charts import Line
x = ["1", "2", "3", "4","5","6","7","8","9","10","11","12"]
y = [2.6,5.9,9,26.4,28.7,76.7,175.6,182.2,48.7,18.8,6,2.3] # 期中成绩
x = ["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(x)
line.add_yaxis("降水量",y)
line.add_yaxis("聪聪",student1)
line.add_yaxis("小杰",student2)
line.add_yaxis("皮皮",student3)
line.render("rain.html")
\ No newline at end of file
......@@ -7,11 +7,11 @@
</head>
<body>
<div id="b54b8b5038f4418f80c2d55d3be9bebf" class="chart-container" style="width:900px; height:500px;"></div>
<div id="eda80b29d3fa4a9089ca269d8a01c19f" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_b54b8b5038f4418f80c2d55d3be9bebf = echarts.init(
document.getElementById('b54b8b5038f4418f80c2d55d3be9bebf'), 'white', {renderer: 'canvas'});
var option_b54b8b5038f4418f80c2d55d3be9bebf = {
var chart_eda80b29d3fa4a9089ca269d8a01c19f = echarts.init(
document.getElementById('eda80b29d3fa4a9089ca269d8a01c19f'), 'white', {renderer: 'canvas'});
var option_eda80b29d3fa4a9089ca269d8a01c19f = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
......@@ -49,7 +49,7 @@
"series": [
{
"type": "line",
"name": "\u964d\u6c34\u91cf",
"name": "\u806a\u806a",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
......@@ -59,51 +59,183 @@
"data": [
[
"1",
2.6
112
],
[
"2",
5.9
110
],
[
"3",
9
118
],
[
"4",
26.4
124
],
[
"5",
28.7
129
],
[
"6",
76.7
132
],
[
"7",
175.6
136
],
[
"8",
182.2
139
],
[
"9",
48.7
144
],
[
"10",
18.8
143
]
],
"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": "line",
"name": "\u5c0f\u6770",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
[
"1",
128
],
[
"2",
131
],
[
"3",
132
],
[
"4",
129
],
[
"5",
130
],
[
"6",
127
],
[
"7",
129
],
[
"8",
131
],
[
"9",
132
],
[
"10",
128
]
],
"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": "line",
"name": "\u76ae\u76ae",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
[
"1",
143
],
[
"2",
145
],
[
"3",
140
],
[
"4",
133
],
[
"11",
6
"5",
134
],
[
"6",
126
],
[
"7",
121
],
[
"12",
2.3
"8",
120
],
[
"9",
114
],
[
"10",
105
]
],
"hoverAnimation": true,
......@@ -129,10 +261,14 @@
"legend": [
{
"data": [
"\u964d\u6c34\u91cf"
"\u806a\u806a",
"\u5c0f\u6770",
"\u76ae\u76ae"
],
"selected": {
"\u964d\u6c34\u91cf": true
"\u806a\u806a": true,
"\u5c0f\u6770": true,
"\u76ae\u76ae": true
}
}
],
......@@ -184,9 +320,7 @@
"7",
"8",
"9",
"10",
"11",
"12"
"10"
]
}
],
......@@ -214,7 +348,7 @@
}
]
};
chart_b54b8b5038f4418f80c2d55d3be9bebf.setOption(option_b54b8b5038f4418f80c2d55d3be9bebf);
chart_eda80b29d3fa4a9089ca269d8a01c19f.setOption(option_eda80b29d3fa4a9089ca269d8a01c19f);
</script>
</body>
</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