fix bar chart value overlap with legend (#6145)

This commit is contained in:
Krist Wongsuphasawat 2018-10-18 18:00:42 -07:00 committed by Chris Williams
parent 04e5e87114
commit bc4dfad6c8
1 changed files with 3 additions and 0 deletions

View File

@ -322,6 +322,9 @@ function nvd3Vis(element, props) {
});
}
if (showBarValue) {
// Add more margin to avoid label colliding with legend.
const top = chart.margin().top;
chart.margin({ top: top + 24 });
setTimeout(function () {
drawBarValues(svg, data, isBarStacked, yAxisFormat);
}, ANIMATION_TIME);