Skip to main content

VictoryPolarAxis

Renders a circular axis which can be used on its own or composed with VictoryChart.

info

For examples of VictoryPolarAxis in action, visit the Chart Axis guide.

Example

Live View
Loading...
Live Editor

Inherited Props

Component Props


axisAngle

type: numberdefault: 0

The axisAngle prop is used to position the dependent axis. This prop should be given in degrees. Degrees are defined as starting at the 3 o'clock position, and proceeding counterclockwise. This prop only affects the dependent axis.

Live View
Loading...
Live Editor

circularAxisComponent

type: ReactElementdefault: <Arc/>

The circularAxisComponent prop takes a component instance which will be responsible for rendering an axis arc for the independent axis. The dependent axis renders an axisComponent. The new element created from the passed circularAxisComponent will be provided with the following props calculated by VictoryPolarAxis: style, events, cx, cy, r, startAngle, and endAngle. Any of these props may be overridden by passing in props to the supplied component, or modified or ignored within the custom component itself. If a circularAxisComponent is not provided, VictoryPolarAxis will use its default [Arc component][].

circularAxisComponent={<Arc r={300}/>}

circularGridComponent

type: ReactElementdefault: <Arc />

The circularGridComponent prop takes a component instance which will be responsible for rendering a grid element. The new element created from the passed circularGridComponent will be provided with the following props calculated by VictoryPolarAxis: x1, y1, x2, y2, tick, style and events. Any of these props may be overridden by passing in props to the supplied component, or modified or ignored within the custom component itself. If a circularGridComponent is not provided, VictoryPolarAxis will use its default [Arc component][].

circularGridComponent={<Arc r={300}/>}

endAngle

type: numberdefault: 360

The endAngle props defines the overall end angle of the axis in degrees. This prop is used in conjunction with startAngle to create an axis that spans only a segment of a circle, or to change overall rotation of the axis. This prop should be given as a number of degrees. Degrees are defined as starting at the 3 o'clock position, and proceeding counterclockwise.

Live View
Loading...
Live Editor

events

type: object[]

VictoryPolarAxis uses the standard events prop.

See the Events Guide for more information on defining events.

note

Valid event targets for VictoryPolarAxis are "axis", "axisLabel", "grid", "ticks", and "tickLabels". Targets that correspond to only one element ("axis" and "axisLabel") should use the special eventKey "all".


innerRadius

type: number

When the innerRadius prop is set, polar axes will be hollow rather than circular.

Live View
Loading...
Live Editor

labelPlacement

type: "parallel" | "perpendicular" | "vertical"default: "parallel"

The labelPlacement prop specifies how tick labels should be placed relative to the angular tick values. Options for this prop are "vertical", "parallel", and "perpendicular".

Live View
Loading...
Live Editor

startAngle

type: numberdefault: 0

The startAngle props defines the overall end angle of the axis in degrees. This prop is used in conjunction with endAngle to create an axis that spans only a segment of a circle, or to change overall rotation of the axis. This prop should be given as a number of degrees. Degrees are defined as starting at the 3 o'clock position, and proceeding counterclockwise.

Live View
Loading...
Live Editor

style

type: { axis: object, axisLabel: object, grid: object, ticks: object, tickLabels: object }

The style prop defines the style of the component. The style prop should be given as an object with styles defined for parent, axis, axisLabel, grid, ticks, and tickLabels. Any valid svg styles are supported, but width, height, and padding should be specified via props as they determine relative layout for components in VictoryChart. Functional styles may be defined for grid, tick, and tickLabel style properties, and they will be evaluated with the props corresponding to each axis element, such as tick and index.

Live View
Loading...
Live Editor