Fix ParallelCoordinates/Legend bugs, add general hide-data-point filtering - #269
Merged
Merged
Conversation
…ering - ParallelCoordinates: a brush-filtered-out row no longer responds to mouseover/click (it stayed hit-testable, especially on Canvas where the virtual hit-test layer always paints at full opacity/width), even though it's still drawn faded for context. - LegendOverlay: dragging no longer resizes the Legend - its on-screen size is now pinned at pickup instead of falling back to generic, direction- agnostic max-width/max-height mid-drag. - Add a general chartActions.hideDataPoint/clearHiddenData mechanism, read by chartSelectors.data so a hidden datum is excluded for every plot/axis/ scale, not just faded. Wires up the previously-stubbed "Hide data point" ContextMenu action via a new useDatumContextMenu hook, right-clickable on Scatter, Bar/GroupedBar/StackedBar, Column/GroupedColumn/StackedColumn, Pie/Donut, Line/Area/StackedArea, Radar, RadialArea, Treemap, CirclePacking, WordCloud and Funnel. <ContextMenuOverlay>'s default getItems now shows datum items automatically for that context, and the background "Reset filters" action clears hidden data too. - Add Storybook stories demonstrating brushing on Canvas and with a 10,000-row dataset exercising Canvas's progressive/batched rendering. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012eVUkMSsPgX1LbWuFDkRJy
🦋 Changeset detectedLatest commit: edca195 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Right-click is reserved for the chart's own background menu. A mark's datum context menu now opens via the same left-click handler as the plot's existing onClick prop (calling both), instead of a separate "contextmenu" listener - which also simplifies the Canvas plumbing back to just click/mousemove, since a left click already flows through the existing virtual-canvas click handling. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012eVUkMSsPgX1LbWuFDkRJy
IPWright83
marked this pull request as ready for review
August 25, 2026 17:41
The chromatic job only runs when pull_request.draft == false, but the workflow triggers on opened/synchronize/reopened - not ready_for_review - so marking the PR ready didn't fire a new run. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012eVUkMSsPgX1LbWuFDkRJy
A single colour with a low theme.series.opacity lets overlapping rows blend into visibly darker bands wherever the data is denser, instead of categorical colouring drowning out that signal at 10,000 rows. Also exclude the story from Chromatic snapshotting - a large, progressively-rendered Canvas capture adds little as a pixel-diff baseline, the same call already made for Scatter's own large-dataset story. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012eVUkMSsPgX1LbWuFDkRJy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up fixes/features on the recently-merged
<ParallelCoordinates>chart:CanvasBrushFilteringstory showing brushing works identically withuseCanvas.LargeDatasetstory (combined with brushing, per the ask) exercising Canvas's progressive/batched rendering (PROGRESSIVE_RENDER_THRESHOLD).BRUSHED_OUT_OPACITY) still responded to mouseover/click - on Canvas this was especially bad, since the virtual hit-test canvas always hit-tests at full opacity/a widened stroke (renderPolyline'soverrideColorpath), so a nearly-invisible brushed-out row could still pop up a tooltip. A brushed-out row is now purely visual - still drawn faded for context, but non-interactive.chartActions.hideDataPoint/clearHiddenData, read bychartSelectors.dataso a hidden datum disappears for every plot/axis/scale, not just faded (unlike the existing per-fieldchartActions.setFilter). Wired the previously-stubbed "Hide data point"<ContextMenu>action up to it via a newuseDatumContextMenuhook, left-clickable on<Scatter>,<Bar>/<GroupedBar>/<StackedBar>,<Column>/<GroupedColumn>/<StackedColumn>,<Pie>/<Donut>,<Line>/<Area>/<StackedArea>,<Radar>,<RadialArea>,<Treemap>,<CirclePacking>,<WordCloud>and<Funnel>- alongside whatever that plot's ownonClickprop already does. Right-clicking a mark is deliberately left alone (falling through to the browser's native menu), reserved for the background menu. Not supported on<ParallelCoordinates>, which already has its own brush-based filtering.<ContextMenuOverlay>'s defaultgetItemsnow shows the datum items automatically for a"datum"context, and the background "Reset filters" action (now also part ofgetDefaultBackgroundItems) clears hidden data too.<Legend>around resized it - picking it up substituted generic, direction-agnosticmaxWidth/maxHeightfor whatever direction-specific clamp (getLegendMaxDimensions) it was rendered with while docked, and since the box has no explicit size of its own, that mismatch reflowed/clipped it the instant it was grabbed. Its on-screen size is now pinned to whatever it was at pickup for the whole drag.Test plan
pnpm --filter '@chart-io/core' build+types- no errors in changed fileseslintclean on all changed files.changeset/parallel-coordinates-followups.md)🤖 Generated with Claude Code
https://claude.ai/code/session_012eVUkMSsPgX1LbWuFDkRJy
Generated by Claude Code