Repository navigation
variable styles - #909
variable styles#909Fil wants to merge 4 commits into
Conversation
|
I'm not sure how to make dx and dy variable when X or Y are not channels; I think I'll punt on this for now, because I don't want to overcomplicate the PR—my first prototype was making changes in each and every mark, depending on X, Y, and possibly cx, cy when X and Y were not defined… booo. The current approach which shifts X seems much better, but doesn't work when X is not a channel. |
…ont-weight, strokeDasharray, strokeDashoffset maybeDasharrayChannel identifies arrays of numbers (possibly joined by white space or commas) as constant; a single number is an acceptable strokeDasharray option
|
rebased |
|
Fil, thanks for the work here. I would like to put this on hold to focus on animation and interaction. I am concerned that this generalization may make animation more difficult to implement. Let’s discuss this week. |
|
I regularly trip on this one, and agents do too; in particular the textAnchor for specific labels, like in https://observablehq.com/@visionscarto/us-measles-resurgence |
Conflict resolution: - src/plot.js: Mark moved to src/mark.js on main; the PR's removal of the constant dx/dy from the Mark constructor is applied there instead. - src/channel.js: take main's valueObject. The dx/dy channel offsets now apply in Mark.scale, after the projection (if any), so that pixel offsets are not added to longitude and latitude. - src/style.js: combine main's "auto" scales, filter: null on title, href and ariaLabel, and the channels option with the PR's new channels. - src/marks/text.js: keep main's optional text channel and title (TL) channel alongside the PR's text style channels. - README.md: take main's; port the documentation to docs/features/marks.md and docs/marks/text.md. - test/plots/index.js: deleted on main; convert the PR's test plots to TypeScript and register them in test/plots/index.ts. Snapshots regenerated (same dash, anchor, fill and font attributes as before; only main's newer SVG structure and number precision differ). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This PR wants to make all of the common styles (or most of them) "variable" (#175, #380)
mixBlendModefor the text mark:
fontSize(was already variable)for the arrow mark: