Skip to main content

VictoryStack

VictoryStack is a wrapper component that renders a given set of children in a stacked layout. Like other wrapper components, VictoryStack also reconciles the domain and layout for all its children, and coordinates animations and shared events.

Supported Components​

Unsupported Components​

Example​

Live View
Loading...
Live Editor

Inherited Props​

Component Props​


categories​

type: string[] | { x: string[], y: string[]

VictoryStack uses the standard categories prop. Read about it here

note: When this prop is set, VictoryGroup controls the categories prop of its children.

categories={["dogs", "cats", "mice"]}

children​

type: ReactElement | ReactElement[]

Children supplied to VictoryGroup will be cloned and rendered with new props so that all children share common props such as domain and scale.


eventKey​

type: string | integer | strin[] | Function

VictoryStack 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


events​

type: object[]

VictoryStack uses the standard events prop. Read about it in more detail here

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

note: VictoryStack coordinates events between children using the VictorySharedEvents and the sharedEvents prop

Live View
Loading...
Live Editor

style​

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

VictoryStack uses the standard style prop. Read about it here

Styles on children of VictoryGroup will override styles set on the VictoryGroup component.

Live View
Loading...
Live Editor

xOffset​

type: number

The xOffset prop is used for grouping stacks of bars. This prop will be set by the VictoryGroup component wrapper, or can be set manually.

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

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

Learn More