| layerchart | minor |
|---|
breaking(Brush): Redesign brush API
Breaking changes:
- Remove
modeprop ('integrated' | 'separated') — sync behavior is now driven by presence ofx/yprops - Remove
resetOnEnd— calle.brush.reset()in youronBrushEndhandler instead - Remove
ignoreResetClick— replaced byclickToReset(defaulttrue) - Remove
onResetevent — checkbrush.active === falseinonBrushEnd/onChangeinstead
New features:
- Add
BrushState.move({ x?, y? })for programmatic selection control (like d3'sbrush.move()) - Add
BrushState.selectAll()to select the full domain extent - Add
BrushState.reset()to clear the selection - Add
clickToResetprop (defaulttrue) - Add
zoomOnBrushprop on Chart for simplified charts to opt into brush-to-zoom - Move domain clamping, edge adjustment, and range computation logic into
BrushStateclass - Add
BrushChartContextinterface for easier testing