Commit c886a7f7 by BellCodeEditor

save project

parent 44cdfa24
Showing with 42 additions and 148 deletions
import turtle
q = turtle.Turtle()
for i in range(100):
q.fd=+1
q.right(90)
turtle.hideturtle()
turtle.mainloop()
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</head> </head>
<body> <body>
<div id="35e23c0296ed4cb1b9c743f7ceb0a73a" class="chart-container" style="width:900px; height:500px;"></div> <div id="45836c8666ef47dc85fd7fe51cfbcfa1" class="chart-container" style="width:900px; height:500px;"></div>
<script> <script>
var chart_35e23c0296ed4cb1b9c743f7ceb0a73a = echarts.init( var chart_45836c8666ef47dc85fd7fe51cfbcfa1 = echarts.init(
document.getElementById('35e23c0296ed4cb1b9c743f7ceb0a73a'), 'white', {renderer: 'canvas'}); document.getElementById('45836c8666ef47dc85fd7fe51cfbcfa1'), 'white', {renderer: 'canvas'});
var option_35e23c0296ed4cb1b9c743f7ceb0a73a = { var option_45836c8666ef47dc85fd7fe51cfbcfa1 = {
"animation": true, "animation": true,
"animationThreshold": 2000, "animationThreshold": 2000,
"animationDuration": 1000, "animationDuration": 1000,
...@@ -48,65 +48,35 @@ ...@@ -48,65 +48,35 @@
], ],
"series": [ "series": [
{ {
"type": "bar", "type": "pie",
"name": "\u732a\u7684\u6210\u7ee9\u8868", "name": "\u732a\u7684\u6210\u7ee9\u8868",
"legendHoverLink": true, "clockwise": true,
"data": [ "data": [
88, {
95, "name": "A",
96, "value": 30
94, },
62, {
66, "name": "B",
64, "value": 40
93, },
89 {
"name": "C",
"value": 20
},
{
"name": "D",
"value": 10
}
], ],
"showBackground": false, "radius": [
"barWidth": 25, "30%",
"barMinHeight": 0, "70%"
"barCategoryGap": "20%", ],
"barGap": "30%", "center": [
"large": false, "50%",
"largeThreshold": 400, "50%"
"seriesLayoutBy": "column",
"datasetIndex": 0,
"clip": true,
"zlevel": 0,
"z": 2,
"label": {
"show": true,
"position": "top",
"margin": 8
}
},
{
"type": "bar",
"name": "\u72d7\u7684\u6210\u7ee9\u8868",
"legendHoverLink": true,
"data": [
98,
100,
96,
98,
10000,
76,
74,
100,
91
], ],
"showBackground": false,
"barWidth": 25,
"barMinHeight": 0,
"barCategoryGap": "20%",
"barGap": "30%",
"large": false,
"largeThreshold": 400,
"seriesLayoutBy": "column",
"datasetIndex": 0,
"clip": true,
"zlevel": 0,
"z": 2,
"label": { "label": {
"show": true, "show": true,
"position": "top", "position": "top",
...@@ -117,13 +87,12 @@ ...@@ -117,13 +87,12 @@
"legend": [ "legend": [
{ {
"data": [ "data": [
"\u732a\u7684\u6210\u7ee9\u8868", "A",
"\u72d7\u7684\u6210\u7ee9\u8868" "B",
"C",
"D"
], ],
"selected": { "selected": {}
"\u732a\u7684\u6210\u7ee9\u8868": true,
"\u72d7\u7684\u6210\u7ee9\u8868": true
}
} }
], ],
"tooltip": { "tooltip": {
...@@ -142,66 +111,9 @@ ...@@ -142,66 +111,9 @@
}, },
"borderWidth": 0, "borderWidth": 0,
"padding": 5 "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": [
"\u8bed\u6587",
"\u6570\u5b66",
"\u82f1\u8bed",
"\u5730\u7406",
"\u5386\u53f2",
"\u653f\u6cbb",
"\u751f\u7269",
"\u5316\u5b66",
"\u7269\u7406"
]
}
],
"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_35e23c0296ed4cb1b9c743f7ceb0a73a.setOption(option_35e23c0296ed4cb1b9c743f7ceb0a73a); chart_45836c8666ef47dc85fd7fe51cfbcfa1.setOption(option_45836c8666ef47dc85fd7fe51cfbcfa1);
</script> </script>
</body> </body>
</html> </html>
from pyecharts.charts import Bar from pyecharts.charts import Pie
subjects = ["语文","数学","英语","地理","历史","政治","生物","化学","物理"] subjects = ["语文","数学","英语","地理","历史","政治","生物","化学","物理"]
scores = [88, 95, 96, 94, 62, 66, 64, 93, 89] scores = [88, 95, 96, 94, 62, 66, 64, 93, 89]
scores1 = [98, 100, 96, 98, 67, 76, 74, 100, 91]
bar = Bar() pie = Pie()
bar.add_xaxis(subjects)
bar.add_yaxis("猪的成绩表",scores,bar_width=25) pie.add("猪的成绩表",[("A",30),("B",40),("C",20),("D",10)],radius=["30%","70%"])
bar.add_yaxis("狗的成绩表",scores1,bar_width=25)
bar.render("11.html")
\ No newline at end of file pie.render("11.html")
\ No newline at end of file
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