Skip to main content
Virtual axis that controls the size of scatter points. Does not render anything itself.

Usage

Props

string | number | function
The key or getter function of a group of data.
string | number
default:"0"
The unique id of z-axis.
'number' | 'category'
default:"number"
The type of axis.
  • category: Treats data as distinct values. Each value is in the same distance from its neighbors, regardless of their actual numeric difference.
  • number: Treats data as continuous range. Values that are numerically closer are placed closer together on the axis.
[number, number]
default:"[64, 64]"
The range of axis. Unlike other axes, the range of z-axis is not informed by chart dimensions.
AxisDomain
Specify the domain of axis when the axis is a number axis.If undefined, then the domain is calculated based on the data and dataKeys.The length of domain should be 2, and we will validate the values in domain.Each element in the array can be a number, ‘auto’, ‘dataMin’, ‘dataMax’, a string like ‘dataMin - 20’, ‘dataMax + 100’, or a function that accepts a single argument and returns a number.
ScaleType | CustomScaleDefinition
default:"auto"
Scale function determines how data values are mapped to visual values. In other words, decided the mapping between data domain and coordinate range.If undefined, or ‘auto’, the scale function is created internally according to the type of axis and data.You can define a custom scale, either as a string shortcut to a d3 scale, or as a complete scale definition object.
string
The name of axis data.
string
The unit of axis data.

Notes

ZAxis is a virtual axis component:
  • It has no ticks, grid lines, or labels
  • It does not render anything visible on the chart
  • It is used only to control the size of Scatter points based on data values
  • The range prop determines the minimum and maximum size of scatter points in pixels

Source

https://github.com/recharts/recharts/blob/main/src/cartesian/ZAxis.tsx