Commit 884e6e42 by BellCodeEditor

save project

parent 57025ed7
Showing with 33 additions and 29 deletions
......@@ -7,11 +7,11 @@
</head>
<body>
<div id="6f9c3131db8f47a4a59cb1c378befd1a" class="chart-container" style="width:900px; height:500px;"></div>
<div id="96e181158616470fa998603d0d2b37ae" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_6f9c3131db8f47a4a59cb1c378befd1a = echarts.init(
document.getElementById('6f9c3131db8f47a4a59cb1c378befd1a'), 'white', {renderer: 'canvas'});
var option_6f9c3131db8f47a4a59cb1c378befd1a = {
var chart_96e181158616470fa998603d0d2b37ae = echarts.init(
document.getElementById('96e181158616470fa998603d0d2b37ae'), 'white', {renderer: 'canvas'});
var option_96e181158616470fa998603d0d2b37ae = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
......@@ -21,6 +21,9 @@
"animationEasingUpdate": "cubicOut",
"animationDelayUpdate": 0,
"color": [
"yellow",
"blue",
"red",
"#c23531",
"#2f4554",
"#61a0a8",
......@@ -49,7 +52,7 @@
"series": [
{
"type": "line",
"name": "\u6210\u7ee9",
"name": "\u806a\u806a",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
......@@ -119,7 +122,7 @@
},
{
"type": "line",
"name": "\u6210\u7ee9",
"name": "\u5c0f\u6770",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
......@@ -189,7 +192,7 @@
},
{
"type": "line",
"name": "\u6210\u7ee9",
"name": "\u76ae\u76ae",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
......@@ -261,12 +264,14 @@
"legend": [
{
"data": [
"\u6210\u7ee9",
"\u6210\u7ee9",
"\u6210\u7ee9"
"\u806a\u806a",
"\u5c0f\u6770",
"\u76ae\u76ae"
],
"selected": {
"\u6210\u7ee9": true
"\u806a\u806a": true,
"\u5c0f\u6770": true,
"\u76ae\u76ae": true
},
"show": true,
"padding": 5,
......@@ -351,11 +356,10 @@
}
],
"title": {
"text": "\u6210\u7ee9",
"subteat": "\u5206"
"text": "\u6210\u7ee9\u8d70\u52bf\u56fe"
}
};
chart_6f9c3131db8f47a4a59cb1c378befd1a.setOption(option_6f9c3131db8f47a4a59cb1c378befd1a);
chart_96e181158616470fa998603d0d2b37ae.setOption(option_96e181158616470fa998603d0d2b37ae);
</script>
</body>
</html>
from pyecharts.charts import Line
# from pyecharts.charts import Line
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] # 皮皮
# 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()
#传入x轴和y轴的数据
line.add_xaxis(test)
line.add_yaxis("成绩",student1)
line.add_yaxis("成绩",student2)
line.add_yaxis("成绩",student3)
line.set_global_opts(title_opts={"text":"成绩","subteat":"分"})
#保存到本地文件
line.render("XXX.html")
# #创建对应的图表对象
# line=Line()
# #传入x轴和y轴的数据
# line.add_xaxis(test)
# line.add_yaxis("聪聪",student1,color="red")
# line.add_yaxis("小杰",student2,color="blue")
# line.add_yaxis("皮皮",student3,color="yellow")
# line.set_global_opts(title_opts={"text":"成绩走势图"})
# #保存到本地文件
# line.render("XXXxxx.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