Commit 7ce465b4 by BellCodeEditor

save project

parent 5bc6e935
Showing with 144 additions and 59 deletions
from pyecharts.charts import Bar
bar = Bar()
studens_name = ["真真","匆匆","吱吱","麒麒"]
from pyecharts.charts import Line
bar = Line()
studens_name = ["JAN","FEB","MAR","APR"]
scores = [88, 95, 96, 94]
scores2 = [98,79,93,90]
scores2 = [18, 75, 56, 104]
scores4 = [81, 57, 86, 74]
bar.add_xaxis(studens_name)
bar.add_yaxis("期中分数",scores,bar_width=40)
bar.add_yaxis("期末分数",scores2,bar_width=40)
bar.add_yaxis("ZHO",scores)
bar.add_yaxis("QI",scores2)
bar.add_yaxis("LI",scores4)
bar.render('zhuzhuangtu.html')
......@@ -7,11 +7,11 @@
</head>
<body>
<div id="c563ecab3f2b44a685703ac3e2a94796" class="chart-container" style="width:900px; height:500px;"></div>
<div id="c11210195a594e36b46d708692212a17" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_c563ecab3f2b44a685703ac3e2a94796 = echarts.init(
document.getElementById('c563ecab3f2b44a685703ac3e2a94796'), 'white', {renderer: 'canvas'});
var option_c563ecab3f2b44a685703ac3e2a94796 = {
var chart_c11210195a594e36b46d708692212a17 = echarts.init(
document.getElementById('c11210195a594e36b46d708692212a17'), 'white', {renderer: 'canvas'});
var option_c11210195a594e36b46d708692212a17 = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
......@@ -48,71 +48,155 @@
],
"series": [
{
"type": "bar",
"name": "\u671f\u4e2d\u5206\u6570",
"legendHoverLink": true,
"type": "line",
"name": "ZHO",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
88,
95,
96,
94
[
"JAN",
88
],
[
"FEB",
95
],
[
"MAR",
96
],
[
"APR",
94
]
],
"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\u5206\u6570",
"legendHoverLink": true,
"type": "line",
"name": "QI",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
98,
79,
93,
90
[
"JAN",
18
],
[
"FEB",
75
],
[
"MAR",
56
],
[
"APR",
104
]
],
"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": "LI",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
[
"JAN",
81
],
[
"FEB",
57
],
[
"MAR",
86
],
[
"APR",
74
]
],
"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\u5206\u6570",
"\u671f\u672b\u5206\u6570"
"ZHO",
"QI",
"LI"
],
"selected": {
"\u671f\u4e2d\u5206\u6570": true,
"\u671f\u672b\u5206\u6570": true
"ZHO": true,
"QI": true,
"LI": true
}
}
],
......@@ -155,10 +239,10 @@
}
},
"data": [
"\u771f\u771f",
"\u5306\u5306",
"\u5431\u5431",
"\u9e92\u9e92"
"JAN",
"FEB",
"MAR",
"APR"
]
}
],
......@@ -186,7 +270,7 @@
}
]
};
chart_c563ecab3f2b44a685703ac3e2a94796.setOption(option_c563ecab3f2b44a685703ac3e2a94796);
chart_c11210195a594e36b46d708692212a17.setOption(option_c11210195a594e36b46d708692212a17);
</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