UNPKG

waffle-chart

Version:
46 lines (45 loc) 1.24 kB
/** * defaults to nearest whole. * use 'up' for if any portion over a whole should count. * use 'down' for if less than whole should not count. */ export declare type Rounding = 'nearest' | 'up' | 'down'; export declare type VerticalFill = 'top' | 'bottom'; export declare type HorizontalFill = 'left' | 'right'; export interface PartProps { id: 'a' | 'b' | 'c'; value: number; percentage: number; label?: string; style?: React.CSSProperties; } export interface GridItemProps { index: number; identifier: 'a' | 'b' | 'c'; isSmall: boolean; isMedium: boolean; isLarge: boolean; data?: any; style?: React.CSSProperties; } export declare type WaffleChartProps = { partA?: number; partB?: number; partC?: number; displayPrecision?: number; partAlabel?: string; partBlabel?: string; partClabel?: string; rounding?: Rounding; isFilledFromTop?: boolean; isFilledFromLeft?: boolean; isSquareFill?: boolean; isAnimatedFill?: boolean; showDataDisplay?: boolean; showTotal?: boolean; partAcolor?: string; partBcolor?: string; partCcolor?: string; totalColor?: string; clickHandler?: (props: GridItemProps) => GridItemProps; };