Skip to content

Expose clip prop on Annotate#721

Open
morningsend wants to merge 1 commit into
react-financial:mainfrom
morningsend:codex/expose-annotate-clip
Open

Expose clip prop on Annotate#721
morningsend wants to merge 1 commit into
react-financial:mainfrom
morningsend:codex/expose-annotate-clip

Conversation

@morningsend

Copy link
Copy Markdown

Summary

Expose an optional clip prop on Annotate and pass it through to GenericChartComponent.

Why

Annotate currently renders through GenericChartComponent with its default clip: true behavior. That means annotation SVG is clipped to the chart plot area via chart-area-clip-{chartId}. For marker-style annotations such as entry/exit badges, labels, or callouts, consumers sometimes need the marker to render just outside the plot boundary while still following pan/zoom.

This keeps the existing behavior by default (clip: true) and lets users opt out with:

<Annotate clip={false} ... />

Validation

Ran with Node 18/npm 9 because the repo toolchain does not bootstrap under Node 26:

npx -y -p node@18 -p npm@9 npm ci
npx -y -p node@18 -p npm@9 npm run build:core
npx -y -p node@18 -p npm@9 npm run build:annotations
npx -y -p node@18 -p npm@9 npx eslint packages/annotations/src/Annotate.tsx --ext ts --ext tsx --quiet
git diff --check

@morningsend morningsend marked this pull request as ready for review June 21, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant