Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson24-diy3
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
0b5d37af
authored
May 31, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
4cc3d781
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
18 deletions
line.html
my_analysis.py
line.html
View file @
0b5d37af
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
</head>
</head>
<body>
<body>
<div
id=
"
7d65d790783a470f963374a8fa352ac
c"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<div
id=
"
92886f10b34a4a5dba36093a85daeb3
c"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<script>
<script>
var
chart_
7d65d790783a470f963374a8fa352ac
c
=
echarts
.
init
(
var
chart_
92886f10b34a4a5dba36093a85daeb3
c
=
echarts
.
init
(
document
.
getElementById
(
'
7d65d790783a470f963374a8fa352ac
c'
),
'white'
,
{
renderer
:
'canvas'
});
document
.
getElementById
(
'
92886f10b34a4a5dba36093a85daeb3
c'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
7d65d790783a470f963374a8fa352ac
c
=
{
var
option_
92886f10b34a4a5dba36093a85daeb3
c
=
{
"animation"
:
true
,
"animation"
:
true
,
"animationThreshold"
:
2000
,
"animationThreshold"
:
2000
,
"animationDuration"
:
1000
,
"animationDuration"
:
1000
,
...
@@ -357,7 +357,7 @@
...
@@ -357,7 +357,7 @@
"subtext"
:
"\u5206\u6570"
"subtext"
:
"\u5206\u6570"
}
}
};
};
chart_
7d65d790783a470f963374a8fa352acc
.
setOption
(
option_7d65d790783a470f963374a8fa352ac
c
);
chart_
92886f10b34a4a5dba36093a85daeb3c
.
setOption
(
option_92886f10b34a4a5dba36093a85daeb3
c
);
</script>
</script>
</body>
</body>
</html>
</html>
my_analysis.py
View file @
0b5d37af
from
pyecharts.charts
import
Line
import
turtle
as
t
import
turtle
as
r
t
.
setup
(
1000
,
800
)
t
.
screensize
(
1000
,
800
,
"yellow"
)
def
draw_circle
(
radius
,
color
,
y_position
):
t
.
penup
()
t
.
pensize
(
18
)
test
=
[
"第1次"
,
"第2次"
,
"第3次"
,
"第4次"
,
"第5次"
,
"第6次"
,
"第7次"
,
"第8次"
,
"第9次"
,
"第10次"
]
t
.
fillcolor
(
color
)
student1
=
[
112
,
110
,
118
,
124
,
129
,
132
,
136
,
139
,
144
,
143
]
# 聪聪
student2
=
[
128
,
131
,
132
,
129
,
130
,
127
,
129
,
131
,
132
,
128
]
# 小杰
student3
=
[
143
,
145
,
140
,
133
,
134
,
126
,
121
,
120
,
114
,
105
]
# 皮皮
line
=
Line
()
t
.
goto
(
0
,
y_position
)
line
.
add_xaxis
(
test
)
t
.
pendown
()
line
.
add_yaxis
(
"聪聪"
,
student1
)
t
.
begin_fill
()
line
.
add_yaxis
(
"小杰"
,
student2
)
t
.
circle
(
radius
)
line
.
add_yaxis
(
"皮皮"
,
student3
)
t
.
end_fill
()
def
draw_bullent
():
t
.
penup
()
t
.
goto
(
r
.
randint
(
-
200
,
200
),
r
.
randint
(
-
200
,
200
))
t
.
pendown
()
t
.
dot
(
999
)
draw_circle
(
200
,
'yellow'
,
-
200
)
draw_circle
(
150
,
'red'
,
-
150
)
draw_circle
(
100
,
'blue'
,
-
100
)
draw_circle
(
50
,
'skyblue'
,
-
50
)
for
_
in
range
(
5
):
draw_bullent
()
t
.
hideturtle
()
t
.
done
()
line
.
set_global_opts
(
title_opts
=
{
"text"
:
"数学成绩"
,
"subtext"
:
"分数"
})
line
.
render
(
"line.html"
)
\ No newline at end of file
\ No newline at end of file
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