/** @jsxImportSource react */
import { HtmlElement, HtmlElementConfig, HtmlElementInstance } from "../widgets/HtmlElement";
import { PureContainer } from "../ui/PureContainer";
import { RenderingContext } from "../ui/RenderingContext";
import { StringProp, StyleProp, BooleanProp } from "../ui/Prop";
export interface LegendEntryData {
name: string;
displayText?: string;
active?: boolean;
colorIndex?: number;
disabled?: boolean;
selected?: boolean;
style?: any;
shape?: string;
shapeSize?: number;
hoverSync?: any;
hoverChannel?: string;
hoverId?: any;
onClick?: (e: MouseEvent) => void;
value?: number;
}
export interface LegendConfig extends HtmlElementConfig {
/** Name of the legend. Default is `legend`. */
name?: string;
/** Default shape to use for all entries. */
shape?: StringProp;
/** Style applied to each entry. */
entryStyle?: StyleProp;
/** CSS class applied to each entry. */
entryClass?: StringProp;
/** Style applied to the value display. */
valueStyle?: StyleProp;
/** CSS class applied to the value display. */
valueClass?: StringProp;
/** Set to `true` to show values next to legend entries. */
showValues?: BooleanProp;
/** Format used for displaying values. Default is `s`. */
valueFormat?: string;
/** Set to `true` for vertical layout. */
vertical?: boolean;
/** Size of the shape in pixels. Default is `18`. */
shapeSize?: number;
/** Size of the SVG container in pixels. Default is `20`. */
svgSize?: number;
}
export interface LegendInstance extends HtmlElementInstance {
legends: Record;
}>;
}
export declare class Legend extends HtmlElement {
baseClass: string;
name: string;
vertical: boolean;
shapeSize: number;
shape: string | null;
svgSize: number;
showValues: boolean;
valueFormat: string;
entryStyle: any;
valueStyle: any;
static Scope: typeof PureContainer;
constructor(config: LegendConfig);
declareData(...args: any[]): void;
init(): void;
prepareData(context: RenderingContext, instance: LegendInstance): void;
isValidHtmlAttribute(attrName: string): string | false;
explore(context: RenderingContext, instance: LegendInstance): void;
renderChildren(context: RenderingContext, instance: LegendInstance): React.ReactNode[];
renderShape(entry: LegendEntryData, legendEntriesShape: string | null | undefined): React.ReactNode;
}
export declare const LegendScope: typeof PureContainer;
//# sourceMappingURL=Legend.d.ts.map