UNPKG

@uiw/react-heat-map

Version:

React component create calendar heatmap to visualize time series data, a la github contribution graph.

30 lines (29 loc) 938 B
import React from 'react'; import { LegendProps } from './Legend'; export declare type HeatMapValue = { date: string; content: string | string[] | React.ReactNode; count: number; }; export declare type RectProps<T = SVGRectElement> = React.SVGProps<T>; export interface SVGProps extends React.SVGProps<SVGSVGElement> { startDate?: Date; endDate?: Date; rectSize?: number; legendCellSize?: number; space?: number; rectProps?: RectProps; legendRender?: LegendProps['legendRender']; rectRender?: <E = SVGRectElement>(data: E & { key: number; }, valueItem: HeatMapValue & { column: number; row: number; index: number; }) => React.ReactElement | void; value?: Array<HeatMapValue>; weekLables?: string[] | false; monthLables?: string[] | false; panelColors?: Record<number, string>; } export default function SVG(props: SVGProps): JSX.Element;