Commit 6cedb148 by BellCodeEditor

save project

parent e3575c74
Showing with 16 additions and 12 deletions
...@@ -8,6 +8,6 @@ scores2 = [95, 79, 93, 90] # 期末成绩 ...@@ -8,6 +8,6 @@ scores2 = [95, 79, 93, 90] # 期末成绩
bar=Bar() bar=Bar()
bar.add_xaxis(subjects) bar.add_xaxis(subjects)
bar.add_yaxis("chenzhuoxing",scores1,) bar.add_yaxis("期中",scores1,bar_width=40)
bar.add_yaxis("chenzhuoxing",scores2,) bar.add_yaxis("期末",scores2,bar_width=40)
bar.render("zhenzhuoxing.html") bar.render("zhenzhuoxing.html")
\ No newline at end of file
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="0f37d34b4e06403fb68335e5bc44d300" class="chart-container" style="width:900px; height:500px;"></div> <div id="af9e592c9e394e88a4d6dc958c2248bb" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_0f37d34b4e06403fb68335e5bc44d300 = echarts.init( var chart_af9e592c9e394e88a4d6dc958c2248bb = echarts.init(
document.getElementById('0f37d34b4e06403fb68335e5bc44d300'), 'white', {renderer: 'canvas'}); document.getElementById('af9e592c9e394e88a4d6dc958c2248bb'), 'white', {renderer: 'canvas'});
var option_0f37d34b4e06403fb68335e5bc44d300 = { var option_af9e592c9e394e88a4d6dc958c2248bb = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
"series": [ "series": [
{ {
"type": "bar", "type": "bar",
"name": "chenzhuoxing", "name": "\u671f\u4e2d",
"legendHoverLink": true, "legendHoverLink": true,
"data": [ "data": [
92, 92,
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
88 88
], ],
"showBackground": false, "showBackground": false,
"barWidth": 40,
"barMinHeight": 0, "barMinHeight": 0,
"barCategoryGap": "20%", "barCategoryGap": "20%",
"barGap": "30%", "barGap": "30%",
...@@ -76,7 +77,7 @@ ...@@ -76,7 +77,7 @@
}, },
{ {
"type": "bar", "type": "bar",
"name": "chenzhuoxing", "name": "\u671f\u672b",
"legendHoverLink": true, "legendHoverLink": true,
"data": [ "data": [
95, 95,
...@@ -85,6 +86,7 @@ ...@@ -85,6 +86,7 @@
90 90
], ],
"showBackground": false, "showBackground": false,
"barWidth": 40,
"barMinHeight": 0, "barMinHeight": 0,
"barCategoryGap": "20%", "barCategoryGap": "20%",
"barGap": "30%", "barGap": "30%",
...@@ -105,11 +107,12 @@ ...@@ -105,11 +107,12 @@
"legend": [ "legend": [
{ {
"data": [ "data": [
"chenzhuoxing", "\u671f\u4e2d",
"chenzhuoxing" "\u671f\u672b"
], ],
"selected": { "selected": {
"chenzhuoxing": true "\u671f\u4e2d": true,
"\u671f\u672b": true
} }
} }
], ],
...@@ -183,7 +186,7 @@ ...@@ -183,7 +186,7 @@
} }
] ]
}; };
chart_0f37d34b4e06403fb68335e5bc44d300.setOption(option_0f37d34b4e06403fb68335e5bc44d300); chart_af9e592c9e394e88a4d6dc958c2248bb.setOption(option_af9e592c9e394e88a4d6dc958c2248bb);
</script> </script>
</body> </body>
</html> </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