<template>
  <ve-ring :data="chartData" :settings="settings" />
</template>

<script>
import { devCount } from '@/api/statistics'

export default {
  name: 'DevCount',
  data() {
    return {
      chartData: {
        columns: ['name', 'count'],
        rows: []
      },
      settings: {
        // legendLimit: 4
        radius: [60, 100]
      }
    }
  },
  activated() {
    this.fetchData()
  },
  methods: {
    fetchData() {
      devCount().then(response => {
        if (response.code === 200) {
          this.chartData.rows = response.data
        }
      })
    }
  }
}
</script>

<style scoped>

</style>
