mirror of
https://github.com/apache/superset.git
synced 2026-05-07 08:54:23 +00:00
Fix line chart overflowing the right side (#6829)
* Fix line chart overflowing the right side
* revert package-lock.json
* revert again
(cherry picked from commit 823555e07d)
This commit is contained in:
committed by
Christine Chambers
parent
b7e02ab776
commit
b7d2bd09a7
@@ -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'])) {
|
||||
|
||||
Reference in New Issue
Block a user