The data in echerts pie chart legend always corresponds to the name of data in series.

want to achieve the following functions

data in echerts pie chart legend always corresponds to name in data in series,

the following is the code
let option = {

          title : {
              text: "(180)",
              subtext: "",
              x:"center"
          },
          tooltip : {
              trigger: "item",
              formatter: "{a} <br/>{b} : {c} ({d}%)"
          },
          legend: {
              orient: "vertical",
              top: "40%",
              right: "right",
              formatter: {name},
              data: ["","","","",""]
          },
          series : [
              {
                  name: "",
                  type: "pie",
                  radius : "55%",
                  center: ["50%", "60%"],
                  data:[
                      {value:335, name:""},
                      {value:310, name:""},
                      {value:234, name:""},
                      {value:135, name:""},
                      {value:1548, name:""}
                  ],
                  itemStyle: {
                      emphasis: {
                          shadowBlur: 10,
                          shadowOffsetX: 0,
                          shadowColor: "rgba(0, 0, 0, 0.5)"
                      }
                  }
              }
          ]
      };

Feb.26,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e81684-682c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e81684-682c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?