<commit_before>PykCharts.multiD.river = function (options){
    var that = this;
    var theme = new PykCharts.Configuration.Theme({});

    this.execute = function (){
        that = new PykCharts.multiD.processInputs(that, options, "area");
        var multiDimensionalCharts = theme.multiDimensionalCharts,
            stylesheet = theme.stylesheet,
            optional = options.optional;
        that.data_mode_enable = options.data_mode_enable ? options.data_mode_enable.toLowerCase() : multiDimensionalCharts.data_mode_enable;
        if(PykCharts.boolean(that.data_mode_enable) && that.mode === "default") {
            that.chart_mode = options.data_mode_default ? options.data_mode_default.toLowerCase() : multiDimensionalCharts.data_mode_default;
            that.data_mode_legends_color = options.data_mode_legends_color ? options.data_mode_legends_color : multiDimensionalCharts.data_mode_legends_color;
        } else {
            that.data_mode_enable = "no";
            that.chart_mode = "absolute";
        }
        that.connecting_lines_color = options.connecting_lines_color ? options.connecting_lines_color : multiDimensionalCharts.connecting_lines_color;
        that.connecting_lines_style = options.connecting_lines_style ? options.connecting_lines_style : multiDimensionalCharts.connecting_lines_style;
        switch(that.connecting_lines_style) {
            case "dotted" : that.connecting_lines_style = "1,3";
                            break;
            case "dashed" : that.connecting_lines_style = "5,5";
                           break;
            default : that.connecting_lines_style = "0";
                      break;
        }
        that.legends_mode = options.legends_mode ? options.legends_mode : multiDimensionalCharts.legends_mode;
        that.expand_group = options.expand_group ? options.expand_group : multiDimensionalCharts.expand_group;
        that.time_between_steps_text_color = options.time_between_steps_text_color ? options.time_between_steps_text_color : multiDimensionalCharts.time_between_steps_text_color;
        that.time_between_steps_text_weight = options.time_between_steps_text_weight ? options.time_between_steps_text_weight.toLowerCase() : multiDimensionalCharts.time_between_steps_text_weight;
        that.time_between_steps_text_family = options.time_between_steps_text_family ? options.time_between_steps_text_family.toLowerCase() : multiDimensionalCharts.time_between_steps_text_family;
        that.time_between_steps_text_size = "time_between_steps_text_size" in options ? options.time_between_steps_text_size : multiDimensionalCharts.time_between_steps_text_size;
        that.k.validator()
            .validatingDataType(that.time_between_steps_text_size,"time_between_steps_text_size",multiDimensionalCharts.time_between_steps_text_size,"time_between_steps_text_size")
            .validatingFontWeight(that.time_between_steps_text_weight,"time_between_steps_text_weight",multiDimensionalCharts.time_between_steps_text_weight,"time_between_steps_text_weight")           
            .validatingColor(that.time_between_steps_text_color,"time_between_steps_text_color",multiDimensionalCharts.time_between_steps_text_color,"time_between_steps_text_color")
            .validatingColor(that.connecting_lines_color,"connecting_lines_color",multiDimensionalCharts.connecting_lines_color,"connecting_lines_color")
            .validatingColor(that.data_mode_legends_color,"data_mode_legends_color",multiDimensionalCharts.data_mode_legends_color,"data_mode_legends_color")
            .validatingDataMode(that.chart_mode,"data_mode_default",multiDimensionalCharts.data_mode_default,"chart_mode")
            .validatingLegendsMode(that.legends_mode,"legends_mode",multiDimensionalCharts.legends_mode,"legends_mode");
        
        if(that.stop)
            return;

        if(that.mode === "default") {
            that.k.loading();
        }

        that.w = that.width - that.margin_left - that.margin_right;
        that.h = that.height - that.margin_top - that.margin_bottom;
        that.multiD = new PykCharts.multiD.configuration(that);
        that.filterList = [];
        that.fullList = [];
        that.extended = that.chart_mode === "percentage" ? false : true;
        
        that.executeData = function (data) {

            var validate = that.k.validator().validatingJSON(data);
            if(that.stop || validate === false) {
                $(that.selector+" #chart-loader").remove();
                $(options.selector).css("height","auto")
                return;
            }

            that.data = data;
            that.data.forEach(function (d) {
                d.group = d.stack;
            })
            that.axis_y_data_format = "number";
            that.axis_x_data_format = "number"
            that.compare_data = that.data;
            that.data_length = that.data.length;
            $(that.selector+" #chart-loader").remove();
            $(options.selector).css("height","auto")
            that.map_group_data = that.multiD.mapGroup(that.data);
            that.dataTransformation();
            that.render();
        };
        that.k.dataSourceFormatIdentification(options.data,that,"executeData");
    };
    this.render = function () {
        that.multid = new PykCharts.multiD.configuration(that);
        that.fillColor = new PykCharts.Configuration.fillChart(that,null,options);
        that.transitions = new PykCharts.Configuration.transition(that);<commit_msg>#331 the condition for absolute and percentage was inverted so changed that<commit_after>PykCharts.multiD.river = function (options){
    var that = this;
    var theme = new PykCharts.Configuration.Theme({});

    this.execute = function (){
        that = new PykCharts.multiD.processInputs(that, options, "area");
        var multiDimensionalCharts = theme.multiDimensionalCharts,
            stylesheet = theme.stylesheet,
            optional = options.optional;
        that.data_mode_enable = options.data_mode_enable ? options.data_mode_enable.toLowerCase() : multiDimensionalCharts.data_mode_enable;
        if(PykCharts.boolean(that.data_mode_enable) && that.mode === "default") {
            that.chart_mode = options.data_mode_default ? options.data_mode_default.toLowerCase() : multiDimensionalCharts.data_mode_default;
            that.data_mode_legends_color = options.data_mode_legends_color ? options.data_mode_legends_color : multiDimensionalCharts.data_mode_legends_color;
        } else {
            that.data_mode_enable = "no";
            that.chart_mode = "absolute";
        }
        that.connecting_lines_color = options.connecting_lines_color ? options.connecting_lines_color : multiDimensionalCharts.connecting_lines_color;
        that.connecting_lines_style = options.connecting_lines_style ? options.connecting_lines_style : multiDimensionalCharts.connecting_lines_style;
        switch(that.connecting_lines_style) {
            case "dotted" : that.connecting_lines_style = "1,3";
                            break;
            case "dashed" : that.connecting_lines_style = "5,5";
                           break;
            default : that.connecting_lines_style = "0";
                      break;
        }
        that.legends_mode = options.legends_mode ? options.legends_mode : multiDimensionalCharts.legends_mode;
        that.expand_group = options.expand_group ? options.expand_group : multiDimensionalCharts.expand_group;
        that.time_between_steps_text_color = options.time_between_steps_text_color ? options.time_between_steps_text_color : multiDimensionalCharts.time_between_steps_text_color;
        that.time_between_steps_text_weight = options.time_between_steps_text_weight ? options.time_between_steps_text_weight.toLowerCase() : multiDimensionalCharts.time_between_steps_text_weight;
        that.time_between_steps_text_family = options.time_between_steps_text_family ? options.time_between_steps_text_family.toLowerCase() : multiDimensionalCharts.time_between_steps_text_family;
        that.time_between_steps_text_size = "time_between_steps_text_size" in options ? options.time_between_steps_text_size : multiDimensionalCharts.time_between_steps_text_size;
        that.k.validator()
            .validatingDataType(that.time_between_steps_text_size,"time_between_steps_text_size",multiDimensionalCharts.time_between_steps_text_size,"time_between_steps_text_size")
            .validatingFontWeight(that.time_between_steps_text_weight,"time_between_steps_text_weight",multiDimensionalCharts.time_between_steps_text_weight,"time_between_steps_text_weight")           
            .validatingColor(that.time_between_steps_text_color,"time_between_steps_text_color",multiDimensionalCharts.time_between_steps_text_color,"time_between_steps_text_color")
            .validatingColor(that.connecting_lines_color,"connecting_lines_color",multiDimensionalCharts.connecting_lines_color,"connecting_lines_color")
            .validatingColor(that.data_mode_legends_color,"data_mode_legends_color",multiDimensionalCharts.data_mode_legends_color,"data_mode_legends_color")
            .validatingDataMode(that.chart_mode,"data_mode_default",multiDimensionalCharts.data_mode_default,"chart_mode")
            .validatingLegendsMode(that.legends_mode,"legends_mode",multiDimensionalCharts.legends_mode,"legends_mode");
        
        if(that.stop)
            return;

        if(that.mode === "default") {
            that.k.loading();
        }

        that.w = that.width - that.margin_left - that.margin_right;
        that.h = that.height - that.margin_top - that.margin_bottom;
        that.multiD = new PykCharts.multiD.configuration(that);
        that.filterList = [];
        that.fullList = [];
        that.extended = that.chart_mode === "absolute" ? false : true;
        
        that.executeData = function (data) {

            var validate = that.k.validator().validatingJSON(data);
            if(that.stop || validate === false) {
                $(that.selector+" #chart-loader").remove();
                $(options.selector).css("height","auto")
                return;
            }

            that.data = data;
            that.data.forEach(function (d) {
                d.group = d.stack;
            })
            that.axis_y_data_format = "number";
            that.axis_x_data_format = "number"
            that.compare_data = that.data;
            that.data_length = that.data.length;
            $(that.selector+" #chart-loader").remove();
            $(options.selector).css("height","auto")
            that.map_group_data = that.multiD.mapGroup(that.data);
            that.dataTransformation();
            that.render();
        };
        that.k.dataSourceFormatIdentification(options.data,that,"executeData");
    };
    this.render = function () {
        that.multid = new PykCharts.multiD.configuration(that);
        that.fillColor = new PykCharts.Configuration.fillChart(that,null,options);
        that.transitions = new PykCharts.Configuration.transition(that);
{'fraction_non_alphanumeric': 0.09445046999276935, 'fraction_numerical': 0.0011749819233550253, 'mean_word_length': 3.322265625, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3708032', 'n_tokens_mistral': 3185, 'n_tokens_neox': 3177, 'n_words': 350}