<template>
  <div class="trend">
    <div class="pie-content" :id="id"></div>
  </div>
</template>
<script>
export default {
  props: ['id', 'data'],
  mounted () {
    this.$nextTick(() => {
      this.$chart.pie(
        this.id,
        this.data
      )
    })
  }
}
</script>

<style scoped>
.trend{
  position: relative;
}
.pie-content{
  width: 100%;
  height: 220px;
}
</style>
