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

How can I set ValuePosition for individual slices? #2736

Closed
skhillon opened this issue Aug 20, 2017 · 2 comments
Closed

How can I set ValuePosition for individual slices? #2736

skhillon opened this issue Aug 20, 2017 · 2 comments

Comments

@skhillon
Copy link

skhillon commented Aug 20, 2017

When using Pie Charts, sometimes I have values that are too small to display a label inside a slice. For example, the slice for 2% is too small to show a label saying "2%".

I would like labels to be inside slices unless the data value is less than some threshold.

Issue #944 suggested hiding these labels entirely, but I would prefer not to go that route. This pull request added the ability to show labels outside slices, but it seems to do so for every slice.

Is it possible to be selective about displaying labels inside and outside the slice depending on its value?

@seenoevo
Copy link

if you want that, you're going to have to implement your own logic by subclassing PieChartRenderer and overriding drawValues, as the original code does not easily allow you to do that.

@liuxuan30
Copy link
Member

as @seenoevo said, if you want to have more controls, you have to subclass and override some methods

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

3 participants