useLegend
Legend entries of a pane at the crosshair (or the last bar when there is no crosshair).
import { useLegend } from "@reincharts/tooltip";Legend entries of a pane at the crosshair (or the last bar when there is no crosshair). Re-renders only when the index or the displayed data changes.
Signature
function useLegend(paneId: string, o?: CollectOptions): LegendStateSee also
- Custom legend (example)