Commit c886a7f7 by BellCodeEditor

save project

parent 44cdfa24
Showing with 40 additions and 146 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 @@
</head>
<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>
var chart_35e23c0296ed4cb1b9c743f7ceb0a73a = echarts.init(
document.getElementById('35e23c0296ed4cb1b9c743f7ceb0a73a'), 'white', {renderer: 'canvas'});
var option_35e23c0296ed4cb1b9c743f7ceb0a73a = {
var chart_45836c8666ef47dc85fd7fe51cfbcfa1 = echarts.init(
document.getElementById('45836c8666ef47dc85fd7fe51cfbcfa1'), 'white', {renderer: 'canvas'});
var option_45836c8666ef47dc85fd7fe51cfbcfa1 = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
......@@ -48,65 +48,35 @@
],
"series": [
{
"type": "bar",
"type": "pie",
"name": "\u732a\u7684\u6210\u7ee9\u8868",
"legendHoverLink": true,
"clockwise": true,
"data": [
88,
95,
96,
94,
62,
66,
64,
93,
89
],
"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": {
"show": true,
"position": "top",
"margin": 8
}
{
"name": "A",
"value": 30
},
{
"type": "bar",
"name": "\u72d7\u7684\u6210\u7ee9\u8868",
"legendHoverLink": true,
"data": [
98,
100,
96,
98,
10000,
76,
74,
100,
91
"name": "B",
"value": 40
},
{
"name": "C",
"value": 20
},
{
"name": "D",
"value": 10
}
],
"radius": [
"30%",
"70%"
],
"center": [
"50%",
"50%"
],
"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": {
"show": true,
"position": "top",
......@@ -117,13 +87,12 @@
"legend": [
{
"data": [
"\u732a\u7684\u6210\u7ee9\u8868",
"\u72d7\u7684\u6210\u7ee9\u8868"
"A",
"B",
"C",
"D"
],
"selected": {
"\u732a\u7684\u6210\u7ee9\u8868": true,
"\u72d7\u7684\u6210\u7ee9\u8868": true
}
"selected": {}
}
],
"tooltip": {
......@@ -142,66 +111,9 @@
},
"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": [
"\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>
</body>
</html>
from pyecharts.charts import Bar
from pyecharts.charts import Pie
subjects = ["语文","数学","英语","地理","历史","政治","生物","化学","物理"]
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)
bar.add_yaxis("狗的成绩表",scores1,bar_width=25)
pie.add("猪的成绩表",[("A",30),("B",40),("C",20),("D",10)],radius=["30%","70%"])
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