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
4cdfd0e8
authored
May 01, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
30268e00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
9 deletions
my_analysis.py
成绩
my_analysis.py
View file @
4cdfd0e8
...
@@ -2,7 +2,9 @@ from pyecharts.charts import Bar
...
@@ -2,7 +2,9 @@ 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
]
scores2
=
[
100
,
100
,
100
,
100
,
100
,
100
,
100
,
100
,
100
]
bar
=
Bar
()
bar
=
Bar
()
bar
.
add_xaxis
(
subjects
)
bar
.
add_xaxis
(
subjects
)
bar
.
add_yaxis
(
"成绩"
,
scores
)
bar
.
add_yaxis
(
"成绩"
,
scores
,
bar_width
=
20
)
bar
.
add_yaxis
(
"2成绩"
,
scores2
,
bar_width
=
20
)
bar
.
render
(
"成绩"
)
bar
.
render
(
"成绩"
)
成绩
View file @
4cdfd0e8
<!DOC
TYPE html>
<!DOC
TYPE html>
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
</head>
</head>
<body>
<body>
<div
id=
"
8f78be7455844b18b8a8243aa14dcccb
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<div
id=
"
05558231eb4846508ab2a83bcaccde8f
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<script>
<script>
var
chart_
8f78be7455844b18b8a8243aa14dcccb
=
echarts
.
init
(
var
chart_
05558231eb4846508ab2a83bcaccde8f
=
echarts
.
init
(
document
.
getElementById
(
'
8f78be7455844b18b8a8243aa14dcccb
'
),
'white'
,
{
renderer
:
'canvas'
});
document
.
getElementById
(
'
05558231eb4846508ab2a83bcaccde8f
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
8f78be7455844b18b8a8243aa14dcccb
=
{
var
option_
05558231eb4846508ab2a83bcaccde8f
=
{
"animation"
:
true
,
"animation"
:
true
,
"animationThreshold"
:
2000
,
"animationThreshold"
:
2000
,
"animationDuration"
:
1000
,
"animationDuration"
:
1000
,
...
@@ -63,6 +63,40 @@
...
@@ -63,6 +63,40 @@
89
89
],
],
"showBackground"
:
false
,
"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"
:
"2\u6210\u7ee9"
,
"legendHoverLink"
:
true
,
"data"
:
[
100
,
100
,
100
,
100
,
100
,
100
,
100
,
100
,
100
],
"showBackground"
:
false
,
"barWidth"
:
20
,
"barMinHeight"
:
0
,
"barMinHeight"
:
0
,
"barCategoryGap"
:
"20%"
,
"barCategoryGap"
:
"20%"
,
"barGap"
:
"30%"
,
"barGap"
:
"30%"
,
...
@@ -83,10 +117,12 @@
...
@@ -83,10 +117,12 @@
"legend"
:
[
"legend"
:
[
{
{
"data"
:
[
"data"
:
[
"\u6210\u7ee9"
"\u6210\u7ee9"
,
"2\u6210\u7ee9"
],
],
"selected"
:
{
"selected"
:
{
"\u6210\u7ee9"
:
true
"\u6210\u7ee9"
:
true
,
"2\u6210\u7ee9"
:
true
}
}
}
}
],
],
...
@@ -165,7 +201,7 @@
...
@@ -165,7 +201,7 @@
}
}
]
]
};
};
chart_
8f78be7455844b18b8a8243aa14dcccb
.
setOption
(
option_8f78be7455844b18b8a8243aa14dcccb
);
chart_
05558231eb4846508ab2a83bcaccde8f
.
setOption
(
option_05558231eb4846508ab2a83bcaccde8f
);
</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