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
a8e99e03
authored
Jul 28, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
ffa4f80f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
my_analysis.py
render.html
my_analysis.py
View file @
a8e99e03
...
...
@@ -5,6 +5,6 @@ scores1 = [92, 95, 82, 88] # 期中成绩
scores2
=
[
95
,
79
,
93
,
90
]
# 期末成绩
bar
=
charts
.
Bar
()
bar
.
add_xaxis
(
subjects
)
bar
.
add_yaxis
(
"期中成绩"
,
scores1
)
bar
.
add_yaxis
(
"期末成绩"
,
scores2
)
bar
.
add_yaxis
(
"期中成绩"
,
scores1
,
bar_width
=
40
)
bar
.
add_yaxis
(
"期末成绩"
,
scores2
,
bar_width
=
40
)
bar
.
render
()
\ No newline at end of file
render.html
View file @
a8e99e03
...
...
@@ -7,11 +7,11 @@
</head>
<body>
<div
id=
"
470107a16daf4ba589066f7cf81475fa
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<div
id=
"
bedbfd2d828e4d60a444996e8325e30f
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<script>
var
chart_
470107a16daf4ba589066f7cf81475fa
=
echarts
.
init
(
document
.
getElementById
(
'
470107a16daf4ba589066f7cf81475fa
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
470107a16daf4ba589066f7cf81475fa
=
{
var
chart_
bedbfd2d828e4d60a444996e8325e30f
=
echarts
.
init
(
document
.
getElementById
(
'
bedbfd2d828e4d60a444996e8325e30f
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
bedbfd2d828e4d60a444996e8325e30f
=
{
"animation"
:
true
,
"animationThreshold"
:
2000
,
"animationDuration"
:
1000
,
...
...
@@ -58,6 +58,7 @@
88
],
"showBackground"
:
false
,
"barWidth"
:
40
,
"barMinHeight"
:
0
,
"barCategoryGap"
:
"20%"
,
"barGap"
:
"30%"
,
...
...
@@ -85,6 +86,7 @@
90
],
"showBackground"
:
false
,
"barWidth"
:
40
,
"barMinHeight"
:
0
,
"barCategoryGap"
:
"20%"
,
"barGap"
:
"30%"
,
...
...
@@ -184,7 +186,7 @@
}
]
};
chart_
470107a16daf4ba589066f7cf81475fa
.
setOption
(
option_470107a16daf4ba589066f7cf81475fa
);
chart_
bedbfd2d828e4d60a444996e8325e30f
.
setOption
(
option_bedbfd2d828e4d60a444996e8325e30f
);
</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