UNPKG

chart-render

Version:

<div style="display:flex;align-items:center;margin-bottom:24px"> <img src="https://img.alicdn.com/tfs/TB17UtINiLaK1RjSZFxXXamPFXa-606-643.png" alt="logo" width="48px"/> <h4 style="font-size:30px;font-weight:600;display:inline-block;margin-left:12px">C

44 lines (43 loc) 1.28 kB
import React from 'react'; import { ICommonProps, IDataItem } from '../../utils/types'; import './index.less'; export interface ICRPivotTableProps extends ICommonProps { /** * 展示「总计/小计」,默认 `true` */ showSubtotal?: boolean; /** * 「总计/小计」的文案,默认 `['总计', '小计']` */ subtotalText?: [string, string]; /** * 指标的展示位置,默认 `'top'` */ indicatorSide?: 'left' | 'top'; /** * 表格尺寸,默认 `'middle'` */ size?: 'small' | 'middle' | 'large'; /** * 左侧维度放多少个,超出的维度会放到表格顶部 */ leftDimensionLength?: number; /** * 左侧维度允许展开/收起,默认 `false` */ leftExpandable?: boolean; /** * 顶部维度允许展开/收起,默认 `false` */ topExpandable?: boolean; /** * [此属性无效] 默认展开所有可展开项,默认 `true` */ defaultExpandAll?: boolean; /** * 单元格渲染 */ cellRender?: (value: any, dimRecord: IDataItem, indId: string) => React.ReactNode; } declare const CRPivotTable: React.FC<ICRPivotTableProps>; export default CRPivotTable;