Browse Source

HUE-8178 [charts] Highlight bars selected using single select.

jdesjean 7 years ago
parent
commit
409059e8af

+ 5 - 0
desktop/core/src/desktop/static/desktop/js/nv.d3.multiBarWithBrushChart.js

@@ -85,6 +85,7 @@ nv.models.multiBarWithBrushChart = function() {
     , onStateChange = null
     , onLegendChange = null
     , onChartUpdate = null
+    , selectedBars = null
     , selectBars = null
     ;
 
@@ -359,6 +360,9 @@ nv.models.multiBarWithBrushChart = function() {
         .on('mouseout', onMouseOut)
         .on('click', onClick);
       }
+      if (selectBars && selectedBars) {
+        selectBars(selectedBars);
+      }
 
 
       function enableBrush() {
@@ -1020,6 +1024,7 @@ nv.models.multiBarWithBrushChart = function() {
     } else {
       chart.brushDomain = null;
     }
+    selectedBars = args;
     if (selectBars) {
       selectBars(args);
     }