'Show slice names and values in separate labels on echarts pie chart

I'm trying out the ECharts library My goal is to get a chart like the following, where the slice labels are shown around the pie, and the values shown on top of each slice:

ideal pie chart

I had hoped that I could define a separate label on the series, and then a label on data and get different values, like:

const option = {
  "series": {
    "data": [
      {
        "label": {
          "formatter": (params) => params.value,
          "show": true,
          "position": "inside"
        },
        "value": 65.98750000000001,
        "name": "Asia"
      },
      {
          "label": {
            "formatter": (params) => params.value,
            "show": true,
            "position": "inside"
          },
          "value": 76.85333333333332,
          "name": "Europe"
      },
      {
          "label": {
            "formatter": (params) => params.value,
            "show": true,
            "position": "inside"
          },
          "value": 72.15909090909092,
          "name": "North America"
      },
      {
          "label": {
            "formatter": (params) => params.value,
            "show": true,
            "position": "inside"
          },
          "value": 51.4695652173913,
          "name": "Africa"
      },
      {
          "label": {
            "formatter": (params) => params.value,
            "show": true,
            "position": "inside"
          },
          "value": 71.91666666666667,
          "name": "Oceania"
      },
      {
          "label": {
            "formatter": (params) => params.value,
            "show": true,
            "position": "inside"
          },
          "value": 68.97142857142858,
          "name": "South America"
      }
    ],
    "label": {
      "show": true,
      "position": "outside"
    },
    "radius": [
      "30%",
      "80%"
    ],
    "type": "pie"
  },
  "tooltip": {}
};

But no dice, where it seems the option.data.label overrides whatever I set on option.label. I've tried a number of variations without luck, and the docs don't include an example of what I'm trying to do, so I'm increasingly not sure it's possible.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source