一个栅格柱状统计|对比图
效果图
DashRatioChart组件使用
组件引入
import Vue from 'vue'
import {DashRatioChart} from 'special-ui'
Vue.use(DashRatioChart)
组件使用
<template>
<div class="container">
<dash-ratio-chart :width="600" :raduis="2" :dataset="dataset"/>
</div>
</template>
<script>
export default {
data () {
return {
dataset: [
{
num: 300,
color: '#66FF99'
},
{
num: 200,
color: '#F1E541'
}
]
}
},
}
</script>
<style lang="scss" scoped>
.container {
height: 100%;
}
</style>
组件参数
属性 |
说明 |
默认值 |
dataset |
数据 |
[] |
width |
画布宽度 |
600 |
raduis |
栅格矩形圆角 |
3 |
dash |
栅格矩形宽、高和间隔 |
[5, 20, 3] |
padding |
左右间距 |
{left: 5, right: 5} |