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
ba8a55d2
authored
Dec 16, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
58b989bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
16 deletions
my_analysis.py
render.html
my_analysis.py
View file @
ba8a55d2
...
@@ -3,6 +3,6 @@ from pyecharts.charts import Bar
...
@@ -3,6 +3,6 @@ from pyecharts.charts import Bar
subjects
=
[
"语文"
,
"数学"
,
"英语"
,
"地理"
,
"历史"
,
"政治"
,
"生物"
,
"化学"
,
"物理"
]
subjects
=
[
"语文"
,
"数学"
,
"英语"
,
"地理"
,
"历史"
,
"政治"
,
"生物"
,
"化学"
,
"物理"
]
scores
=
[
88
,
95
,
96
,
94
,
62
,
66
,
64
,
93
,
89
]
scores
=
[
88
,
95
,
96
,
94
,
62
,
66
,
64
,
93
,
89
]
bar
=
Bar
()
bar
=
Bar
()
bar
.
add_xaxis
(
[
"语文"
,
"数学"
,
"英语"
,
"地理"
,
"历史"
,
"政治"
,
"生物"
,
"化学"
,
"物理"
]
)
bar
.
add_xaxis
(
subjects
)
bar
.
add_yaxis
(
"成绩"
,[
88
,
95
,
96
,
94
,
62
,
66
,
64
,
93
,
89
])
bar
.
add_yaxis
(
"成绩"
,[
scores
])
bar
.
render
()
bar
.
render
()
\ No newline at end of file
render.html
View file @
ba8a55d2
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
</head>
</head>
<body>
<body>
<div
id=
"
1c81bff498e347fb84a3d744c64358b
5"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<div
id=
"
78ccb77dcce449bf88f746f0d68ee2e
5"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<script>
<script>
var
chart_
1c81bff498e347fb84a3d744c64358b
5
=
echarts
.
init
(
var
chart_
78ccb77dcce449bf88f746f0d68ee2e
5
=
echarts
.
init
(
document
.
getElementById
(
'
1c81bff498e347fb84a3d744c64358b
5'
),
'white'
,
{
renderer
:
'canvas'
});
document
.
getElementById
(
'
78ccb77dcce449bf88f746f0d68ee2e
5'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
1c81bff498e347fb84a3d744c64358b
5
=
{
var
option_
78ccb77dcce449bf88f746f0d68ee2e
5
=
{
"animation"
:
true
,
"animation"
:
true
,
"animationThreshold"
:
2000
,
"animationThreshold"
:
2000
,
"animationDuration"
:
1000
,
"animationDuration"
:
1000
,
...
@@ -52,15 +52,17 @@
...
@@ -52,15 +52,17 @@
"name"
:
"\u6210\u7ee9"
,
"name"
:
"\u6210\u7ee9"
,
"legendHoverLink"
:
true
,
"legendHoverLink"
:
true
,
"data"
:
[
"data"
:
[
88
,
[
95
,
88
,
96
,
95
,
94
,
96
,
62
,
94
,
66
,
62
,
64
,
66
,
93
,
64
,
89
93
,
89
]
],
],
"showBackground"
:
false
,
"showBackground"
:
false
,
"barMinHeight"
:
0
,
"barMinHeight"
:
0
,
...
@@ -165,7 +167,7 @@
...
@@ -165,7 +167,7 @@
}
}
]
]
};
};
chart_
1c81bff498e347fb84a3d744c64358b5
.
setOption
(
option_1c81bff498e347fb84a3d744c64358b
5
);
chart_
78ccb77dcce449bf88f746f0d68ee2e5
.
setOption
(
option_78ccb77dcce449bf88f746f0d68ee2e
5
);
</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