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

Draw outside label in polar chart at fixed position #132

Open
lilian21 opened this issue Aug 27, 2020 · 1 comment
Open

Draw outside label in polar chart at fixed position #132

lilian21 opened this issue Aug 27, 2020 · 1 comment

Comments

@lilian21
Copy link

Hi,
I have some issues positioning the label in a polar chart. At this moment, when using arc: true, position: 'outside', labels are positioning at a relative distance from every slice. Is there any chance to position labels with a fixed value(pixels) from the edge of chart( last circle) ?

Here is what I've got so far:
image

And this is how I need it:
image

Thank you

@UzverNumber47
Copy link

UzverNumber47 commented Dec 11, 2020

Well, I managed to solve the issue with render function
render: (args) => { if(args.dataset._meta[0].index === 0) { return args.label; } return ''; },

Where _meta[0].index is the index of your dataset. So you render labels only for 1 dataset.

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

2 participants