tiny-vue/examples/sites/demos/pc/app/chart/waterfall/demo3-composition-api.vue

33 lines
866 B
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-chart-waterfall :options="options"></tiny-chart-waterfall>
</div>
</template>
<script setup lang="jsx">
import { ref } from 'vue'
import { ChartWaterfall as TinyChartWaterfall } from '@opentiny/vue'
const options = ref({
padding: [50, 30, 20, 20],
// water-fall表示为瀑布形态此时图中会自动添加一个Total(总和)数据
type: 'water-fall',
data: [
{ Name: 'NLE', Man: 5, Female: 5, Unkown: 19 },
{ Name: 'HIN', Man: 10, Female: 8, Unkown: 5 },
{ Name: 'FBP', Man: 8, Female: 2, Unkown: 19 },
{ Name: 'VEDIO', Man: 20, Female: 15, Unkown: 10 },
{ Name: 'SASS', Man: 6, Female: 10, Unkown: 2 },
{ Name: 'RDS', Man: 12, Female: 15, Unkown: 10 },
{ Name: 'E-SYS', Man: 19, Female: 12, Unkown: 8 }
],
xAxis: {
data: 'Name'
},
yAxis: {
name: 'Number'
}
})
</script>