showLegendColors(bgParams) {
            var legendFgColors=this.legendLayer.append("g").attr("class","legendFgColors");
            var data=this.colorScale.range();
            legendFgColors.selectAll("rect")
                .data(data)
                .enter().append("rect")
                .attr("class",function(d,i){
                    return "legendColorRect legendColorRect"+i;
                })
                .attr("x",this.legendForm[0]+this.legendColorForm[2])
                .attr("y",function(d,i){
                    return bgParams["y"]+this.legendColorForm[3]+i*(this.legendColorForm[3]+this.legendColorForm[1]);
                }.bind(this))
                .attr("height",this.legendColorForm[1])
                .attr("width",this.legendColorForm[0])
                .attr("fill",function(d,i){
                    return d;
                })
                .attr("stroke-width",0);
        }
/* functions helping to visualize foreground of the legend */
functions helping to visualize foreground of the legend
functions helping to visualize foreground of the legend
showLegendColors(bgParams) {
            var legendFgColors=this.legendLayer.append("g").attr("class","legendFgColors");
            var data=this.colorScale.range();
            legendFgColors.selectAll("rect")
                .data(data)
                .enter().append("rect")
                .attr("class",function(d,i){
                    return "legendColorRect legendColorRect"+i;
                })
                .attr("x",this.legendForm[0]+this.legendColorForm[2])
                .attr("y",function(d,i){
                    return bgParams["y"]+this.legendColorForm[3]+i*(this.legendColorForm[3]+this.legendColorForm[1]);
                }.bind(this))
                .attr("height",this.legendColorForm[1])
                .attr("width",this.legendColorForm[0])
                .attr("fill",function(d,i){
                    return d;
                })
                .attr("stroke-width",0);
        }
showLegendColors ( bgParams ) { var legendFgColors = this . legendLayer . append ( "g" ) . attr ( "class" , "legendFgColors" ) ; var data = this . colorScale . range ( ) ; legendFgColors . selectAll ( "rect" ) . data ( data ) . enter ( ) . append ( "rect" ) . attr ( "class" , function ( d , i ) { return "legendColorRect legendColorRect" + i ; } ) . attr ( "x" , this . legendForm [ 0 ] + this . legendColorForm [ 2 ] ) . attr ( "y" , function ( d , i ) { return bgParams [ "y" ] + this . legendColorForm [ 3 ] + i * ( this . legendColorForm [ 3 ] + this . legendColorForm [ 1 ] ) ; } . bind ( this ) ) . attr ( "height" , this . legendColorForm [ 1 ] ) . attr ( "width" , this . legendColorForm [ 0 ] ) . attr ( "fill" , function ( d , i ) { return d ; } ) . attr ( "stroke-width" , 0 ) ; }
functions helping to visualize foreground of the legend
functions helping to visualize foreground of the legend