echarts饼型图label在内部显示

 图例:

echarts饼型图label在内部显示_第1张图片

 代码:

      option = {
        series: [
          {
            name: "Access From",
            type: "pie",
            label: {
              show: false,
              normal: {
                position: "inside", // 在内部显示,outseide 是在外部显示
                show: true,
                formatter: "{c}" // formatter 是标签内容的格式器
              }
            },
            data: [
              { value: 1048, name: "Search Engine" },
              { value: 735, name: "Direct" },
              { value: 580, name: "Email" },
              { value: 484, name: "Union Ads" },
              { value: 300, name: "Video Ads" }
            ]
          }
        ]
      };

你可能感兴趣的:(echarts,前端)