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
2c1e9ae7
authored
Nov 12, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
d782f08d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
365 additions
and
16 deletions
chengji.html
maths.html
my_analysis.py
chengji.html
View file @
2c1e9ae7
...
...
@@ -7,11 +7,11 @@
</head>
<body>
<div
id=
"
1b48a7817258490ba1bc178125c5ba11
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<div
id=
"
e7868acc02a84ce19208b62f2a59462f
"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<script>
var
chart_
1b48a7817258490ba1bc178125c5ba11
=
echarts
.
init
(
document
.
getElementById
(
'
1b48a7817258490ba1bc178125c5ba11
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
1b48a7817258490ba1bc178125c5ba11
=
{
var
chart_
e7868acc02a84ce19208b62f2a59462f
=
echarts
.
init
(
document
.
getElementById
(
'
e7868acc02a84ce19208b62f2a59462f
'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_
e7868acc02a84ce19208b62f2a59462f
=
{
"animation"
:
true
,
"animationThreshold"
:
2000
,
"animationDuration"
:
1000
,
...
...
@@ -186,7 +186,7 @@
}
]
};
chart_
1b48a7817258490ba1bc178125c5ba11
.
setOption
(
option_1b48a7817258490ba1bc178125c5ba11
);
chart_
e7868acc02a84ce19208b62f2a59462f
.
setOption
(
option_e7868acc02a84ce19208b62f2a59462f
);
</script>
</body>
</html>
maths.html
0 → 100644
View file @
2c1e9ae7
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
Awesome-pyecharts
</title>
<script
type=
"text/javascript"
src=
"https://assets.pyecharts.org/assets/echarts.min.js"
></script>
</head>
<body>
<div
id=
"e1164a5add4c4a039f5fbdff3ba9499b"
class=
"chart-container"
style=
"width:900px; height:500px;"
></div>
<script>
var
chart_e1164a5add4c4a039f5fbdff3ba9499b
=
echarts
.
init
(
document
.
getElementById
(
'e1164a5add4c4a039f5fbdff3ba9499b'
),
'white'
,
{
renderer
:
'canvas'
});
var
option_e1164a5add4c4a039f5fbdff3ba9499b
=
{
"animation"
:
true
,
"animationThreshold"
:
2000
,
"animationDuration"
:
1000
,
"animationEasing"
:
"cubicOut"
,
"animationDelay"
:
0
,
"animationDurationUpdate"
:
300
,
"animationEasingUpdate"
:
"cubicOut"
,
"animationDelayUpdate"
:
0
,
"color"
:
[
"#c23531"
,
"#2f4554"
,
"#61a0a8"
,
"#d48265"
,
"#749f83"
,
"#ca8622"
,
"#bda29a"
,
"#6e7074"
,
"#546570"
,
"#c4ccd3"
,
"#f05b72"
,
"#ef5b9c"
,
"#f47920"
,
"#905a3d"
,
"#fab27b"
,
"#2a5caa"
,
"#444693"
,
"#726930"
,
"#b2d235"
,
"#6d8346"
,
"#ac6767"
,
"#1d953f"
,
"#6950a1"
,
"#918597"
],
"series"
:
[
{
"type"
:
"line"
,
"name"
:
"scores1"
,
"connectNulls"
:
false
,
"symbolSize"
:
4
,
"showSymbol"
:
true
,
"smooth"
:
false
,
"clip"
:
true
,
"step"
:
false
,
"data"
:
[
[
"\u7b2c1\u6b21"
,
92
],
[
"\u7b2c2\u6b21"
,
95
],
[
"\u7b2c3\u6b21"
,
82
],
[
"\u7b2c4\u6b21"
,
88
],
[
"\u7b2c5\u6b21"
,
56
],
[
"\u7b2c6\u6b21"
,
59
],
[
"\u7b2c7\u6b21"
,
24
],
[
"\u7b2c8\u6b21"
,
56
]
],
"hoverAnimation"
:
true
,
"label"
:
{
"show"
:
true
,
"position"
:
"top"
,
"margin"
:
8
},
"lineStyle"
:
{
"show"
:
true
,
"width"
:
1
,
"opacity"
:
1
,
"curveness"
:
0
,
"type"
:
"solid"
},
"areaStyle"
:
{
"opacity"
:
0
},
"zlevel"
:
0
,
"z"
:
0
},
{
"type"
:
"line"
,
"name"
:
"scores2"
,
"connectNulls"
:
false
,
"symbolSize"
:
4
,
"showSymbol"
:
true
,
"smooth"
:
false
,
"clip"
:
true
,
"step"
:
false
,
"data"
:
[
[
"\u7b2c1\u6b21"
,
95
],
[
"\u7b2c2\u6b21"
,
79
],
[
"\u7b2c3\u6b21"
,
93
],
[
"\u7b2c4\u6b21"
,
90
],
[
"\u7b2c5\u6b21"
,
67
],
[
"\u7b2c6\u6b21"
,
43
],
[
"\u7b2c7\u6b21"
,
67
],
[
"\u7b2c8\u6b21"
,
65
]
],
"hoverAnimation"
:
true
,
"label"
:
{
"show"
:
true
,
"position"
:
"top"
,
"margin"
:
8
},
"lineStyle"
:
{
"show"
:
true
,
"width"
:
1
,
"opacity"
:
1
,
"curveness"
:
0
,
"type"
:
"solid"
},
"areaStyle"
:
{
"opacity"
:
0
},
"zlevel"
:
0
,
"z"
:
0
},
{
"type"
:
"line"
,
"name"
:
"scores3"
,
"connectNulls"
:
false
,
"symbolSize"
:
4
,
"showSymbol"
:
true
,
"smooth"
:
false
,
"clip"
:
true
,
"step"
:
false
,
"data"
:
[
[
"\u7b2c1\u6b21"
,
132
],
[
"\u7b2c2\u6b21"
,
5
],
[
"\u7b2c3\u6b21"
,
4
],
[
"\u7b2c4\u6b21"
,
3
],
[
"\u7b2c5\u6b21"
,
45
],
[
"\u7b2c6\u6b21"
,
43
],
[
"\u7b2c7\u6b21"
,
54
],
[
"\u7b2c8\u6b21"
,
31
],
[
"\u7b2c9\u6b21"
,
54
],
[
"\u7b2c10\u6b21"
,
35
]
],
"hoverAnimation"
:
true
,
"label"
:
{
"show"
:
true
,
"position"
:
"top"
,
"margin"
:
8
},
"lineStyle"
:
{
"show"
:
true
,
"width"
:
1
,
"opacity"
:
1
,
"curveness"
:
0
,
"type"
:
"solid"
},
"areaStyle"
:
{
"opacity"
:
0
},
"zlevel"
:
0
,
"z"
:
0
}
],
"legend"
:
[
{
"data"
:
[
"scores1"
,
"scores2"
,
"scores3"
],
"selected"
:
{
"scores1"
:
true
,
"scores2"
:
true
,
"scores3"
:
true
},
"show"
:
true
,
"padding"
:
5
,
"itemGap"
:
10
,
"itemWidth"
:
25
,
"itemHeight"
:
14
}
],
"tooltip"
:
{
"show"
:
true
,
"trigger"
:
"item"
,
"triggerOn"
:
"mousemove|click"
,
"axisPointer"
:
{
"type"
:
"line"
},
"showContent"
:
true
,
"alwaysShowContent"
:
false
,
"showDelay"
:
0
,
"hideDelay"
:
100
,
"textStyle"
:
{
"fontSize"
:
14
},
"borderWidth"
:
0
,
"padding"
:
5
},
"xAxis"
:
[
{
"show"
:
true
,
"scale"
:
false
,
"nameLocation"
:
"end"
,
"nameGap"
:
15
,
"gridIndex"
:
0
,
"inverse"
:
false
,
"offset"
:
0
,
"splitNumber"
:
5
,
"minInterval"
:
0
,
"splitLine"
:
{
"show"
:
false
,
"lineStyle"
:
{
"show"
:
true
,
"width"
:
1
,
"opacity"
:
1
,
"curveness"
:
0
,
"type"
:
"solid"
}
},
"data"
:
[
"\u7b2c1\u6b21"
,
"\u7b2c2\u6b21"
,
"\u7b2c3\u6b21"
,
"\u7b2c4\u6b21"
,
"\u7b2c5\u6b21"
,
"\u7b2c6\u6b21"
,
"\u7b2c7\u6b21"
,
"\u7b2c8\u6b21"
,
"\u7b2c9\u6b21"
,
"\u7b2c10\u6b21"
]
}
],
"yAxis"
:
[
{
"show"
:
true
,
"scale"
:
false
,
"nameLocation"
:
"end"
,
"nameGap"
:
15
,
"gridIndex"
:
0
,
"inverse"
:
false
,
"offset"
:
0
,
"splitNumber"
:
5
,
"minInterval"
:
0
,
"splitLine"
:
{
"show"
:
false
,
"lineStyle"
:
{
"show"
:
true
,
"width"
:
1
,
"opacity"
:
1
,
"curveness"
:
0
,
"type"
:
"solid"
}
}
}
],
"title"
:
{
"text"
:
"\u6570\u5b66"
,
"subtext"
:
"\u603b\u5206150"
}
};
chart_e1164a5add4c4a039f5fbdff3ba9499b
.
setOption
(
option_e1164a5add4c4a039f5fbdff3ba9499b
);
</script>
</body>
</html>
my_analysis.py
View file @
2c1e9ae7
from
pyecharts.charts
import
Bar
from
pyecharts.charts
import
Line
subjects
=
[
"浈浈"
,
"聪聪"
,
"小智"
,
"波奇"
]
scores1
=
[
92
,
95
,
82
,
88
]
# 期中成绩
scores2
=
[
95
,
79
,
93
,
90
]
# 期末成绩
bar
=
Bar
()
bar
.
add_xaxis
(
subjects
)
bar
.
add_yaxis
(
"期中成绩"
,
scores1
,
bar_width
=
30
)
bar
.
add_yaxis
(
"期末成绩"
,
scores2
,
bar_width
=
30
)
bar
.
render
(
"chengji.html"
)
\ No newline at end of file
subjects
=
[
"第1次"
,
"第2次"
,
"第3次"
,
"第4次"
,
"第5次"
,
"第6次"
,
"第7次"
,
"第8次"
,
"第9次"
,
"第10次"
,]
scores1
=
[
92
,
95
,
82
,
88
,
56
,
59
,
24
,
56
]
# 期中成绩
scores2
=
[
95
,
79
,
93
,
90
,
67
,
43
,
67
,
65
]
# 期末成绩
scores3
=
[
132
,
5
,
4
,
3
,
45
,
43
,
54
,
31
,
54
,
35
]
line
=
Line
()
line
.
add_xaxis
(
subjects
)
line
.
add_yaxis
(
"scores1"
,
scores1
)
line
.
add_yaxis
(
"scores2"
,
scores2
)
line
.
add_yaxis
(
"scores3"
,
scores3
)
line
.
set_global_opts
(
title_opts
=
{
"text"
:
"数学"
,
"subtext"
:
"总分150"
})
line
.
render
(
"maths.html"
)
\ No newline at end of file
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