Commit f322bdea by BellCodeEditor

auto save

parent d920a98d
Showing with 32 additions and 21 deletions
from pyecharts.charts import Bar
bar=Bar()
bar.add_xaxis(["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"])
bar.add_xaxis(["","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"])
bar.add_yaxis("月商品销售表",[5,20,36,10,75,90])
bar.render()
\ No newline at end of file
......@@ -2,3 +2,7 @@ from pyecharts.charts import Bar
subjects = ["语文","数学","英语","地理","历史","政治","生物","化学","物理"]
scores = [88, 95, 96, 94, 62, 66, 64, 93, 89]
bar=Bar()
bar.add_xaxis(subjects)
bar.add_yaxis("各科分数",scores)
bar.render()
......@@ -7,11 +7,11 @@
</head>
<body>
<div id="3e64208160b94e4c8b29fcf8f88025e1" class="chart-container" style="width:900px; height:500px;"></div>
<div id="61a67168e78d41bcbe7fa673a77c4d41" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_3e64208160b94e4c8b29fcf8f88025e1 = echarts.init(
document.getElementById('3e64208160b94e4c8b29fcf8f88025e1'), 'white', {renderer: 'canvas'});
var option_3e64208160b94e4c8b29fcf8f88025e1 = {
var chart_61a67168e78d41bcbe7fa673a77c4d41 = echarts.init(
document.getElementById('61a67168e78d41bcbe7fa673a77c4d41'), 'white', {renderer: 'canvas'});
var option_61a67168e78d41bcbe7fa673a77c4d41 = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
......@@ -49,15 +49,18 @@
"series": [
{
"type": "bar",
"name": "\u6708\u5546\u54c1\u9500\u552e\u8868",
"name": "\u5404\u79d1\u5206\u6570",
"legendHoverLink": true,
"data": [
5,
20,
36,
10,
75,
90
88,
95,
96,
94,
62,
66,
64,
93,
89
],
"showBackground": false,
"barMinHeight": 0,
......@@ -80,10 +83,10 @@
"legend": [
{
"data": [
"\u6708\u5546\u54c1\u9500\u552e\u8868"
"\u5404\u79d1\u5206\u6570"
],
"selected": {
"\u6708\u5546\u54c1\u9500\u552e\u8868": true
"\u5404\u79d1\u5206\u6570": true
}
}
],
......@@ -126,12 +129,15 @@
}
},
"data": [
"\u886c\u886b",
"\u7f8a\u6bdb\u886b",
"\u96ea\u7eba\u886b",
"\u88e4\u5b50",
"\u9ad8\u8ddf\u978b",
"\u889c\u5b50"
"\u8bed\u6587",
"\u6570\u5b66",
"\u82f1\u8bed",
"\u5730\u7406",
"\u5386\u53f2",
"\u653f\u6cbb",
"\u751f\u7269",
"\u5316\u5b66",
"\u7269\u7406"
]
}
],
......@@ -159,7 +165,7 @@
}
]
};
chart_3e64208160b94e4c8b29fcf8f88025e1.setOption(option_3e64208160b94e4c8b29fcf8f88025e1);
chart_61a67168e78d41bcbe7fa673a77c4d41.setOption(option_61a67168e78d41bcbe7fa673a77c4d41);
</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