mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +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
|
// If x bounds are shown, we need a right margin
|
||||||
margins.right = Math.max(20, maxXAxisLabelHeight / 2) + marginPad;
|
margins.right = Math.max(20, maxXAxisLabelHeight / 2) + marginPad;
|
||||||
}
|
}
|
||||||
if (staggerLabels) {
|
if (xLabelRotation === 45) {
|
||||||
margins.bottom = 40;
|
|
||||||
} else {
|
|
||||||
margins.bottom = (
|
margins.bottom = (
|
||||||
maxXAxisLabelHeight * Math.sin(Math.PI * xLabelRotation / 180)
|
maxXAxisLabelHeight * Math.sin(Math.PI * xLabelRotation / 180)
|
||||||
) + marginPad;
|
) + marginPad;
|
||||||
margins.right = (
|
margins.right = (
|
||||||
maxXAxisLabelHeight * Math.cos(Math.PI * xLabelRotation / 180)
|
maxXAxisLabelHeight * Math.cos(Math.PI * xLabelRotation / 180)
|
||||||
) + marginPad;
|
) + marginPad;
|
||||||
|
} else if (staggerLabels) {
|
||||||
|
margins.bottom = 40;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isVizTypes(['dual_line', 'line_multi'])) {
|
if (isVizTypes(['dual_line', 'line_multi'])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user