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
4631db3d
authored
Jul 11, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
b60f0cfc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
17 deletions
my_analysis.py
render.html
my_analysis.py
View file @
4631db3d
from
pyecharts.charts
import
Bar
from
pyecharts.charts
import
Bar
subjects
=
[
"语文"
,
"数学"
,
"英语"
,
"地理"
,
"历史"
,
"政治"
,
"生物"
,
"化学"
,
"物理"
]
subjects
=
[
"语文"
,
"数学"
,
"英语"
,
"地理"
,
"历史"
,
"政治"
,
"生物"
,
"化学"
,
"物理"
,
"xxx"
]
scores
=
[
88
,
95
,
96
,
94
,
62
,
66
,
64
,
93
,
89
]
scores
=
[
88
000000
,
95000000
,
96000000
,
94000000
,
62000000
,
66000000
,
64000000
,
93000000
,
89000000
,
100000000
]
bar
=
Bar
()
bar
=
Bar
()
bar
.
add_xaxis
(
subjects
)
bar
.
add_xaxis
(
subjects
)
bar
.
add_yaxis
(
"xx同学"
,
scores
)
bar
.
add_yaxis
(
"xx同学"
,
scores
)
...
...
render.html
View file @
4631db3d
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
</head>
</head>
<body>
<body>
<div
id=
"
363732d9433b42bca1a285b6891b3f24
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<div
id=
"
819eff70f34f4e41ad24c28c756029c9
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<script>
<script>
var
chart_
363732d9433b42bca1a285b6891b3f24
=
echarts
.
init
(
var
chart_
819eff70f34f4e41ad24c28c756029c9
=
echarts
.
init
(
document
.
getElementById
(
'
363732d9433b42bca1a285b6891b3f24
'
),
'white'
,
{
renderer
:
'canvas'
});
document
.
getElementById
(
'
819eff70f34f4e41ad24c28c756029c9
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
363732d9433b42bca1a285b6891b3f24
=
{
var
option_
819eff70f34f4e41ad24c28c756029c9
=
{
"animation"
:
true
,
"animation"
:
true
,
"animationThreshold"
:
2000
,
"animationThreshold"
:
2000
,
"animationDuration"
:
1000
,
"animationDuration"
:
1000
,
...
@@ -52,15 +52,16 @@
...
@@ -52,15 +52,16 @@
"name"
:
"xx\u540c\u5b66"
,
"name"
:
"xx\u540c\u5b66"
,
"legendHoverLink"
:
true
,
"legendHoverLink"
:
true
,
"data"
:
[
"data"
:
[
88
,
88000000
,
95
,
95000000
,
96
,
96000000
,
94
,
94000000
,
62
,
62000000
,
66
,
66000000
,
64
,
64000000
,
93
,
93000000
,
89
89000000
,
100000000
],
],
"showBackground"
:
false
,
"showBackground"
:
false
,
"barMinHeight"
:
0
,
"barMinHeight"
:
0
,
...
@@ -137,7 +138,8 @@
...
@@ -137,7 +138,8 @@
"\u653f\u6cbb"
,
"\u653f\u6cbb"
,
"\u751f\u7269"
,
"\u751f\u7269"
,
"\u5316\u5b66"
,
"\u5316\u5b66"
,
"\u7269\u7406"
"\u7269\u7406"
,
"xxx"
]
]
}
}
],
],
...
@@ -165,7 +167,7 @@
...
@@ -165,7 +167,7 @@
}
}
]
]
};
};
chart_
363732d9433b42bca1a285b6891b3f24
.
setOption
(
option_363732d9433b42bca1a285b6891b3f24
);
chart_
819eff70f34f4e41ad24c28c756029c9
.
setOption
(
option_819eff70f34f4e41ad24c28c756029c9
);
</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