@linkdesign/screen
Version:
屏组件库,但使用场景又不局限于屏。主要用于BI、大盘和屏
82 lines (81 loc) • 1.86 kB
TypeScript
import React from 'react';
import { ITitle, UniversalStyle } from '../title';
interface IProps {
/**
* 类名
*/
className?: string;
/**
* 图表标题
*/
title?: React.ReactNode;
/**
* 总数
*/
total?: number | React.ReactNode;
/**
* 图表数据
*
* @type {{
* label: React.ReactNode; // 内容
* value: React.ReactNode; // 值
* rate: number; // 占比
* color: string; // 颜色
* }[]}
* @memberof IProps
*/
dataSource: Array<{
label: React.ReactNode;
value: React.ReactNode;
rate?: number;
color?: string;
}>;
/**
* 通用样式
*/
universalStyle?: UniversalStyle;
/**
* 标题配置
*/
titleOptions?: ITitle;
/**
* 指标配置
*
* @type {({
* dots?: boolean; // 是否显示图标
* widthRate?: number; // 宽占比
* labelOptions?: ITitle; // 内容样式
* valueOptions?: ITitle; // 值样式
* lineSpacing?: string | number; // 行间距
* })}
* @memberof IProps
*/
normOptions?: {
dots?: boolean;
widthRate?: number;
labelOptions?: ITitle;
valueOptions?: ITitle;
lineSpacing?: string | number;
};
/**
* 柱状图样式
*
* @type {({
* backgroundColor?: string; // 背景色
* height?: string | number; // 高度
* spacing?: string | number; // 间距
* })}
* @memberof IProps
*/
barOptions?: {
backgroundColor?: string;
height?: string | number;
spacing?: string | number;
};
}
/**
* 条形堆叠占比图
* @param props IProps
*/
declare const BarStackChart: (props: IProps) => JSX.Element;
export default BarStackChart;