Edit this page

VictoryArea

VictoryArea renders a dataset as a single area. VictoryArea can be composed with VictoryChart to create area charts.

            

Props

animate

VictoryArea uses the standard animate prop. Read about it in detail

See the Animations Guide for more detail on animations and transitions

  animate={{
    duration: 2000,
    onLoad: { duration: 1000 }
  }}

categories

VictoryArea uses the standard categories prop. Read about it in detail

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

containerComponent

VictoryArea uses the standard containerComponent prop. Read about it in detail

containerComponent={<VictoryVoronoiContainer dimension="x"/>}

data

VictoryArea uses the standard data prop. Read about it in detail

See the Data Accessors Guide for more detail on formatting and processing data.

            

dataComponent

VictoryArea uses the standard dataComponent prop. Read about it detail

VictoryArea supplies the following props to its dataComponent: data, events, groupComponent, interpolation, origin (for polar charts), polar, scale, style

See the Custom Components Guide for more detail on creating your own dataComponents

default: <Area/>

dataComponent={<Area events={{ onClick: handleClick }}/>}

domain

VictoryArea uses the standard domain prop. Read about it in detail

domain={{x: [0, 100], y: [0, 1]}}

domainPadding

VictoryArea uses the standard domainPadding prop. Read about it in detail

domainPadding={{x: [10, -10], y: 5}}

eventKey

VictoryArea uses the standard eventKey prop. This prop is not commonly used. Read about the eventKey prop in more detail here

note: VictoryArea only renders one element per dataset, so only one event key will be generated.

eventKey="x"

events

VictoryArea uses the standard events prop. Read about it in detail

See the Events Guide for more information on defining events.

note: VictoryArea will use the special eventKey "all" rather than refering to data by index, as it renders only one element for an entire dataset

            

groupComponent

VictoryArea uses the standard groupComponent prop. Read about it in detail

note: VictoryArea uses VictoryClipContainer as its default groupComponent VictoryClipContainer renders a <g> tag with a clipPath def. This allows continuous data components to transition smoothly when new data points enter and exit. Supplying a completely custom groupComponent to VictoryArea may result in broken animations.

default: <VictoryClipContainer/>

            

height

VictoryArea uses the standard height prop. Read about it here

default (provided by default theme): height={300}

height={400}

interpolation

The interpolation prop determines how data points should be connected when creating a path. Victory uses d3-shape for interpolating curves.

Polar area charts may use the following interpolation options: "basis", "cardinal", "catmullRom", "linear"

Cartesian area charts may use the following interpolation options: "basis", "cardinal", "catmullRom", "linear", "monotoneX", "monotoneY", "natural", "step", "stepAfter", "stepBefore"

Explore all the interpolation options.

default: "linear"

            

labelComponent

VictoryArea uses the standard labelComponent prop. Read about it in detail

default: <VictoryLabel renderInPortal/>

            

labels

VictoryArea uses the standard labels prop. Read about it in detail

            

name

The name prop is used to reference a component instance when defining shared events.

name="series-1"

origin

The origin prop is only used by polar charts, and is usually controlled by VictoryChart. It will not typically be necessary to set an origin prop manually

Read about the origin prop in detail

padding

VictoryArea uses the standard padding prop. Read about it here

default (provided by default theme): padding={50}

padding={{ top: 20, bottom: 60 }}

polar

VictoryArea uses the standard polar prop. Read about it here

            

range

The range prop is usually controlled by VictoryChart. It will not typically be necessary to set a range prop manually

Read about the range prop in detail

samples

VictoryArea uses the standard samples prop. Read about it here

default: samples={50}

samples={100}

scale

VictoryArea uses the standard scale prop. Read about it here

default: scale="linear"

scale={{x: "linear", y: "log"}}

sharedEvents

The sharedEvents prop is used internally to coordinate events between components. It should not be set manually.

sortKey

VictoryArea uses the standard sortKey prop. Read about it here

See the Data Accessors Guide for more detail on formatting and processing data.

sortKey="x"

standalone

VictoryArea uses the standard standalone prop. Read about it here

note: When VictoryArea is nested within a component like VictoryChart, this prop will be set to false

default: standalone={true}

            

style

VictoryArea uses the standard style prop. Read about it here

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

            

theme

VictoryArea uses the standard theme prop. Read about it here

See the Themes Guide for information about creating custom themes.

default: theme={VictoryTheme.grayscale}

theme={VictoryTheme.material}

width

VictoryArea uses the standard width prop. Read about it here

default (provided by default theme): width={450}

width={400}

x

VictoryArea uses the standard x data accessor prop. Read about it here

See the Data Accessors Guide for more detail on formatting and processing data.

x="employee.name"

y

VictoryArea uses the standard y data accessor prop. Read about it here

See the Data Accessors Guide for more detail on formatting and processing data.

y={(d) => d.value + d.error}

y0

VictoryArea uses the standard y0 data accessor prop to set a baseline. Read about it here

See the Data Accessors Guide for more detail on formatting and processing data.