]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix layout service
authorEvert Timberg <evert.timberg@gmail.com>
Mon, 28 Dec 2015 22:20:08 +0000 (17:20 -0500)
committerEvert Timberg <evert.timberg@gmail.com>
Tue, 29 Dec 2015 14:07:01 +0000 (09:07 -0500)
src/core/core.layoutService.js

index def2b55aee5d0579acb4b1410486ead3647170b0..a7f2bcfa84cc036f3d5c8fa8452237ea4cfc7f02 100644 (file)
                                                        bottom: 0,
                                                };
 
-                                               box.update(box.options.fullWidth ? chartWidth : maxChartAreaWidth, minBoxSize.minSize.height, scaleMargin);
+                                               // Don't use min size here because of label rotation. When the labels are rotated, their rotation highly depends
+                                               // on the margin. Sometimes they need to increase in size slightly
+                                               box.update(box.options.fullWidth ? chartWidth : maxChartAreaWidth, chartHeight / 2, scaleMargin);
                                        } else {
                                                box.update(minBoxSize.minSize.width, maxChartAreaHeight);
                                        }