This is an automated email from the ASF dual-hosted git repository. kristw pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push: new 823555e Fix line chart overflowing the right side (#6829) 823555e is described below commit 823555e07db883c7d59ea4e867cca3efb784c721 Author: Krist Wongsuphasawat <krist.wo...@gmail.com> AuthorDate: Wed Feb 6 21:28:30 2019 -0800 Fix line chart overflowing the right side (#6829) * Fix line chart overflowing the right side * revert package-lock.json * revert again --- superset/assets/src/visualizations/nvd3/NVD3Vis.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset/assets/src/visualizations/nvd3/NVD3Vis.js b/superset/assets/src/visualizations/nvd3/NVD3Vis.js index d2c3ea6..062906e 100644 --- a/superset/assets/src/visualizations/nvd3/NVD3Vis.js +++ b/superset/assets/src/visualizations/nvd3/NVD3Vis.js @@ -641,15 +641,15 @@ function nvd3Vis(element, props) { // If x bounds are shown, we need a right margin margins.right = Math.max(20, maxXAxisLabelHeight / 2) + marginPad; } - if (staggerLabels) { - margins.bottom = 40; - } else { + if (xLabelRotation === 45) { margins.bottom = ( maxXAxisLabelHeight * Math.sin(Math.PI * xLabelRotation / 180) ) + marginPad; margins.right = ( maxXAxisLabelHeight * Math.cos(Math.PI * xLabelRotation / 180) ) + marginPad; + } else if (staggerLabels) { + margins.bottom = 40; } if (isVizTypes(['dual_line', 'line_multi'])) {