tiny-vue/examples/sites/demos/pc/app/chart/pie/demo5-composition-api.vue

30 lines
528 B
Vue

<template>
<div>
<tiny-chart-pie :options="options"></tiny-chart-pie>
</div>
</template>
<script setup lang="jsx">
import { ref } from 'vue'
import { ChartPie as TinyChartPie } from '@opentiny/vue'
const options = ref({
type: 'pie',
label: {
show: true,
type: 'percent'
},
// 图表描边颜色配置
itemStyle: {
borderColor: '#F36900'
},
data: [
{ value: 100, name: 'VPC' },
{ value: 90, name: 'IM' },
{ value: 49, name: 'EIP' },
{ value: 14, name: 'SG' }
]
})
</script>