import { type CreatePlotElementOptions, HitTestArguments, type HitTestResult, HorizontalAlignment, type IRenderContext, type OxyColor, type OxyRect, type OxySize, PlotElement } from '..'; /** * Specifies the placement of the legend box. */ export declare enum LegendPlacement { /** * Place the legends inside the plot area. */ Inside = 0, /** * Place the legends outside the plot area. */ Outside = 1 } /** * Specifies the position of the legend box. */ export declare enum LegendPosition { /** * Place the legend box in the top-left corner. */ TopLeft = 0, /** * Place the legend box centered at the top. */ TopCenter = 1, /** * Place the legend box in the top-right corner. */ TopRight = 2, /** * Place the legend box in the bottom-left corner. */ BottomLeft = 3, /** * Place the legend box centered at the bottom. */ BottomCenter = 4, /** * Place the legend box in the bottom-right corner. */ BottomRight = 5, /** * Place the legend box in the left-top corner. */ LeftTop = 6, /** * Place the legend box centered at the left. */ LeftMiddle = 7, /** * Place the legend box in the left-bottom corner. */ LeftBottom = 8, /** * Place the legend box in the right-top corner. */ RightTop = 9, /** * Place the legend box centered at the right. */ RightMiddle = 10, /** * Place the legend box in the right-bottom corner. */ RightBottom = 11 } export declare const isLeftLegend: (position: LegendPosition) => boolean; export declare const isRightLegend: (position: LegendPosition) => boolean; export declare const isTopLegend: (position: LegendPosition) => boolean; export declare const isBottomLegend: (position: LegendPosition) => boolean; /** * Specifies the orientation of the items in the legend box. */ export declare enum LegendOrientation { /** * Orient the items horizontally. */ Horizontal = 0, /** * Orient the items vertically. */ Vertical = 1 } /** * Specifies the item order of the legends. */ export declare enum LegendItemOrder { /** * Render the items in the normal order. */ Normal = 0, /** * Render the items in the reverse order. */ Reverse = 1 } /** * Specifies the placement of the legend symbols. */ export declare enum LegendSymbolPlacement { /** * Render symbols to the left of the labels. */ Left = 0, /** * Render symbols to the right of the labels. */ Right = 1 } export interface CreateLegendBaseOptions extends CreatePlotElementOptions { key?: string; isLegendVisible?: boolean; legendOrientation?: LegendOrientation; legendPadding?: number; legendSymbolLength?: number; legendSymbolMargin?: number; legendSymbolPlacement?: LegendSymbolPlacement; legendTitle?: string; legendTitleColor?: OxyColor; legendTitleFont?: string; legendTitleFontSize?: number; legendTitleFontWeight?: number; legendBackground?: OxyColor; legendBorder?: OxyColor; legendBorderThickness?: number; legendColumnSpacing?: number; legendFont?: string; legendFontSize?: number; legendTextColor?: OxyColor; legendFontWeight?: number; legendItemAlignment?: HorizontalAlignment; legendItemOrder?: LegendItemOrder; legendItemSpacing?: number; legendLineSpacing?: number; legendMargin?: number; legendMaxWidth?: number; legendMaxHeight?: number; legendPlacement?: LegendPlacement; legendPosition?: LegendPosition; allowUseFullExtent?: boolean; showInvisibleSeries?: boolean; } export declare const DefaultLegendBaseOptions: CreateLegendBaseOptions; export declare const ExtendedDefaultLegendBaseOptions: { key?: string | undefined; isLegendVisible?: boolean | undefined; legendOrientation?: LegendOrientation | undefined; legendPadding?: number | undefined; legendSymbolLength?: number | undefined; legendSymbolMargin?: number | undefined; legendSymbolPlacement?: LegendSymbolPlacement | undefined; legendTitle?: string | undefined; legendTitleColor?: string | undefined; legendTitleFont?: string | undefined; legendTitleFontSize?: number | undefined; legendTitleFontWeight?: number | undefined; legendBackground?: string | undefined; legendBorder?: string | undefined; legendBorderThickness?: number | undefined; legendColumnSpacing?: number | undefined; legendFont?: string | undefined; legendFontSize?: number | undefined; legendTextColor?: string | undefined; legendFontWeight?: number | undefined; legendItemAlignment?: HorizontalAlignment | undefined; legendItemOrder?: LegendItemOrder | undefined; legendItemSpacing?: number | undefined; legendLineSpacing?: number | undefined; legendMargin?: number | undefined; legendMaxWidth?: number | undefined; legendMaxHeight?: number | undefined; legendPlacement?: LegendPlacement | undefined; legendPosition?: LegendPosition | undefined; allowUseFullExtent?: boolean | undefined; showInvisibleSeries?: boolean | undefined; font?: string | undefined; fontSize?: number | undefined; fontWeight?: number | undefined; tag?: any; textColor?: string | undefined; edgeRenderingMode?: import('..').EdgeRenderingMode | undefined; toolTip?: string | undefined; selectable?: boolean | undefined; selectionMode?: import('..').SelectionMode | undefined; }; /** * The abstract Legend class. */ export declare abstract class LegendBase extends PlotElement { protected constructor(opt?: CreateLegendBaseOptions); /** * Override for legend hit test. * @param args - Arguments passed to the hit test. * @returns The hit test results. */ protected hitTestOverride(args: HitTestArguments): HitTestResult | undefined; /** * Defines the legend hit test behavior. * @param args - The hit test arguments. * @returns The hit test result. */ protected abstract legendHitTest(args: HitTestArguments): HitTestResult | undefined; /** * Gets or sets a key to identify this legend. The default is `null`. * The key is used to identify which series to show in the legends by comparing with the Series.LegendKey property. */ key?: string; /** * Gets or sets a value indicating whether the legend is visible. The titles of the series must be set to use the legend. */ isLegendVisible: boolean; /** * Gets or sets the legend orientation. * Horizontal orientation is reverted to Vertical if Legend is positioned Left or Right of the plot. */ legendOrientation: LegendOrientation; /** * Gets or sets the legend padding. */ legendPadding: number; /** * Gets or sets the length of the legend symbols (the default value is 16). */ legendSymbolLength: number; /** * Gets or sets the legend symbol margins (distance between the symbol and the text). */ legendSymbolMargin: number; /** * Gets or sets the legend symbol placement. */ legendSymbolPlacement: LegendSymbolPlacement; /** * Gets or sets the legend title. */ legendTitle?: string; /** * Gets or sets the color of the legend title. * If this value is `null`, the TextColor will be used. */ legendTitleColor: OxyColor; /** * Gets or sets the legend title font. */ legendTitleFont?: string; /** * Gets or sets the size of the legend title font. */ legendTitleFontSize: number; /** * Gets or sets the legend title font weight. */ legendTitleFontWeight: number; /** * Gets the legend area. */ legendArea: OxyRect; /** * Gets or sets the size of the legend. */ legendSize: OxySize; /** * Gets or sets the background color of the legend. Use `null` for no background. */ legendBackground: OxyColor; /** * Gets or sets the border color of the legend. */ legendBorder: OxyColor; /** * Gets or sets the thickness of the legend border. Use 0 for no border. */ legendBorderThickness: number; /** * Gets or sets the spacing between columns of legend items (only for vertical orientation). */ legendColumnSpacing: number; /** * Gets or sets the legend font. */ legendFont?: string; /** * Gets or sets the size of the legend font. */ legendFontSize: number; /** * Gets or sets the color of the legend text. * If this value is `null`, the TextColor will be used. */ legendTextColor?: OxyColor; /** * Gets or sets the legend font weight. */ legendFontWeight: number; /** * Gets or sets the legend item alignment. */ legendItemAlignment: HorizontalAlignment; /** * Gets or sets the legend item order. */ legendItemOrder: LegendItemOrder; /** * Gets or sets the horizontal spacing between legend items when the orientation is horizontal. */ legendItemSpacing: number; /** * Gets or sets the vertical spacing between legend items. */ legendLineSpacing: number; /** * Gets or sets the legend margin. */ legendMargin: number; /** * Gets or sets the max width of the legend. */ legendMaxWidth: number; /** * Gets or sets the max height of the legend. */ legendMaxHeight: number; /** * Gets or sets the legend placement. */ legendPlacement: LegendPlacement; /** * Gets or sets the legend position. */ legendPosition: LegendPosition; /** * Gets or sets a value indicating whether the legend should use the full extend of the plot when LegendPlacement equals LegendPlacement.Outside. */ allowUseFullExtent: boolean; /** * Gets or sets a value indicating whether the legend should show invisible series. The default is true. * Invisible series will appear in the listening, but will be grayed out. */ showInvisibleSeries: boolean; /** * Makes the LegendOrientation property safe. * If Legend is positioned left or right, force it to vertical orientation */ abstract ensureLegendProperties(): void; /** * Measures the legend area and gets the legend size. * @param rc The rendering context. * @param availableLegendArea The area available to legend. */ abstract getLegendSize(rc: IRenderContext, availableLegendArea: OxySize): Promise; /** * Gets the rectangle of the legend box. * @param legendSize Size of the legend box. * @returns The legend area rectangle. */ abstract getLegendRectangle(legendSize: OxySize): OxyRect; /** * Renders or measures the legends. * @param rc The render context. */ abstract renderLegends(rc: IRenderContext): Promise; } //# sourceMappingURL=LegendBase.d.ts.map