Skip to content

Commit

Permalink
Bug fix for infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
fanthos committed Dec 15, 2017
1 parent 88c49c3 commit f496a6f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/core.layoutService.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ module.exports = function(Chart) {
// Step 1
var chartWidth = width - leftPadding - rightPadding;
var chartHeight = height - topPadding - bottomPadding;
if (chartWidth < 0) chartWidth = 0;
if (chartHeight < 0) chartHeight = 0;
var chartAreaWidth = chartWidth / 2; // min 50%
var chartAreaHeight = chartHeight / 2; // min 50%

Expand Down

0 comments on commit f496a6f

Please sign in to comment.