mirror of https://github.com/apache/superset.git
Fix line chart overflowing the right side (#6829)
* Fix line chart overflowing the right side * revert package-lock.json * revert again
This commit is contained in:
parent
231d826757
commit
823555e07d
|
@ -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'])) {
|
||||
|
|
Loading…
Reference in New Issue