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

Donut chart layout issue with dataLabelsPosition: 'outside' #9

Closed
sveldhuisen opened this issue Jan 28, 2019 · 3 comments
Closed

Donut chart layout issue with dataLabelsPosition: 'outside' #9

sveldhuisen opened this issue Jan 28, 2019 · 3 comments

Comments

@sveldhuisen
Copy link

Hi Pierre, I have a Donut Chart that is using dataLabelsPosition: 'outside' with showPercentage: true inside a responsive Bootstrap div. On small screens the width of the percentage is not taken into account.

The result is that the percentage are only partly visible. See attached screenshot.

screen shot 2019-01-28 at 22 34 53

@pierresh
Copy link
Owner

Hello,

This problem is a bit difficult. It seems that there are some padding/margin in your container, maybe you can set them to 0 so that the element of the chart could be expanded a bit.

@sveldhuisen
Copy link
Author

Hi Pierre, it seems to be related to padding. My Morris chart div is contained within a Bootstrap panel-body that has a padding of 15px. Do you have any suggestions on how to apply spacing without breaking the percentage labels?

pierresh pushed a commit that referenced this issue Jan 30, 2019
@pierresh
Copy link
Owner

Hello,

I just published a commit to add a new option padding. Its default value is 0, you can try to set something like 3 or 5, this will slightly reduce the size of the donut generated so that hopefully the labels could be displayed completely.

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