ava-custom
基于antv-ava做的一些自定义配置,通过简单配置直接构建智能图表
Installation
Install the ava-custom package package using npm:
npm install ava-custom
组件接收的Props
// 展现图表的数据,必须是一个数组
data: any[],
// 是否展示可展示图表的列表项,默认true
showList?: boolean,
// 列表项相对于图表的位置,默认left
listPosition?: ('left' | 'right' | 'top' | 'bottom') = 'left',
// 宽度, 默认填充满div
width?: string | number,
// 高度,目前没有用
height?: string | number,
// 接受一个回调函数,自定义列表项的渲染。
listItemRender: (advice: IListItem) => void,
// 接受一个回调函数,当列表项切换的时候进行操作
onListChange?: (id: string) => void;