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
d4790661
authored
Mar 25, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
0fee699d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
my_analysis.py
成绩分析.html
my_analysis.py
View file @
d4790661
...
@@ -3,8 +3,10 @@ from pyecharts.charts import Bar
...
@@ -3,8 +3,10 @@ from pyecharts.charts import Bar
subjects
=
[
"浈浈"
,
"聪聪"
,
"小智"
,
"波奇"
]
subjects
=
[
"浈浈"
,
"聪聪"
,
"小智"
,
"波奇"
]
scores1
=
[
92
,
95
,
82
,
88
]
# 期中成绩
scores1
=
[
92
,
95
,
82
,
88
]
# 期中成绩
scores2
=
[
95
,
79
,
93
,
90
]
# 期末成绩
scores2
=
[
95
,
79
,
93
,
90
]
# 期末成绩
bar
=
Bar
()
line
=
Line
()
bar
.
add_xaxis
(
subjects
)
line
.
add_xaxis
(
x
)
bar
.
add_yaxis
(
"期中成绩"
,
scores1
,
bar_width
=
40
)
line
.
add_yaxis
(
"降水量"
,
x
)
bar
.
add_yaxis
(
"期末成绩"
,
scores2
,
bar_width
=
40
)
line
.
add_yaxis
(
"蒸发量"
,
y
)
bar
.
render
(
"成绩分析.html"
)
line
.
render
(
"降雨量分析.html"
)
\ No newline at end of file
line
.
set_gwbal
(
_opts
(
title_opts
=
{
"test"
:
""
,
""
,
"subtest"
:
"单位:毫米"
}
\ No newline at end of file
成绩分析.html
View file @
d4790661
<!DOC
TYPE html>
<!DOC
TYPE html>
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
</head>
</head>
<body>
<body>
<div
id=
"
d77a1bdf4e3c46fc836c7fde8b1b45ce
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<div
id=
"
91cf11eaf2fe4c2d80fe839950abc806
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<script>
<script>
var
chart_
d77a1bdf4e3c46fc836c7fde8b1b45ce
=
echarts
.
init
(
var
chart_
91cf11eaf2fe4c2d80fe839950abc806
=
echarts
.
init
(
document
.
getElementById
(
'
d77a1bdf4e3c46fc836c7fde8b1b45ce
'
),
'white'
,
{
renderer
:
'canvas'
});
document
.
getElementById
(
'
91cf11eaf2fe4c2d80fe839950abc806
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
d77a1bdf4e3c46fc836c7fde8b1b45ce
=
{
var
option_
91cf11eaf2fe4c2d80fe839950abc806
=
{
"animation"
:
true
,
"animation"
:
true
,
"animationThreshold"
:
2000
,
"animationThreshold"
:
2000
,
"animationDuration"
:
1000
,
"animationDuration"
:
1000
,
...
@@ -186,7 +186,7 @@
...
@@ -186,7 +186,7 @@
}
}
]
]
};
};
chart_
d77a1bdf4e3c46fc836c7fde8b1b45ce
.
setOption
(
option_d77a1bdf4e3c46fc836c7fde8b1b45ce
);
chart_
91cf11eaf2fe4c2d80fe839950abc806
.
setOption
(
option_91cf11eaf2fe4c2d80fe839950abc806
);
</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