Chart Furniture
Furniture here refers to parts of the chart that do not display data.
Tick Marks
Tick marks are rendered by axes to indicate how a position relates to real-world data. There are two tick mark components: XTickMark
and YTickMark
which both accept the same props:
Axis Label
These components (XAxisLabel
and YAxisLabel
) render a label for the entire axis, and typically are displayed below the tick marks on the x-axis and to the left of the tick marks on the y-axis. The y-axis label is usually rotated to display bottom-to-top.
Calculating the position of the label is non-trivial. The position passed by the XAxis
and YAxis
components, without applying chartStyles, is at the center of the axis being labelled. The styles xAxisLabelPosition
and yAxisLabelPosition
styles control the position of the label relative to the axis line, in pixels. This number needs to be great enough to push the label past the tick marks and their text labels. Both components accept the same props: