Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson24-diy1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5bc6e935
authored
Dec 14, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
54d9cd84
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
26 deletions
my_analysis.py
zhuzhuangtu.html
my_analysis.py
View file @
5bc6e935
from
pyecharts.charts
import
Bar
from
pyecharts.charts
import
Bar
bar
=
Bar
()
bar
=
Bar
()
subjects
=
[
"语文"
,
"数学"
,
"英语"
,
"地理"
,
"历史"
,
"政治"
,
"生物"
,
"化学"
,
"物理"
]
studens_name
=
[
"真真"
,
"匆匆"
,
"吱吱"
,
"麒麒"
]
scores
=
[
88
,
95
,
96
,
94
,
62
,
66
,
64
,
93
,
89
]
scores
=
[
88
,
95
,
96
,
94
]
bar
.
add_xaxis
(
subjects
)
scores2
=
[
98
,
79
,
93
,
90
]
bar
.
add_yaxis
(
"得分"
,
scores
)
bar
.
add_xaxis
(
studens_name
)
bar
.
add_yaxis
(
"期中分数"
,
scores
,
bar_width
=
40
)
bar
.
add_yaxis
(
"期末分数"
,
scores2
,
bar_width
=
40
)
bar
.
render
(
'zhuzhuangtu.html'
)
bar
.
render
(
'zhuzhuangtu.html'
)
zhuzhuangtu.html
View file @
5bc6e935
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
</head>
</head>
<body>
<body>
<div
id=
"
dc8a4b18e8e7493aab3d7e631485af98
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<div
id=
"
c563ecab3f2b44a685703ac3e2a94796
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<script>
<script>
var
chart_
dc8a4b18e8e7493aab3d7e631485af98
=
echarts
.
init
(
var
chart_
c563ecab3f2b44a685703ac3e2a94796
=
echarts
.
init
(
document
.
getElementById
(
'
dc8a4b18e8e7493aab3d7e631485af98
'
),
'white'
,
{
renderer
:
'canvas'
});
document
.
getElementById
(
'
c563ecab3f2b44a685703ac3e2a94796
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
dc8a4b18e8e7493aab3d7e631485af98
=
{
var
option_
c563ecab3f2b44a685703ac3e2a94796
=
{
"animation"
:
true
,
"animation"
:
true
,
"animationThreshold"
:
2000
,
"animationThreshold"
:
2000
,
"animationDuration"
:
1000
,
"animationDuration"
:
1000
,
...
@@ -49,20 +49,44 @@
...
@@ -49,20 +49,44 @@
"series"
:
[
"series"
:
[
{
{
"type"
:
"bar"
,
"type"
:
"bar"
,
"name"
:
"\u
5f97\u5206
"
,
"name"
:
"\u
671f\u4e2d\u5206\u6570
"
,
"legendHoverLink"
:
true
,
"legendHoverLink"
:
true
,
"data"
:
[
"data"
:
[
88
,
88
,
95
,
95
,
96
,
96
,
94
,
94
62
,
],
66
,
"showBackground"
:
false
,
64
,
"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\u672b\u5206\u6570"
,
"legendHoverLink"
:
true
,
"data"
:
[
98
,
79
,
93
,
93
,
89
90
],
],
"showBackground"
:
false
,
"showBackground"
:
false
,
"barWidth"
:
40
,
"barMinHeight"
:
0
,
"barMinHeight"
:
0
,
"barCategoryGap"
:
"20%"
,
"barCategoryGap"
:
"20%"
,
"barGap"
:
"30%"
,
"barGap"
:
"30%"
,
...
@@ -83,10 +107,12 @@
...
@@ -83,10 +107,12 @@
"legend"
:
[
"legend"
:
[
{
{
"data"
:
[
"data"
:
[
"\u5f97\u5206"
"\u671f\u4e2d\u5206\u6570"
,
"\u671f\u672b\u5206\u6570"
],
],
"selected"
:
{
"selected"
:
{
"\u5f97\u5206"
:
true
"\u671f\u4e2d\u5206\u6570"
:
true
,
"\u671f\u672b\u5206\u6570"
:
true
}
}
}
}
],
],
...
@@ -129,15 +155,10 @@
...
@@ -129,15 +155,10 @@
}
}
},
},
"data"
:
[
"data"
:
[
"\u8bed\u6587"
,
"\u771f\u771f"
,
"\u6570\u5b66"
,
"\u5306\u5306"
,
"\u82f1\u8bed"
,
"\u5431\u5431"
,
"\u5730\u7406"
,
"\u9e92\u9e92"
"\u5386\u53f2"
,
"\u653f\u6cbb"
,
"\u751f\u7269"
,
"\u5316\u5b66"
,
"\u7269\u7406"
]
]
}
}
],
],
...
@@ -165,7 +186,7 @@
...
@@ -165,7 +186,7 @@
}
}
]
]
};
};
chart_
dc8a4b18e8e7493aab3d7e631485af98
.
setOption
(
option_dc8a4b18e8e7493aab3d7e631485af98
);
chart_
c563ecab3f2b44a685703ac3e2a94796
.
setOption
(
option_c563ecab3f2b44a685703ac3e2a94796
);
</script>
</script>
</body>
</body>
</html>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment