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
41ca6e12
authored
Mar 26, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
a634ecf0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
11 deletions
my_analysis.py
render.html
my_analysis.py
View file @
41ca6e12
...
...
@@ -3,11 +3,19 @@ from pyecharts.charts import Bar
name
=
[
"浈浈"
,
"聪聪"
,
"小智"
,
"波奇"
]
s1
=
[
92
,
95
,
82
,
88
]
# 期中成绩
s2
=
[
95
,
79
,
93
,
90
]
# 期末成绩
s3
=
[
55
,
89
,
33
,
10
]
s4
=
[
65
,
73
,
13
,
50
]
bar
=
Bar
()
bar
.
add_xaxis
(
name
)
bar
.
add_yaxis
(
'七种成鸡'
,
s1
,
bar_width
=
40
)
bar
.
add_yaxis
(
'七摸成鸡'
,
s2
,
bar_width
=
40
)
bar
.
add_yaxis
(
'七种成鸡'
,
s1
,
bar_width
=
20
)
bar
.
add_yaxis
(
'七摸成鸡'
,
s2
,
bar_width
=
20
)
bar
.
add_yaxis
(
'七tian==成鸡'
,
s3
,
bar_width
=
20
)
bar
.
add_yaxis
(
'七askdja成鸡'
,
s4
,
bar_width
=
20
)
bar
.
render
()
...
...
render.html
View file @
41ca6e12
...
...
@@ -7,11 +7,11 @@
</head>
<body>
<div
id=
"
dcdea365b01a41d49ddc450866ee4015
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<div
id=
"
f7044b1e42304152a555f89d19bda34f
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<script>
var
chart_
dcdea365b01a41d49ddc450866ee4015
=
echarts
.
init
(
document
.
getElementById
(
'
dcdea365b01a41d49ddc450866ee4015
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
dcdea365b01a41d49ddc450866ee4015
=
{
var
chart_
f7044b1e42304152a555f89d19bda34f
=
echarts
.
init
(
document
.
getElementById
(
'
f7044b1e42304152a555f89d19bda34f
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
f7044b1e42304152a555f89d19bda34f
=
{
"animation"
:
true
,
"animationThreshold"
:
2000
,
"animationDuration"
:
1000
,
...
...
@@ -58,7 +58,7 @@
88
],
"showBackground"
:
false
,
"barWidth"
:
4
0
,
"barWidth"
:
2
0
,
"barMinHeight"
:
0
,
"barCategoryGap"
:
"20%"
,
"barGap"
:
"30%"
,
...
...
@@ -86,7 +86,63 @@
90
],
"showBackground"
:
false
,
"barWidth"
:
40
,
"barWidth"
:
20
,
"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"
:
"\u4e03tian==\u6210\u9e21"
,
"legendHoverLink"
:
true
,
"data"
:
[
55
,
89
,
33
,
10
],
"showBackground"
:
false
,
"barWidth"
:
20
,
"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"
:
"\u4e03askdja\u6210\u9e21"
,
"legendHoverLink"
:
true
,
"data"
:
[
65
,
73
,
13
,
50
],
"showBackground"
:
false
,
"barWidth"
:
20
,
"barMinHeight"
:
0
,
"barCategoryGap"
:
"20%"
,
"barGap"
:
"30%"
,
...
...
@@ -108,11 +164,15 @@
{
"data"
:
[
"\u4e03\u79cd\u6210\u9e21"
,
"\u4e03\u6478\u6210\u9e21"
"\u4e03\u6478\u6210\u9e21"
,
"\u4e03tian==\u6210\u9e21"
,
"\u4e03askdja\u6210\u9e21"
],
"selected"
:
{
"\u4e03\u79cd\u6210\u9e21"
:
true
,
"\u4e03\u6478\u6210\u9e21"
:
true
"\u4e03\u6478\u6210\u9e21"
:
true
,
"\u4e03tian==\u6210\u9e21"
:
true
,
"\u4e03askdja\u6210\u9e21"
:
true
}
}
],
...
...
@@ -186,7 +246,7 @@
}
]
};
chart_
dcdea365b01a41d49ddc450866ee4015
.
setOption
(
option_dcdea365b01a41d49ddc450866ee4015
);
chart_
f7044b1e42304152a555f89d19bda34f
.
setOption
(
option_f7044b1e42304152a555f89d19bda34f
);
</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