Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson24-diy2
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
27422571
authored
Apr 19, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
855212c3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
my_analysis.py
render.html
my_analysis.py
View file @
27422571
from
pyecharts.charts
import
Bar
subjects
=
[
"浈浈"
,
"聪聪"
,
"小智"
,
"波奇"
]
scores1
=
[
92
,
95
,
82
,
88
]
# 期中成绩
scores2
=
[
95
,
79
,
93
,
9
0
]
# 期末成绩
scores1
=
[
222222
,
952228888888888888888888888888888888888888888888888888888888888888888888888888888888888888889
,
82222
,
111107
]
# 期中成绩
scores2
=
[
229588
,
333333
,
93222
,
99990
0
]
# 期末成绩
a
=
Bar
()
a
.
add_xaxis
(
subjects
)
a
.
add_yaxis
(
'期中成绩'
,
scores1
,
bar_width
=
40
)
...
...
render.html
View file @
27422571
...
...
@@ -7,11 +7,11 @@
</head>
<body>
<div
id=
"
ae1bb98938e14492ad6b8511aadf4e4b
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<div
id=
"
681aa48adfb5451f98a0b46f482d62b0
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<script>
var
chart_
ae1bb98938e14492ad6b8511aadf4e4b
=
echarts
.
init
(
document
.
getElementById
(
'
ae1bb98938e14492ad6b8511aadf4e4b
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
ae1bb98938e14492ad6b8511aadf4e4b
=
{
var
chart_
681aa48adfb5451f98a0b46f482d62b0
=
echarts
.
init
(
document
.
getElementById
(
'
681aa48adfb5451f98a0b46f482d62b0
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
681aa48adfb5451f98a0b46f482d62b0
=
{
"animation"
:
true
,
"animationThreshold"
:
2000
,
"animationDuration"
:
1000
,
...
...
@@ -52,10 +52,10 @@
"name"
:
"\u671f\u4e2d\u6210\u7ee9"
,
"legendHoverLink"
:
true
,
"data"
:
[
9
2
,
95
,
82
,
88
22222
2
,
95
2229
,
82
222
,
111107
],
"showBackground"
:
false
,
"barWidth"
:
40
,
...
...
@@ -80,10 +80,10 @@
"name"
:
"\u671f\u672b\u6210\u7ee9"
,
"legendHoverLink"
:
true
,
"data"
:
[
95
,
79
,
93
,
90
229588
,
333333
,
93
222
,
9
9990
0
],
"showBackground"
:
false
,
"barWidth"
:
40
,
...
...
@@ -186,7 +186,7 @@
}
]
};
chart_
ae1bb98938e14492ad6b8511aadf4e4b
.
setOption
(
option_ae1bb98938e14492ad6b8511aadf4e4b
);
chart_
681aa48adfb5451f98a0b46f482d62b0
.
setOption
(
option_681aa48adfb5451f98a0b46f482d62b0
);
</script>
</body>
</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