<commit_before>/**
 * Created by hen on 3/18/14.
 */

function BrushableScale(ctx, svg, width, updateFunctionNameInCtx, redrawFunctionNameInCtx, scaleNameInCtx, params){



//    var svg = d3.select("#vis").append("svg").attr({
//        width:800,
//        height:800
//    })

    var offsetX=0,
        offsetY=0;

    var distanceBetweenAxis = 25; // distance between two scales
    var distanceBetweenUpperAndLower = 20 // should be fix !!
//        height=20;


    var width = width;

    var xScale = d3.scale.linear().domain([1,width]).range([0, width])
    var xOverViewAxisUpper = d3.svg.axis().scale(xScale);
    var xOverViewAxisLower = d3.svg.axis().scale(xScale).orient("top").tickFormat(function(d){return ""});


    var xDetailScale = d3.scale.linear().domain([0,width]).range([0,width]).clamp(true)
    var xDetailAxisUpper = d3.svg.axis().scale(xDetailScale);
    var xDetailAxisLower = d3.svg.axis().scale(xDetailScale).orient("top").tickFormat(function(d){return ""});

    var param = param

    var maxValue = 100;

    var labels=[
        {name: "largest intersection",id:"I", value:100 },
        {name: "largest group",id:"G", value:200 },
        {name: "largest set",id:"S", value:300 },
        {name: "all items",id:"A", value:400 }
    ]



    var connectionAreaData =[
        [0,-distanceBetweenAxis],
        [100,-distanceBetweenAxis],
        [width,0]
    ]


    // add axis
    svg.append("g").attr({
        "class":"x overviewAxisUpper axis",
        "transform":"translate("+offsetX+","+offsetY+")"
    }).call(xOverViewAxisUpper)


    svg.append("g").attr({
        "class":"x overviewAxisLower axis",
        "transform":"translate("+offsetX+","+(offsetY+distanceBetweenUpperAndLower)+")"
    }).call(xOverViewAxisLower)

    svg.append("g").attr({
        "class":"x detailAxisUpper axis",
        "transform":"translate("+offsetX+","+(offsetY+distanceBetweenAxis+distanceBetweenUpperAndLower)+")"
    }).call(xDetailAxisUpper)

    svg.append("g").attr({
        "class":"x detailAxisLower axis",
        "transform":"translate("+offsetX+","+(offsetY+distanceBetweenAxis+2*distanceBetweenUpperAndLower)+")"
    }).call(xDetailAxisLower)

//    svg.append("path").attr({
//        class:"connectionArea",
//        "transform":"translate("+offsetX+","+offsetY+")"
//    })


    var sliders;
    var overViewBrushDef;
    var overviewBrush;
    var redrawFunction = ctx[redrawFunctionNameInCtx];


    // brushed function
    var brushed = function(){
        var endRange = overViewBrushDef.extent()[1];

        svg.select(".drawBrush").attr({
            width:xScale(endRange)
        });

        xDetailScale.domain([0,endRange]);
        xDetailAxisUpper.scale(xDetailScale);<commit_msg>started on #128 .. slider Icon ist not limited yet.<commit_after>/**
 * Created by hen on 3/18/14.
 */

function BrushableScale(ctx, svg, width, updateFunctionNameInCtx, redrawFunctionNameInCtx, scaleNameInCtx, params){



//    var svg = d3.select("#vis").append("svg").attr({
//        width:800,
//        height:800
//    })

    var offsetX=0,
        offsetY=0;

    var distanceBetweenAxis = 25; // distance between two scales
    var distanceBetweenUpperAndLower = 20 // should be fix !!
//        height=20;


    var width = width;

    var xScale = d3.scale.linear().domain([1,width]).range([0, width])
    var xOverViewAxisUpper = d3.svg.axis().scale(xScale);
    var xOverViewAxisLower = d3.svg.axis().scale(xScale).orient("top").tickFormat(function(d){return ""});


    var xDetailScale = d3.scale.linear().domain([0,width]).range([0,width]).clamp(true)
    var xDetailAxisUpper = d3.svg.axis().scale(xDetailScale);
    var xDetailAxisLower = d3.svg.axis().scale(xDetailScale).orient("top").tickFormat(function(d){return ""});

    var param = param

    var maxValue = 100;

    var labels=[
        {name: "largest intersection",id:"I", value:100 },
        {name: "largest group",id:"G", value:200 },
        {name: "largest set",id:"S", value:300 },
        {name: "all items",id:"A", value:400 }
    ]



    var connectionAreaData =[
        [0,-distanceBetweenAxis],
        [100,-distanceBetweenAxis],
        [width,0]
    ]


    // add axis
    svg.append("g").attr({
        "class":"x overviewAxisUpper axis",
        "transform":"translate("+offsetX+","+offsetY+")"
    }).call(xOverViewAxisUpper)


    svg.append("g").attr({
        "class":"x overviewAxisLower axis",
        "transform":"translate("+offsetX+","+(offsetY+distanceBetweenUpperAndLower)+")"
    }).call(xOverViewAxisLower)

    svg.append("g").attr({
        "class":"x detailAxisUpper axis",
        "transform":"translate("+offsetX+","+(offsetY+distanceBetweenAxis+distanceBetweenUpperAndLower)+")"
    }).call(xDetailAxisUpper)

    svg.append("g").attr({
        "class":"x detailAxisLower axis",
        "transform":"translate("+offsetX+","+(offsetY+distanceBetweenAxis+2*distanceBetweenUpperAndLower)+")"
    }).call(xDetailAxisLower)

//    svg.append("path").attr({
//        class:"connectionArea",
//        "transform":"translate("+offsetX+","+offsetY+")"
//    })


    var sliders;
    var overViewBrushDef;
    var overviewBrush;
    var redrawFunction = ctx[redrawFunctionNameInCtx];


    // brushed function
    var brushed = function(){
        var endRange = overViewBrushDef.extent()[1];
        if (endRange<5){
            endRange =5;
            overviewBrush.extend([0,5]);
            
        }


        svg.select(".drawBrush").attr({
            width:xScale(endRange)
        });

        xDetailScale.domain([0,endRange]);
        xDetailAxisUpper.scale(xDetailScale);
{'fraction_non_alphanumeric': 0.1719553270696685, 'fraction_numerical': 0.02003190923595107, 'mean_word_length': 3.148529411764706, 'pattern_counts': {'":': 18, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4355513', 'n_tokens_mistral': 1869, 'n_tokens_neox': 1722, 'n_words': 286}