tiny-vue_version0/examples/sites/demos/pc/app/chart/pie/demo7.vue

51 lines
1.0 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div>
<tiny-pie :options="options"></tiny-pie>
</div>
</template>
<script lang="jsx">
import { ChartPie } from '@opentiny/vue'
export default {
components: {
TinyPie: ChartPie
},
data() {
return {
options: {
type: 'pie',
legend: {
show: true,
position: {
left: 'center',
bottom: '10%'
},
orient: 'horizontal',
// 同意对图例图标设置类型默认circle, 可选值: rect, roundRect, triangle, diamond; 若定义了legend.data, 则此属性失效。
icon: 'circle',
// 控制图例图标的高度
itemHeight: 20,
// 控制图例图标的宽度
itemWidth: 20
},
label: {
show: true,
type: 'percent',
line: true
},
data: [
{ value: 100, name: 'VPC' },
{ value: 90, name: 'IM' },
{ value: 49, name: 'EIP' },
{ value: 14, name: 'SG' }
]
}
}
}
}
</script>