Skip to content
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

function getDx() determines the wrong dx for datalabels with 180 degrees #47

Open
Liviak5 opened this issue Nov 30, 2022 · 0 comments
Open

Comments

@Liviak5
Copy link

Liviak5 commented Nov 30, 2022

First of all, thank you for this great chart. I really appreciate your work!

Recently I encountered a small problem:
when a dataLabel is exactly 180 degrees, the dx is 5 and the dataLabel falls into the middle of the chart.
Bildschirmfoto 2022-11-30 um 14 41 14
Probably this will fix the problem (textAngle < 180 instead of textAngle <= 180):
function getDx({ textAngle, currentDx }) { if (textAngle < 180) { return 5; } return !!currentDx && currentDx < -5 ? currentDx : -5; }
What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant