vue使用echart画圆环

vue使用echart画圆环_第1张图片

 
 mounted() {
    this.initEcharts("myCharts");
   
  },
  .chartBox_d {
    width: 490px;
    height: 293px;
    margin: 12px 28px 32px;
  }

 

 initEcharts(myCharts) {
      this.mycharts = echarts.init(this.$refs[myCharts]);
      this.mycharts.setOption({
        tooltip: {
          trigger: "item",
          formatter: "{a} 
{b}: {c} ({d}%)" }, legend: { orient: "vertical", right: 10, data: ["其他", "三级甲等", "三级", "二级甲等", "二级", "一级"] }, series: [ { name: "医院等级统计", type: "pie", radius: ["30%", "45%"], emphasis: { label: { show: true, fontSize: "30", fontWeight: "bold" } }, data: [ { value: 335, name: "其他" }, { value: 310, name: "三级甲等" }, { value: 448, name: "三级" }, { value: 435, name: "二级甲等" }, { value: 234, name: "二级" }, { value: 203, name: "一级" } ] } ] }); },

你可能感兴趣的:(vue使用echart画圆环)