Skip to main content

VictoryErrorBar

info

For examples of VictoryErrorBar in action, visit the Error Bar examples.

Inherited Props​

Component Props​


borderWidth​

type: number

The borderWidth prop sets the border width of the error bars. borderWidth will set both x and y error bar width.

borderWidth={10}

data​

type: {x: number, y: number, errorX: number, errorY: number}[]

Specify data via the data prop. By default, VictoryErrorBar expects data as an array of objects with x, y, errorX and errorY keys. Use the x, y, errorX and errorY data accessor props to specify custom data formats.


errorX​

type: string | integer | string[] | Function

Use errorX data accessor prop to define the x error bar.

string: specify which property in an array of data objects should be used as the errorX value

examples: errorX="uncertainty"

function: use a function to translate each element in a data array into a errorX value

examples: errorX={() => 10}

array index: specify which index of an array should be used as a errorX value when data is given as an array of arrays

examples: errorX={1}

path string or path array: specify which property in an array of nested data objects should be used as an errorX value

examples: errorX="measurement.uncertainty", errorX={["measurement", "uncertainty"]}


errorY​

type: string | integer | string[] | Function

Use errorY data accessor prop to define the y error bar.

string: specify which property in an array of data objects should be used as the errorY value

examples: errorY="uncertainty"

function: use a function to translate each element in a data array into an errorY value

examples: errorY={() => 10}

array index: specify which index of an array should be used as an errorY value when data is given as an array of arrays

examples: errorY={1}

path string or path array: specify which property in an array of nested data objects should be used as an errorY value

examples: errorY="measurement.uncertainty", errorY={["measurement", "uncertainty"]}


eventKey​

type: string | integer | string[] | Function

VictoryErrorBar uses the standard eventKey prop to specify how event targets are addressed. This prop is not commonly used. Read about the eventKey prop in more detail here

eventKey = "x";

events​

type: object[]

VictoryErrorBar uses the standard events prop. Read about it here

See the [Events Guide][] for more information on defining events.

Live View
Loading...
Live Editor

style​

type: { parent: object, data: object, labels: object }

VictoryErrorBar uses the standard style prop. Read about it here

default (provided by default theme): See [grayscale theme][] for more detail

Live View
Loading...
Live Editor

Like this project? You'll love working with us.

Contact us to learn more about our full range of services and offerings.

Learn More