This is an automated email from the ASF dual-hosted git repository.

ccwilliams pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new bc4dfad  fix bar chart value overlap with legend (#6145)
bc4dfad is described below

commit bc4dfad6c8cadf63f8b04f0bee07b77cb211ca9d
Author: Krist Wongsuphasawat <[email protected]>
AuthorDate: Thu Oct 18 18:00:42 2018 -0700

    fix bar chart value overlap with legend (#6145)
---
 superset/assets/src/visualizations/nvd3/NVD3Vis.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/superset/assets/src/visualizations/nvd3/NVD3Vis.js 
b/superset/assets/src/visualizations/nvd3/NVD3Vis.js
index 392e3a5..5000731 100644
--- a/superset/assets/src/visualizations/nvd3/NVD3Vis.js
+++ b/superset/assets/src/visualizations/nvd3/NVD3Vis.js
@@ -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);

Reply via email to