Reflex Logo

Intro

Gallery

Hosting

Learn

Components

Recipes

API Reference

Onboarding

Library

/

Graphing

/

Charts

/

Errorbar

An error bar is a graphical representation of the uncertainty or variability of a data point in a chart, depicted as a line extending from the data point parallel to one of the axes. The data_key, width, stroke_width, stroke, and direction props can be used to customize the appearance and behavior of the error bars, specifying the data source, dimensions, color, and orientation of the error bars.

def error():
    return rx.recharts.scatter_chart(
        rx.recharts.scatter(
            rx.recharts.error_bar(
                data_key="errorY",
                direction="y",
                width=4,
                stroke_width=2,
                stroke="red",
            ),
            rx.recharts.error_bar(
                data_key="errorX",
                direction="x",
                width=4,
                stroke_width=2,
            ),
            data=data,
            fill="#8884d8",
            name="A",
        ),
        rx.recharts.x_axis(
            data_key="x", name="x", type_="number"
        ),
        rx.recharts.y_axis(
            data_key="y", name="y", type_="number"
        ),
        width="100%",
        height=300,
    )

An ErrorBar component in Recharts.

PropTypeDescriptionValues
directionLiteral

The direction of error bar. 'x' | 'y' | 'both'

data_keyUnion

The key of a group of data which should be unique in an area chart.

widthint

The width of the error bar ends.

strokeUnion

The stroke color of error bar.

stroke_widthint

The stroke width of error bar.

Event Triggers

See the full list of default event triggers

Did you find this useful?

HomeGalleryChangelogIntroductionHosting