Commit 7c0b187c by BellCodeEditor

save project

parent a97d3a3d
Showing with 49 additions and 26 deletions
......@@ -7,11 +7,11 @@
</head>
<body>
<div id="3d140886e56244daa3fd1920ab6ab52f" class="chart-container" style="width:900px; height:500px;"></div>
<div id="28a27137612b476f8d82a7967e14be9c" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_3d140886e56244daa3fd1920ab6ab52f = echarts.init(
document.getElementById('3d140886e56244daa3fd1920ab6ab52f'), 'white', {renderer: 'canvas'});
var option_3d140886e56244daa3fd1920ab6ab52f = {
var chart_28a27137612b476f8d82a7967e14be9c = echarts.init(
document.getElementById('28a27137612b476f8d82a7967e14be9c'), 'white', {renderer: 'canvas'});
var option_28a27137612b476f8d82a7967e14be9c = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
......@@ -49,20 +49,44 @@
"series": [
{
"type": "bar",
"name": "\u4e94\u4e2a\u4ebf",
"name": "\u671f\u672b",
"legendHoverLink": true,
"data": [
88,
95,
96,
94,
62,
66,
64,
93,
89
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,
"label": {
"show": true,
"position": "top",
"margin": 8
}
},
{
"type": "bar",
"name": "\u671f\u4e2d",
"legendHoverLink": true,
"data": [
88,
95,
96,
94
],
"showBackground": false,
"barWidth": 40,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
......@@ -83,10 +107,12 @@
"legend": [
{
"data": [
"\u4e94\u4e2a\u4ebf"
"\u671f\u672b",
"\u671f\u4e2d"
],
"selected": {
"\u4e94\u4e2a\u4ebf": true
"\u671f\u672b": true,
"\u671f\u4e2d": true
}
}
],
......@@ -132,12 +158,7 @@
"\u8bed\u6587",
"\u6570\u5b66",
"\u82f1\u8bed",
"\u5730\u7406",
"\u5386\u53f2",
"\u653f\u6cbb",
"\u751f\u7269",
"\u5316\u5b66",
"\u7269\u7406"
"\u5730\u7406"
]
}
],
......@@ -165,7 +186,7 @@
}
]
};
chart_3d140886e56244daa3fd1920ab6ab52f.setOption(option_3d140886e56244daa3fd1920ab6ab52f);
chart_28a27137612b476f8d82a7967e14be9c.setOption(option_28a27137612b476f8d82a7967e14be9c);
</script>
</body>
</html>
from pyecharts.charts import Bar
subjects = ["语文","数学","英语","地理","历史","政治","生物","化学","物理"]
scores = [88, 95, 96, 94, 62, 66, 64, 93, 89]
from pyecharts. charts import Bar
subjects = ["语文","数学","英语","地理"]
scores1 = [88, 95, 96, 94]
scores2 = [88, 95, 96, 94]
bar=Bar()
bar.add_xaxis(subjects)
bar.add_yaxis("五个亿",scores)
bar.render("analysis.html")
\ No newline at end of file
bar.add_yaxis("期末",scores1,bar_width=40)
bar.add_yaxis("期中",scores2,bar_width=40)
bar.render("analysis.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