const getTreeMapChart = (treemapData) => {
  const option = {
    tooltip: {
      trigger: 'item',
      formatter: '{b}: {c}人'
    },
    grid: {
      top: '0%',
      left: '0%',
      right: '0%',
      bottom: '0%',
      containLabel: true
    },
    series: [
      {
        type: 'treemap',
        data: treemapData,
        roam: false,
        nodeClick: false,
        breadcrumb: {
          show: false
        },
        label: {
          show: true,
          formatter: '{b}',
          fontSize: 10
        },
        upperLabel: {
          show: true,
          height: 22
        },
        itemStyle: {
          borderColor: '#fff',
          borderWidth: 2,
          gapWidth: 2
        }
      }
    ]
  }
  return option
}

export default getTreeMapChart