Commit 0bf9f32b by BellCodeEditor

save project

parent 08df7219
Showing with 255 additions and 7 deletions
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="d9c47348dc5a49908244abeb4dee8755" class="chart-container" style="width:900px; height:500px;"></div> <div id="560c1b2b67cb406888ce46ea476fdc92" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_d9c47348dc5a49908244abeb4dee8755 = echarts.init( var chart_560c1b2b67cb406888ce46ea476fdc92 = echarts.init(
document.getElementById('d9c47348dc5a49908244abeb4dee8755'), 'white', {renderer: 'canvas'}); document.getElementById('560c1b2b67cb406888ce46ea476fdc92'), 'white', {renderer: 'canvas'});
var option_d9c47348dc5a49908244abeb4dee8755 = { var option_560c1b2b67cb406888ce46ea476fdc92 = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -269,7 +269,12 @@ ...@@ -269,7 +269,12 @@
"\u806a\u806a": true, "\u806a\u806a": true,
"\u5c0f\u6770": true, "\u5c0f\u6770": true,
"\u76ae\u76ae": true "\u76ae\u76ae": true
} },
"show": true,
"padding": 5,
"itemGap": 10,
"itemWidth": 25,
"itemHeight": 14
} }
], ],
"tooltip": { "tooltip": {
...@@ -346,9 +351,12 @@ ...@@ -346,9 +351,12 @@
} }
} }
} }
] ],
"title": {
"text": "\u9ad8\u4e8c\u4e94\u56db\u73ed\u6570\u5b66\u6210\u7ee9"
}
}; };
chart_d9c47348dc5a49908244abeb4dee8755.setOption(option_d9c47348dc5a49908244abeb4dee8755); chart_560c1b2b67cb406888ce46ea476fdc92.setOption(option_560c1b2b67cb406888ce46ea476fdc92);
</script> </script>
</body> </body>
</html> </html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Awesome-pyecharts</title>
<script type="text/javascript" src="https://assets.pyecharts.org/assets/echarts.min.js"></script>
</head>
<body>
<div id="3319584dfa5148f48fd90efed9631864" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_3319584dfa5148f48fd90efed9631864 = echarts.init(
document.getElementById('3319584dfa5148f48fd90efed9631864'), 'white', {renderer: 'canvas'});
var option_3319584dfa5148f48fd90efed9631864 = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
"animationEasing": "cubicOut",
"animationDelay": 0,
"animationDurationUpdate": 300,
"animationEasingUpdate": "cubicOut",
"animationDelayUpdate": 0,
"color": [
"#c23531",
"#2f4554",
"#61a0a8",
"#d48265",
"#749f83",
"#ca8622",
"#bda29a",
"#6e7074",
"#546570",
"#c4ccd3",
"#f05b72",
"#ef5b9c",
"#f47920",
"#905a3d",
"#fab27b",
"#2a5caa",
"#444693",
"#726930",
"#b2d235",
"#6d8346",
"#ac6767",
"#1d953f",
"#6950a1",
"#918597"
],
"series": [
{
"type": "line",
"name": "\u964d\u6c34\u91cf",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
[
"\u4e00\u6708",
2.6
],
[
"\u4e8c\u6708",
5.9
],
[
"\u4e09\u6708",
9.0
],
[
"\u56db\u6708",
26.4
],
[
"\u4e94\u6708",
28.7
],
[
"\u516d\u6708",
76.7
],
[
"\u4e03\u6708",
175.6
],
[
"\u516b\u6708",
182.2
],
[
"\u4e5d\u6708",
48.7
],
[
"\u5341\u6708",
18.8
],
[
"\u5341\u4e00\u6708",
6.0
],
[
"\u5341\u4e8c\u6708",
2.3
]
],
"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": [
"\u964d\u6c34\u91cf"
],
"selected": {
"\u964d\u6c34\u91cf": true
},
"show": true,
"padding": 5,
"itemGap": 10,
"itemWidth": 25,
"itemHeight": 14
}
],
"tooltip": {
"show": true,
"trigger": "item",
"triggerOn": "mousemove|click",
"axisPointer": {
"type": "line"
},
"showContent": true,
"alwaysShowContent": false,
"showDelay": 0,
"hideDelay": 100,
"textStyle": {
"fontSize": 14
},
"borderWidth": 0,
"padding": 5
},
"xAxis": [
{
"show": true,
"scale": false,
"nameLocation": "end",
"nameGap": 15,
"gridIndex": 0,
"inverse": false,
"offset": 0,
"splitNumber": 5,
"minInterval": 0,
"splitLine": {
"show": false,
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
}
},
"data": [
"\u4e00\u6708",
"\u4e8c\u6708",
"\u4e09\u6708",
"\u56db\u6708",
"\u4e94\u6708",
"\u516d\u6708",
"\u4e03\u6708",
"\u516b\u6708",
"\u4e5d\u6708",
"\u5341\u6708",
"\u5341\u4e00\u6708",
"\u5341\u4e8c\u6708"
]
}
],
"yAxis": [
{
"show": true,
"scale": false,
"nameLocation": "end",
"nameGap": 15,
"gridIndex": 0,
"inverse": false,
"offset": 0,
"splitNumber": 5,
"minInterval": 0,
"splitLine": {
"show": false,
"lineStyle": {
"show": true,
"width": 1,
"opacity": 1,
"curveness": 0,
"type": "solid"
}
}
}
],
"title": {
"text": "\u5e74\u964d\u6c34\u91cf",
"subtext": "\u5355\u4f4d\uff1a\u6beb\u7c73"
}
};
chart_3319584dfa5148f48fd90efed9631864.setOption(option_3319584dfa5148f48fd90efed9631864);
</script>
</body>
</html>
...@@ -8,4 +8,5 @@ line.add_xaxis(test) ...@@ -8,4 +8,5 @@ line.add_xaxis(test)
line.add_yaxis('聪聪',student1) line.add_yaxis('聪聪',student1)
line.add_yaxis('小杰',student2) line.add_yaxis('小杰',student2)
line.add_yaxis('皮皮',student3) line.add_yaxis('皮皮',student3)
line.set_global_opts(title_opts={"text":"数学成绩","subtext":"高二五四班"})
line.render('123.html') line.render('123.html')
\ No newline at end of file
from pyecharts.charts import Line
line=Line()
x=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",]
y1=[2.6,5.9,9.0,26.4,28.7,76.7,175.6,182.2,48.7,18.8,6.0,2.3]
line.add_xaxis(x)
line.add_yaxis('降水量',y1)
line.set_global_opts(title_opts={"text":"年降水量","subtext":"单位:毫米"})
line.render('1234.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