Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.
ReferenceAPI ReferenceLibraryHooksUse Chart Filters

web


web / lib/hooks/use-chart-filters

lib/hooks/use-chart-filters

Hook for handling chart click interactions and filter updates.

Provides standardized callbacks for updating URL-based filters when users click on chart elements (bars, points, etc.).

Functions

useChartFilters()

useChartFilters(): ChartFilterHandlers

Creates filter update handlers for chart interactions.

Returns

ChartFilterHandlers

Object with handlers for different chart click types

Example

function MyHistogram() { const { handleDateClick } = useChartFilters(); return ( <TimeHistogram data={data} onBarClick={handleDateClick} /> ); }
Last updated on