UNPKG

@linkdesign/screen

Version:

屏组件库,但使用场景又不局限于屏。主要用于BI、大盘和屏

69 lines (68 loc) 1.44 kB
import React from 'react'; import { ITitle } from '../title'; import { ICarouselTable } from '../carousel-table'; interface ILabelOptions extends ITitle { /** * 宽占比 */ widthRate?: number; } interface IValueOptions extends ITitle { /** * 宽占比 */ widthRate?: number; } interface IProps extends ICarouselTable { /** * 图表数据 * * @type {{ * label: React.ReactNode; // 内容 * value: React.ReactNode; // 值 * rate: number; // 占比 * }[]} * @memberof IProps */ dataSource: Array<{ label: React.ReactNode; value: React.ReactNode; rate: number; }>; /** * 展示方向 * * hoz: 水平方向 * ver: 竖直方向 */ direction?: 'hoz' | 'ver'; /** * 内容样式 */ labelOptions?: ILabelOptions; /** * 柱状图样式 * * @type {({ * widthRate: number; // 宽占比 * backgroundColor?: string; // 背景颜色 * color?: string; // 占比颜色 * })} * @memberof IProps */ barOptions?: { widthRate?: number; backgroundColor?: string; color?: string; }; /** * 值样式 */ valueOptions?: IValueOptions; } /** * 条形占比统计图 * @param props IProps */ declare const BarChart: (props: IProps) => JSX.Element; export default BarChart;