-
Notifications
You must be signed in to change notification settings - Fork 185
Clipping a Text mark? #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Maybe we could do this by having one mark generate an id, and then the text mark could reference that id for clipping. For example, if you said: Plot.rect(data, {id: "rect", ...options}) then you could say: Plot.text(data, {clip: "rect", ...options}) and Plot would automatically pair by index (and also scope the id to each plot so that it doesn’t interfere with other plots on the page). |
* clip: true clips the mark to the frame closes #165 related: #181 * reindex clip id * Update src/style.js Co-authored-by: Mike Bostock <[email protected]> * Update src/style.js Co-authored-by: Mike Bostock <[email protected]> * data source (the actual notebook is broken atm) * clippath => clip * reformat horizon plot; nicer heuristic for color * naming consistency * tweak horizon example (#753) * tweak horizon example * use offset, not index * nicer tick labels Co-authored-by: Mike Bostock <[email protected]>
Maybe introduce a clip: "rect" option that consumes x1, x2, y1, y2 and adds a clip-path: polygon(…) |
browser support for clip-path: polygon in SVG is not great… Edit: Jan. 2025 it seems like all three majors browsers now have correct support for clip-path: polygon / path. |
Should the Text mark support a clipping rect? A clipping circle? A way to reference another mark and use it as a clipping mask?
The text was updated successfully, but these errors were encountered: