@opendatasoft/visualizations
Version:
Opendatasoft's components to easily build dashboards and visualizations.
24 lines (21 loc) • 601 B
text/typescript
import type { Async, Color, Source } from 'types';
export interface KpiCardOptions {
title?: string;
description?: string;
imgSrc?: string;
color?: Color;
prefix?: string;
suffix?: string;
header?: string;
footer?: string;
/** Link button to source */
source?: Source;
/** Custom formatting function to display data value */
formatCompact?: (value: number) => string;
/** Custom formatting function for tooltips content */
format?: (value: number) => string;
}
export type KpiProps = {
data: Async<number>;
options: KpiCardOptions;
};