d3.parcoords.js
function brushFor(axis) {
            var brush = d3.svg.multibrush();

            brush
                .y(__.dimensions[axis].yscale)
                .on("brushstart", function() {
                    if(d3.event.sourceEvent !== null) {
                        events.brushstart.call(pc, __.brushed);
                        d3.event.sourceEvent.stopPropagation();
                    }
                })
                .on("brush", function() {
                    brushUpdated(selected());
                })
                .on("brushend", function() {
                    // d3.svg.multibrush clears extents just before calling 'brushend'
                    // so we have to update here again.
                    // This fixes issue #103 for now, but should be changed in d3.svg.multibrush
                    // to avoid unnecessary computation.
                    brushUpdated(selected());
                    events.brushend.call(pc, __.brushed);
                })
                .extentAdaption(function(selection) {
                    selection
                        .style("visibility", null)
                        .attr("x", -15)
                        .attr("width", 30)
                        .style("fill", "rgba(255,255,255,0.25)")
                        .style("stroke", "rgba(0,0,0,0.6)");
                })
                .resizeAdaption(function(selection) {
                    selection
                        .selectAll("rect")
                        .attr("x", -15)
                        .attr("width", 30)
                        .style("visibility", null)
                        .style("fill", "rgba(0,0,0,0.1)");
                });

            brushes[axis] = brush;
            return brush;
        }
function brushFor(axis) {
            var brush = d3.svg.multibrush();

            brush
                .y(__.dimensions[axis].yscale)
                .on("brushstart", function() {
                    if(d3.event.sourceEvent !== null) {
                        events.brushstart.call(pc, __.brushed);
                        d3.event.sourceEvent.stopPropagation();
                    }
                })
                .on("brush", function() {
                    brushUpdated(selected());
                })
                .on("brushend", function() {
                    // d3.svg.multibrush clears extents just before calling 'brushend'
                    // so we have to update here again.
                    // This fixes issue #103 for now, but should be changed in d3.svg.multibrush
                    // to avoid unnecessary computation.
                    brushUpdated(selected());
                    events.brushend.call(pc, __.brushed);
                })
                .extentAdaption(function(selection) {
                    selection
                        .style("visibility", null)
                        .attr("x", -15)
                        .attr("width", 30)
                        .style("fill", "rgba(255,255,255,0.25)")
                        .style("stroke", "rgba(0,0,0,0.6)");
                })
                .resizeAdaption(function(selection) {
                    selection
                        .selectAll("rect")
                        .attr("x", -15)
                        .attr("width", 30)
                        .style("visibility", null)
                        .style("fill", "rgba(0,0,0,0.1)");
                });

            brushes[axis] = brush;
            return brush;
        }
function brushFor ( axis ) { var brush = d3 . svg . multibrush ( ) ; brush . y ( __ . dimensions [ axis ] . yscale ) . on ( "brushstart" , function ( ) { if ( d3 . event . sourceEvent !== null ) { events . brushstart . call ( pc , __ . brushed ) ; d3 . event . sourceEvent . stopPropagation ( ) ; } } ) . on ( "brush" , function ( ) { brushUpdated ( selected ( ) ) ; } ) . on ( "brushend" , function ( ) { // d3.svg.multibrush clears extents just before calling 'brushend' // so we have to update here again. // This fixes issue #103 for now, but should be changed in d3.svg.multibrush // to avoid unnecessary computation. brushUpdated ( selected ( ) ) ; events . brushend . call ( pc , __ . brushed ) ; } ) . extentAdaption ( function ( selection ) { selection . style ( "visibility" , null ) . attr ( "x" , - 15 ) . attr ( "width" , 30 ) . style ( "fill" , "rgba(255,255,255,0.25)" ) . style ( "stroke" , "rgba(0,0,0,0.6)" ) ; } ) . resizeAdaption ( function ( selection ) { selection . selectAll ( "rect" ) . attr ( "x" , - 15 ) . attr ( "width" , 30 ) . style ( "visibility" , null ) . style ( "fill" , "rgba(0,0,0,0.1)" ) ; } ) ; brushes [ axis ] = brush ; return brush ; }
function brushExtents() { var extents = {}; d3.keys(__.dimensions).forEach(function(d) { var brush = brushes[d]; if (brush !== undefined && !brush.empty()) { var extent = brush.extent(); extents[d] = extent; } }); return extents; }
function brushExtents () { var extents = {} ; d3 . keys ( __ . dimensions ) . forEach ( function ( d ) { var brush = brushes [ d ] ; if ( brush ! == undefined && !brush . empty () ) { var extent = brush . extent () ; extents [ d ] = extent ; } } ) ; return extents ; }