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

Polar Chart on documentation page is cut off in Chrome #6217

Closed
lonerzzz opened this issue Apr 19, 2019 · 3 comments
Closed

Polar Chart on documentation page is cut off in Chrome #6217

lonerzzz opened this issue Apr 19, 2019 · 3 comments

Comments

@lonerzzz
Copy link

Expected Behavior

The polar area chart should render with enough top and bottom margin to include the entire chart and labels.

Current Behavior

When the polar area chart is rendered in Chrome as per the example page, (https://www.chartjs.org/docs/latest/charts/polar.html) the very bottom of the chart is clipped. The same problem occurs if the legend is disabled, resulting in the number labels being cut off at the top of the chart.

Possible Solution

Not sure.

Steps to Reproduce (for bugs)

The problematic example is right on the documentation page as mentioned in the Current Behavior section.

Context

The chart looks mangled which is not good for presentation.

Environment

  • Chart.js version: the current one used for the polar chart documentation page of chart.js and 2,7.3
  • Browser name and version: Chrome 73.0.3683.103
@kurkle
Copy link
Member

kurkle commented Apr 25, 2019

This comes from #5914

I think it goes wrong here:

me.yCenter = Math.floor(((maxTop + maxBottom) / 2) + me.top + me.paddingTop);

Or here (used to calculate paddingTop):

return valueOrDefault(tickOpts.fontSize, defaults.global.defaultFontSize) + tickOpts.backdropPaddingY * 2;

@nagix want to take a look?

@nagix
Copy link
Contributor

nagix commented Apr 25, 2019

The documentation page is using Chart.js 2.5.0. #5848 fixed this issue and the fix is included in 2.8.0.

@etimberg
Copy link
Member

Closing per the above comment. v2.8 shipped a while ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants