mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
Apply stretchMargin only to distribution bar (#1124)
* When the label size is too short, the constant for calculating margin_size does not apply. Also nvd3 auto-adjust font-size of axis labels. Temporary solution here: Setting a fixed font-size on nvd3 axis labels and a minimum threshold for label size. * Only stretch margin for dist_bar
This commit is contained in:
parent
3602d940eb
commit
ffe6fb849f
@ -312,8 +312,12 @@ function nvd3Vis(slice) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fd.bottom_margin === 'auto') {
|
if (fd.bottom_margin === 'auto') {
|
||||||
const stretchMargin = calculateStretchMargins(payload);
|
if (vizType === 'dist_bar') {
|
||||||
chart.margin({ bottom: stretchMargin });
|
const stretchMargin = calculateStretchMargins(payload);
|
||||||
|
chart.margin({ bottom: stretchMargin });
|
||||||
|
} else {
|
||||||
|
chart.margin({ bottom: 50 });
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
chart.margin({ bottom: fd.bottom_margin });
|
chart.margin({ bottom: fd.bottom_margin });
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user