plot icon indicating copy to clipboard operation
plot copied to clipboard

variable styles

Open Fil opened this issue 3 years ago • 3 comments
trafficstars

This PR wants to make all of the common styles (or most of them) "variable" (#175, #380)

  • [x] strokeDasharray (difficult case: we can't consider that an array is a columnar representation of a channel) 🌶
  • [x] strokeDashoffset (number)
  • [x] dx and dy
    • [ ] DX without X, DY without Y?
  • [ ] ~~mixBlendMode~~
  • [ ] more?

for the text mark:

  • [x] textAnchor
  • [x] fontFamily
  • [x] ~~fontSize~~ (was already variable)
  • [x] fontStyle
  • [x] fontVariant
  • [x] fontWeight

Fil avatar Jun 02 '22 14:06 Fil

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.

Fil avatar Jul 07 '22 12:07 Fil

rebased

Fil avatar Jul 22 '22 14:07 Fil

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.

mbostock avatar Jul 24 '22 18:07 mbostock