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

[BUG] 2.7.1 Polar Area Chart padding/size issue #5237

Closed
scottmcculloch opened this issue Feb 5, 2018 · 3 comments
Closed

[BUG] 2.7.1 Polar Area Chart padding/size issue #5237

scottmcculloch opened this issue Feb 5, 2018 · 3 comments

Comments

@scottmcculloch
Copy link

scottmcculloch commented Feb 5, 2018

When updating from 2.5.0 to 2.7.1 I've found the Polar Area Chart has changed something about how it is displayed. There's now a lot of padding on either side of the graph, so that it no longer fills the div in which the canvas is placed.

Expected Behavior

Polar Area Chart should fill the div within which the canvas is placed.

Current Behavior

Polar Area Chart adds a lot of padding, or sizes itself such that there is a lot of 'white space' around it.

See screenshots of the actual output on our site:
screenshot - using 2.5.0
screenshot - using 2.7.1

Possible Solution

unknown

Steps to Reproduce (for bugs)

Two codepen examples (the only difference between the two is the version of chart.js being loaded)
codepen using 2.5.0
codepen using 2.7.1

Note that I do set padding of 18 in the chart settings, this is just to accommodate the background image that contains the labels for around the chart that you can see in the screenshots.

Context

See screenshots linked above.
We are generating a report based on a user submitted questionnaire. Our output provides both the Polar Area Chart and a table of results and additional interpretation. Using 2.5.0 the chart is sized correctly for our report. Using 2.7.1 it is too small. We do want to be sure to keep it responsive, because many of our users are on mobile devices.

Environment

  • Chart.js version: 2.7.1 and 2.5.0
  • Browser name and version: Safari Release 48 (Safari 11.2, WebKit 13606.1.2.2) and Chrome 63.0.3239.132
@simonbrunel
Copy link
Member

Due to a change in 2.7 (see #4079), can be fixed using options.aspectRatio: 1.

@scottmcculloch
Copy link
Author

Thanks @simonbrunel !

@simonbrunel
Copy link
Member

@scottmcculloch I'm closing this ticket, feel free to re-open if you have troubles with aspectRatio.

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