var myChart81 = echarts.init(document.querySelector(".echart81"))
var myChart82 = echarts.init(document.querySelector(".echart82"))
var myChart83 = echarts.init(document.querySelector(".echart83"))
var myChart84 = echarts.init(document.querySelector(".echart84"))

$.get("http://118.178.224.202:8024/api/new2",function(data){
   console.log("最后的数据",data)
   $("#xinhaigang").html(data.data[0].new)
   $("#gaizaomian").html(data.data[0].reform)
   $("#wanchengmian").html(data.data[0].finish)
   $("#shishixiang").html(data.data[0].start)

   var option81 = {
    tooltip: {
      trigger: "item",
      show: true,
      showContent: true,
    },
    series: [{
      type: "pie",
      radius: ["70%", "90%"],
      avoidLabelOverlap: false,
      labelLine: {
        show: false,
      },
  
      data: [{
        value: data.data[0].new,
        name: "100%",
        label: {
          position: "center",
          fontSize: 18,
        },
        itemStyle: {
          color: "#3E9EF5",
        },
      }, ],
    }, ],
  }
  myChart81.setOption(option81)

  var option82 = {
    tooltip: {
      trigger: "item",
      show: true,
      showContent: true,
    },
    series: [{
      type: "pie",
      radius: ["70%", "90%"],
      avoidLabelOverlap: false,
      labelLine: {
        show: false,
      },
  
      data: [{
        value: data.data[0].reform,
        name: "100%",
        label: {
          position: "center",
          fontSize: 18,
        },
        itemStyle: {
          color: "#3E9EF5",
        },
      }, ],
    }, ],
  }
  myChart82.setOption(option82)


  var option83 = {
    tooltip: {
      trigger: "item",
      show: true,
      showContent: true,
    },
    series: [{
      type: "pie",
      radius: ["70%", "90%"],
      avoidLabelOverlap: false,
      labelLine: {
        show: false,
      },
  
      data: [{
        value: data.data[0].finish,
        name: "100%",
        label: {
          position: "center",
          fontSize: 18,
        },
        itemStyle: {
          color: "#3E9EF5",
        },
      }, ],
    }, ],
  }
  myChart83.setOption(option83)
  
  var option84 = {
    tooltip: {
      trigger: "item",
      show: true,
      showContent: true,
    },
    series: [{
      type: "pie",
      radius: ["70%", "90%"],
      avoidLabelOverlap: false,
      labelLine: {
        show: false,
      },
  
      data: [{
        value: data.data[0].start,
        name: "100%",
        label: {
          position: "center",
          fontSize: 18,
        },
        itemStyle: {
          color: "#3E9EF5",
        },
      }, ],
    }, ],
  }
  myChart84.setOption(option84)
  

})






// window.onresize = function() {
//   myChart81.resize()

//   myChart82.resize()
//   myChart83.resize()
//   myChart84.resize()
// }