chartist-js / chartist

Simple responsive charts
https://chartist.dev
MIT License
13.33k stars 2.54k forks source link

chore(labels): add option to prevent overlapping labels #1428

Open L-Har opened 1 month ago

L-Har commented 1 month ago

Add an option to pie chart that can prevent overlapping labels. If preventOverlappingLabelOffset is Nonzero check if a label has overlapping text then move it the number of pixels up and left (Should be label size)

L-Har commented 1 month ago

@evertheylen Would you mind taking a look at this pull request? I think this would be a useful option if it were to be added into the main branch.

evertheylen commented 1 month ago

@L-Har the code looks good from a cursory glance but I'm not sure why you're asking me :)

L-Har commented 1 month ago

@evertheylen Sorry about that, I thought you were a maintainer. Thanks for approving though

L-Har commented 1 month ago

@gionkunz Would you mind reviewing this pull request?