Commit 302dd7fc by BellCodeEditor

save project

parent 66d58762
Showing with 568 additions and 11 deletions
<!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="cccb749046914b72ab6d3f4b955d45d9" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_cccb749046914b72ab6d3f4b955d45d9 = echarts.init(
document.getElementById('cccb749046914b72ab6d3f4b955d45d9'), 'white', {renderer: 'canvas'});
var option_cccb749046914b72ab6d3f4b955d45d9 = {
"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": "cong",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
[
" 1",
112
],
[
" 2",
110
],
[
"3 ",
118
],
[
" 4",
124
],
[
" 5 ",
129
],
[
"6 ",
132
],
[
"7 ",
136
],
[
"8 ",
139
],
[
"9",
144
],
[
"10",
143
]
],
"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": "jie",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
[
" 1",
128
],
[
" 2",
131
],
[
"3 ",
132
],
[
" 4",
129
],
[
" 5 ",
130
],
[
"6 ",
127
],
[
"7 ",
129
],
[
"8 ",
131
],
[
"9",
132
],
[
"10",
128
]
],
"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": "pi",
"connectNulls": false,
"symbolSize": 4,
"showSymbol": true,
"smooth": false,
"clip": true,
"step": false,
"data": [
[
" 1",
143
],
[
" 2",
145
],
[
"3 ",
140
],
[
" 4",
133
],
[
" 5 ",
124
],
[
"6 ",
126
],
[
"7 ",
121
],
[
"8 ",
120
],
[
"9",
114
],
[
"10",
105
]
],
"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": [
"cong",
"jie",
"pi"
],
"selected": {
"cong": true,
"jie": true,
"pi": 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": [
" 1",
" 2",
"3 ",
" 4",
" 5 ",
"6 ",
"7 ",
"8 ",
"9",
"10"
]
}
],
"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": "suxue",
"subtext": "150"
}
};
chart_cccb749046914b72ab6d3f4b955d45d9.setOption(option_cccb749046914b72ab6d3f4b955d45d9);
</script>
</body>
</html>
from pyecharts.charts import Bar
subjects = ["语文","数学","英语","地理","历史","政治","生物","化学","物理"]
scores = [88, 95, 96, 94, 62, 66, 64, 93, 89]
bar=Bar()
bar.add_xaxis(subjects)
bar.add_yaxis('坤坤同学的成绩',scores)
bar.render()
from pyecharts.charts import Line
test=[' 1' , ' 2', '3 ', ' 4', ' 5 ' ,'6 ' ,'7 ' ,'8 ','9','10']
student1=[112,110,118,124,129,132,136,139,144,143]
student2=[128,131,132,129,130,127,129,131,132,128]
student3=[143,145,140,133,124,126,121,120,114,105]
line=Line()
line.add_xaxis(test)
line.add_yaxis('cong',student1)
line.add_yaxis('jie',student2)
line.add_yaxis('pi',student3)
line.set_global_opts(title_opts={'text':'suxue','subtext':'150'})
line.render('kun.html')
<!DOCTYPE html>
<!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="7603fd9f45584c3986b665cb56452af0" class="chart-container" style="width:900px; height:500px;"></div>
<script>
var chart_7603fd9f45584c3986b665cb56452af0 = echarts.init(
document.getElementById('7603fd9f45584c3986b665cb56452af0'), 'white', {renderer: 'canvas'});
var option_7603fd9f45584c3986b665cb56452af0 = {
"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": "bar",
"name": "\u671f\u4e2d\u6210\u7ee9",
"legendHoverLink": true,
"data": [
92,
95,
82,
88
],
"showBackground": false,
"barWidth": 30,
"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": "\u671f\u672b\u6210\u7ee9",
"legendHoverLink": true,
"data": [
95,
79,
93,
90
],
"showBackground": false,
"barWidth": 30,
"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
}
}
],
"legend": [
{
"data": [
"\u671f\u4e2d\u6210\u7ee9",
"\u671f\u672b\u6210\u7ee9"
],
"selected": {
"\u671f\u4e2d\u6210\u7ee9": true,
"\u671f\u672b\u6210\u7ee9": true
}
}
],
"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": [
"\u671f\u4e2d",
"\u671f\u672b"
]
}
],
"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"
}
}
}
]
};
chart_7603fd9f45584c3986b665cb56452af0.setOption(option_7603fd9f45584c3986b665cb56452af0);
</script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment