-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Infinite loop when width or height < padding. #5048
Conversation
@@ -172,6 +172,12 @@ module.exports = function(Chart) { | |||
// Step 1 | |||
var chartWidth = width - leftPadding - rightPadding; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A simpler way to do this more inline with existing conventions would be:
var chartWidth = Math.min(width - leftPadding - rightPadding, 0);
Not sure this fixed by #5041 or not. |
@benmccann This particular case has already been addressed. That is not to say that the layoutservice is perfect. It should probably sanitize all box and areas widths/heights to be 0 or greater. However that would require more than only checking the chartarea. |
@fanthos this PR has a merge conflict and will need to be rebased @jcopperfield could you clarify where this case is being addressed? |
@benmccann The PR #5041 fixes the infinite loop in the time scale, by having |
@fanthos Thanks for this effort. I'm going to close this PR since it cannot be merged due to the merge conflict and it seems the issue has already been addressed. Let us know if you still have the issue after 2.7.2 is released and we still need to fix it |
Simple fix #5047