hive/html/d3js/parcoords_plot.js
// Handles a brush event, toggling the display of foreground lines.
Handles a brush event, toggling the display of foreground lines.
Handles a brush event toggling the display of foreground lines .
function brush() {
          var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),
              extents = actives.map(function(p) { return y[p].brush.extent(); });
          var labelsUsed=[];
          foreground.style("display", function(d) {
            var tmp = actives.every(function(p, i) 
            {
                   if (labelsUsed.length == 0 && !(extents[i][0] <= d[p] && d[p] <= extents[i][1]))
                       return false;
                var tmp2={};
                for (var key in d)
                {
                    if (key == undefined) continue;
                    var col = tblArrHdr.indexOf(key);
                    if (col == -1) continue;
                    var ii;
                    for (ii = 0; ii < that.colSet.length; ii++)
                        if ((that.colSet[ii].colIndex == col || that.colSet[ii].colName == key) && that.colSet[ii].strings) break;
                    if (ii != that.colSet.length) 
                        tmp2[key] = colDictionary[col][d[key]];
                    else
                        tmp2[key]=d[key];
                }
                if (extents[i][0] <= d[p] && d[p] <= extents[i][1])
                {
                    labelsUsed.push(tmp2);
                    return true;
                }
                var pos = jsonArrIndexOf(labelsUsed, tmp2)
                if ( pos >= 0 )
                {
                    labelsUsed.splice(pos,1);
                }
                 return false;
            });
            return tmp ? null : "none";
          });
          if (that.selectedCallback)
              that.selectedCallback(that, labelsUsed);
        }
function brush ( ) { var actives = dimensions . filter ( function ( p ) { return ! y [ p ] . brush . empty ( ) ; } ) , extents = actives . map ( function ( p ) { return y [ p ] . brush . extent ( ) ; } ) ; var labelsUsed = [ ] ; foreground . style ( "display" , function ( d ) { var tmp = actives . every ( function ( p , i ) { if ( labelsUsed . length == 0 && ! ( extents [ i ] [ 0 ] <= d [ p ] && d [ p ] <= extents [ i ] [ 1 ] ) ) return false ; var tmp2 = { } ; for ( var key in d ) { if ( key == undefined ) continue ; var col = tblArrHdr . indexOf ( key ) ; if ( col == - 1 ) continue ; var ii ; for ( ii = 0 ; ii < that . colSet . length ; ii ++ ) if ( ( that . colSet [ ii ] . colIndex == col || that . colSet [ ii ] . colName == key ) && that . colSet [ ii ] . strings ) break ; if ( ii != that . colSet . length ) tmp2 [ key ] = colDictionary [ col ] [ d [ key ] ] ; else tmp2 [ key ] = d [ key ] ; } if ( extents [ i ] [ 0 ] <= d [ p ] && d [ p ] <= extents [ i ] [ 1 ] ) { labelsUsed . push ( tmp2 ) ; return true ; } var pos = jsonArrIndexOf ( labelsUsed , tmp2 ) if ( pos >= 0 ) { labelsUsed . splice ( pos , 1 ) ; } return false ; } ) ; return tmp ? null : "none" ; } ) ; if ( that . selectedCallback ) that . selectedCallback ( that , labelsUsed ) ; }
Handles a brush event, toggling the display of foreground lines.
Handles a brush event toggling the display of foreground lines .