Skip to content

feature: add dodge transform #16

@gka

Description

@gka

Is your feature request related to a problem? Please describe.
see Dodge transform in Observable Plot.

Describe the solution you'd like
The dodge transform needs to be applied after scaling, so it can't be passed to the marks like other transforms. Instead we could allow users to pass a dodgeX or dodgeY property to all applicable marks, e.g.:

<!-- just activate dodgeY -->
<DotX data={cars} x="weight (lb)" fill dodgeY />
<!-- or pass anchor options: -->
<DotX data={cars} x="weight (lb)" fill dodgeY={{ anchor: 'bottom', padding: 2 }} />

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions