import * as React from "react"; import { LabelPosition } from "./LegendItem"; /** * LegendItemProps * @typedef Legend.LegendItemProps * @property {string} label - the subject of the item * @property {number} value - the numeric value of the data * @property {string} color - the described color * @property {string} [displayValue] - optional, formatted value. If sets, it gets shown instead of "value" * private @property {boolean} [showLabel] - it sets whether to show the item label * @property {function} [renderMarker] - optional, render function for the marker. (item: LegendItemProps) => React.ReactNode * @private */ export interface LegendItemProps { label: string; value: number; color: string; displayValue?: string; showLabel?: boolean; renderMarker?: (item: LegendItemProps) => React.ReactNode; labelPosition?: LabelPosition; } /** * LegendProps * @typedef Legend.LegendProps * @property {Array} items - the list of items to display * @property {boolean} [showLabels=true] - it sets whether to show the items labels * @property {function} [renderMarker] - optional, render function for the marker. (item: LegendItemProps) => React.ReactNode * @private */ export interface LegendProps { items: Array; showLabels?: boolean; renderMarker?: (item: LegendItemProps) => React.ReactNode; labelPosition?: LabelPosition; centered: boolean; } /** * This component renders a legend - a list of colors, values and an optional descriptive label. * @component * @category Components / Basic * @hideconstructor * @param {Legend.LegendProps} props * @private */ export declare class Legend extends React.PureComponent { static defaultProps: Partial; render(): JSX.Element; }