useOffset
Returns the offset of the chart in pixels. Offset defines the blank space between the chart and the plot area. This blank space is occupied by supporting elements like axes, legends, and brushes. The offset includes: If you are interested in the margin alone, use useMargin instead. The offset is independent of charts position on the page, meaning it does not change as the chart is scrolled or resized. It is also independent of the scale and zoom, meaning that as the user zooms in and out, the numbers will not change as the chart gets visually larger or smaller. This hook must be used within a chart context (inside a Available since Recharts 3.1<LineChart>, <BarChart>, etc.). This hook returns undefined if used outside a chart context.
Return value
ChartOffset | undefined
Offset of the chart in pixels, or undefined if used outside a chart context.