Reincharts
    Preparing search index...

    Interface BarAnnotationProps

    interface BarAnnotationProps {
        className?: string;
        data?: object;
        fill?: string | ((data: any) => string);
        fontFamily?: string;
        fontSize?: number;
        onClick?: (
            e: MouseEvent,
            data: {
                data: any;
                xScale?: ScaleContinuousNumeric<number, number, never>;
                yScale?: ScaleContinuousNumeric<number, number, never>;
            },
        ) => void;
        opacity?: number;
        path?: (__namedParameters: { x: number; y: number }) => string;
        plotData: any[];
        stroke?: string;
        text?: string;
        textAnchor?: "start" | "middle" | "end" | "inherit";
        textFill?: string;
        textIcon?: string;
        textIconAnchor?: string;
        textIconFill?: string;
        textIconFontSize?: number;
        textIconOpacity?: number;
        textIconRotate?: number;
        textIconXOffset?: number;
        textIconYOffset?: number;
        textOpacity?: number;
        textRotate?: number;
        textXOffset?: number;
        textYOffset?: number;
        tooltip?: string | ((data: any) => string);
        x?:
            | number
            | (
                (
                    __namedParameters: {
                        data: any;
                        plotData: any[];
                        xAccessor: (data: any) => any;
                        xScale: ScaleContinuousNumeric<number, number>;
                    },
                ) => number
            );
        xAccessor?: (data: any) => any;
        xScale?: ScaleContinuousNumeric<number, number, never>;
        y?:
            | number
            | (
                (
                    __namedParameters: {
                        data: any;
                        plotData: any[];
                        yScale: ScaleContinuousNumeric<number, number>;
                    },
                ) => number
            );
        yScale?: ScaleContinuousNumeric<number, number, never>;
    }
    Index

    Properties

    className?: string

    CSS class name for styling the bar annotation.

    data?: object

    Data point associated with this annotation.

    fill?: string | ((data: any) => string)

    Fill color for the bar, can be static string or function based on data.

    fontFamily?: string

    Font family for the annotation text.

    fontSize?: number

    Font size for the annotation text.

    onClick?: (
        e: MouseEvent,
        data: {
            data: any;
            xScale?: ScaleContinuousNumeric<number, number, never>;
            yScale?: ScaleContinuousNumeric<number, number, never>;
        },
    ) => void

    Click event handler that receives mouse event and scale/data data.

    opacity?: number

    Opacity level of the bar annotation (0-1).

    path?: (__namedParameters: { x: number; y: number }) => string

    Function to generate SVG path for the bar shape.

    plotData: any[]

    Array of plot data points.

    stroke?: string

    Stroke color for the bar border.

    text?: string

    Text content to display on the annotation.

    textAnchor?: "start" | "middle" | "end" | "inherit"

    Text anchor positioning (start, middle, end).

    textFill?: string

    Fill color for the text.

    textIcon?: string

    Icon character to display alongside text.

    textIconAnchor?: string

    Text anchor positioning for the icon.

    textIconFill?: string

    Fill color for the icon.

    textIconFontSize?: number

    Font size for the icon.

    textIconOpacity?: number

    Opacity level of the icon (0-1).

    textIconRotate?: number

    Rotation angle for the icon in degrees.

    textIconXOffset?: number

    Horizontal offset for icon positioning.

    textIconYOffset?: number

    Vertical offset for icon positioning.

    textOpacity?: number

    Opacity level of the text (0-1).

    textRotate?: number

    Rotation angle for the text in degrees.

    textXOffset?: number

    Horizontal offset for text positioning.

    textYOffset?: number

    Vertical offset for text positioning.

    tooltip?: string | ((data: any) => string)

    Tooltip text to display on hover, can be static string or function based on data.

    x?:
        | number
        | (
            (
                __namedParameters: {
                    data: any;
                    plotData: any[];
                    xAccessor: (data: any) => any;
                    xScale: ScaleContinuousNumeric<number, number>;
                },
            ) => number
        )

    X position of the annotation, can be static number or function that calculates position based on scales and data.

    xAccessor?: (data: any) => any

    Function to extract x-value from data points.

    xScale?: ScaleContinuousNumeric<number, number, never>

    D3 scale for x-axis positioning.

    y?:
        | number
        | (
            (
                __namedParameters: {
                    data: any;
                    plotData: any[];
                    yScale: ScaleContinuousNumeric<number, number>;
                },
            ) => number
        )

    Y position of the annotation, can be static number or function that calculates position based on scales and data.

    yScale?: ScaleContinuousNumeric<number, number, never>

    D3 scale for y-axis positioning.