<template>
  <div>
    <xlm-pie-chart :data="data" :config="config" />
  </div>
</template>

<script>

export default {
  data() {
    return {
      data: [],
      config: {
        color: ['#1890FF', '#13C2C2', '#2FC25B', '#FACC14'],
        title: '数据统计',
        tooltip: true,
        legend: true
      },
      width: '500',
      height: '400'
    }
  },
  created() {
    setTimeout(() => {
      this.data = [
        {
          id: 'const',
          type: '交通出行',
          value: 51.39
        }, {
          id: 'const',
          type: '饮食',
          value: 356.68
        }, {
          id: 'const',
          type: '生活日用',
          value: 20.00
        }, {
          id: 'const',
          type: '住房缴费',
          value: 116.53
        }
      ]
    }, 1000)
  }
}
</script>
