FormidableLabs / FormidableLabs/victory
Label `angle` should not affect `dx` and `dy` transform coordinate system
- Dominant language
- TypeScript
- Stars
- 11.2k
- Forks
- 536
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When an `angle` is applied to a label, any accompanying `dx` and `dy` offsets get applied in the _rotated_ coordinate system. E.g. if a label is rotated 90°, `dx` ends up moving the label along the Y-axis rather than the X-axis as expected.
**Code Sandbox link**
https://codesandbox.io/s/vigorous-bash-10u75g
**To Reproduce**
Steps to reproduce the behavior:
1. Go to code sandbox link above.
2. Note: rotated labels lie below x-axis as expected
3. Change line 10 to ``
4. Note that labels move to the right _and upwards_, (along the rotated label axis)
Before `dx` offset:

After `dx` offset:

**Expected behavior**
`dx` and `dy` label transformations should always be in the chart coordinate plane. I.e. I'd expect the graph to look something liek this:
Contributor guide
Assessment
This issue has not been assessed yet.