import { Size } from '../../utilities'; /** * Optional properties for customizing legend headers. * @member textProps properties to apply to the text displayed in the header. * @member backgroundProps properties to apply to the rectangular background of the header. */ export interface OptionalLegendHeaderProps { textProps?: { [key: string]: any; }; backgroundProps?: { [key: string]: any; }; numberFormat?: (n: number) => string; [key: string]: any; } /** * Properties of a legend header. * @member text the title to display in the header. * @member size the dimensions of the header. */ export interface LegendHeaderProps extends OptionalLegendHeaderProps { text: string; size: Size; } /** * A single legend entry's label. * @member label the title to display in the left portion of the entry. * @member value the value to display in the right portion of the entry. * @member color the color of the entry. */ export declare type LegendLabel = { label: string; value: string; color: string; }; /** * Optional properties for customizing legend entries. * @member textProps properties to apply to the text displayed in the entry. * @member lineProps properties to apply to the lines displayed in the entry. * @member rectProps properties to apply to the rectangular color box of the entry. * @member backgroundProps properties to apply to the background box of the entry. */ export interface OptionalLegendEntryProps { textProps?: { [key: string]: any; }; rectProps?: { [key: string]: any; }; backgroundProps?: { [key: string]: any; }; lineProps?: { [key: string]: any; }; simple?: boolean; [key: string]: any; } /** * Properties of a legend entry. * @member label contains the label, value, and color for this entry. * @member size the dimensions of the entry. */ export interface LegendEntryProps extends OptionalLegendEntryProps { label: LegendLabel; size: Size; } /** * Properties for rendering a complete legend. * @member title the title of the legend. * @member entries array of legend entries. * @member size the dimensions of the legend. * @member rectProps customizes the border rectangle. * @member headerProps customizes the header. * @member entryProps customizes the legend entries. */ export interface LegendProps { title: string; entries: LegendLabel[]; size: Size; rectProps?: { [key: string]: any; }; headerProps?: OptionalLegendHeaderProps; entryProps?: OptionalLegendEntryProps; [key: string]: any; } /** * Properties for rendering a complete legend. * @member title the title of the legend. * @member entries array of legend entries. * @member size the dimensions of the legend. * @member rectProps customizes the border rectangle. * @member headerProps customizes the header. * @member entryProps customizes the legend entries. */ export interface OptionalLegendProps { title?: string; entries?: LegendLabel[]; size?: Size; rectProps?: { [key: string]: any; }; headerProps?: OptionalLegendHeaderProps; entryProps?: OptionalLegendEntryProps; [key: string]: any; }