<template>
  <div class="page-demo">
    <comp :data="lineData" :percent-digit="6" ref="com" :alias="{ labelName: 'name' }"></comp>
  </div>
</template>

<script>
import Comp from '../src/component'

export default {
  name: 'Demo',

  data () {
    return {
      lineData: [
        {
          name: 'Second',
          value: 10000
        },
        {
          name: 'Second',
          value: 0
        },
        {
          name: 'First',
          value: 10000
        },
        {
          name: 'Second',
          value: null
        },
        {
          name: 'Third',
          value: 10000
        },
        {
          name: 'Forth',
          value: 10000
        }
      ]
    }
  },

  mounted () {
    window.addEventListener('resize', () => {
      this.$refs.com.resize()
    })
  },

  components: { Comp }
}
</script>
