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
f322bdea
authored
Sep 09, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
d920a98d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
21 deletions
cnjsdnvcios.py
my_analysis.py
render.html
cnjsdnvcios.py
View file @
f322bdea
from
pyecharts.charts
import
Bar
from
pyecharts.charts
import
Bar
bar
=
Bar
()
bar
=
Bar
()
bar
.
add_xaxis
([
"
衬衫
"
,
"羊毛衫"
,
"雪纺衫"
,
"裤子"
,
"高跟鞋"
,
"袜子"
])
bar
.
add_xaxis
([
""
,
"羊毛衫"
,
"雪纺衫"
,
"裤子"
,
"高跟鞋"
,
"袜子"
])
bar
.
add_yaxis
(
"月商品销售表"
,[
5
,
20
,
36
,
10
,
75
,
90
])
bar
.
add_yaxis
(
"月商品销售表"
,[
5
,
20
,
36
,
10
,
75
,
90
])
bar
.
render
()
bar
.
render
()
\ No newline at end of file
my_analysis.py
View file @
f322bdea
...
@@ -2,3 +2,7 @@ from pyecharts.charts import Bar
...
@@ -2,3 +2,7 @@ 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
]
bar
=
Bar
()
bar
.
add_xaxis
(
subjects
)
bar
.
add_yaxis
(
"各科分数"
,
scores
)
bar
.
render
()
render.html
View file @
f322bdea
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
</head>
</head>
<body>
<body>
<div
id=
"
3e64208160b94e4c8b29fcf8f88025e
1"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<div
id=
"
61a67168e78d41bcbe7fa673a77c4d4
1"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<script>
<script>
var
chart_
3e64208160b94e4c8b29fcf8f88025e
1
=
echarts
.
init
(
var
chart_
61a67168e78d41bcbe7fa673a77c4d4
1
=
echarts
.
init
(
document
.
getElementById
(
'
3e64208160b94e4c8b29fcf8f88025e
1'
),
'white'
,
{
renderer
:
'canvas'
});
document
.
getElementById
(
'
61a67168e78d41bcbe7fa673a77c4d4
1'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
3e64208160b94e4c8b29fcf8f88025e
1
=
{
var
option_
61a67168e78d41bcbe7fa673a77c4d4
1
=
{
"animation"
:
true
,
"animation"
:
true
,
"animationThreshold"
:
2000
,
"animationThreshold"
:
2000
,
"animationDuration"
:
1000
,
"animationDuration"
:
1000
,
...
@@ -49,15 +49,18 @@
...
@@ -49,15 +49,18 @@
"series"
:
[
"series"
:
[
{
{
"type"
:
"bar"
,
"type"
:
"bar"
,
"name"
:
"\u
6708\u5546\u54c1\u9500\u552e\u8868
"
,
"name"
:
"\u
5404\u79d1\u5206\u6570
"
,
"legendHoverLink"
:
true
,
"legendHoverLink"
:
true
,
"data"
:
[
"data"
:
[
5
,
88
,
20
,
95
,
36
,
96
,
10
,
94
,
75
,
62
,
90
66
,
64
,
93
,
89
],
],
"showBackground"
:
false
,
"showBackground"
:
false
,
"barMinHeight"
:
0
,
"barMinHeight"
:
0
,
...
@@ -80,10 +83,10 @@
...
@@ -80,10 +83,10 @@
"legend"
:
[
"legend"
:
[
{
{
"data"
:
[
"data"
:
[
"\u
6708\u5546\u54c1\u9500\u552e\u8868
"
"\u
5404\u79d1\u5206\u6570
"
],
],
"selected"
:
{
"selected"
:
{
"\u
6708\u5546\u54c1\u9500\u552e\u8868
"
:
true
"\u
5404\u79d1\u5206\u6570
"
:
true
}
}
}
}
],
],
...
@@ -126,12 +129,15 @@
...
@@ -126,12 +129,15 @@
}
}
},
},
"data"
:
[
"data"
:
[
"\u886c\u886b"
,
"\u8bed\u6587"
,
"\u7f8a\u6bdb\u886b"
,
"\u6570\u5b66"
,
"\u96ea\u7eba\u886b"
,
"\u82f1\u8bed"
,
"\u88e4\u5b50"
,
"\u5730\u7406"
,
"\u9ad8\u8ddf\u978b"
,
"\u5386\u53f2"
,
"\u889c\u5b50"
"\u653f\u6cbb"
,
"\u751f\u7269"
,
"\u5316\u5b66"
,
"\u7269\u7406"
]
]
}
}
],
],
...
@@ -159,7 +165,7 @@
...
@@ -159,7 +165,7 @@
}
}
]
]
};
};
chart_
3e64208160b94e4c8b29fcf8f88025e1
.
setOption
(
option_3e64208160b94e4c8b29fcf8f88025e
1
);
chart_
61a67168e78d41bcbe7fa673a77c4d41
.
setOption
(
option_61a67168e78d41bcbe7fa673a77c4d4
1
);
</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