<commit_before>define(['charts/ChartBase'], function (cb) {
    var o = {
        type: "highcharts",
        callback: function (d) {

            //this.config.storedCats = [];
            this.config.c = null;
            this.config.p = null;
            var data = d.data;
            this.config.xAxis.title = {
                text: data.Cols[1].caption
            };
            this.config.yAxis.title = {
                text: data.Cols[0].caption
            };
            this.config.xAxis.categories = [];
            this.config.series = [];

            for (var i = 0; i < data.Cols[1].tuples.length; i++) {
                this.config.xAxis.categories.push(data.Cols[1].tuples[i].caption.toString());
                data.Data[i] = {
                    y: data.Data[i],
                    drilldown: true,
                    cube: data.Info.cubeName,
                    path: data.Cols[1].tuples[i].path
                };
            };
            require("charts/ChartBase").fixData(data.Data);
            this.config.series = [{
                colorByPoint: true,
                data: data.Data,
                name: data.Cols[0].tuples[0].caption,
                format: data.Cols[0].tuples[0].format
            }];
            /*var data = d.data;

            this.config.xAxis.title = {
                text: data.Cols[1].caption
            };
            this.config.yAxis.title = {
                text: data.defaultCaption || data.Cols[0].caption
            };
            var _pos = 0;
            this.config.xAxis.categories = [];
            this.config.series = [];
            for (var i = 0; i < data.Cols[1].tuples.length; i++) {
                this.config.xAxis.categories.push(data.Cols[1].tuples[i].caption.toString());
            }

            for(var j = 0; j< data.Cols[0].tuples.length; j++){
                var tempData = [];
                for(var i = 0; i< data.Cols[1].tuples.length; i++){
                    tempData[i] = {
                        y: data.Data[i* data.Cols[0].tuples.length + j],
                        drilldown: true,
                        cube: data.Info.cubeName,
                        path: data.Cols[1].tuples[i].path
                    };

                };
                require("charts/ChartBase").fixData(tempData);
                this.config.series.push({
                    colorByPoint:  (data.Cols[0].tuples.length>1) ? false : true,
                    data: tempData,
                    name: data.Cols[0].tuples[j].caption,
                    format: data.Cols[0].tuples[j].format
                });
            }*/

        },
        config: {

            requestDrilldown: function(point) {

                var mc = require("MessageCenter");
                this.p = point;
                this.c = point.series.chart;

                mc.subscribe("data_acquired:drilldown", {
                    subscriber: this,
                    once: true,
                    callback: function (d) {
                        if (!d.data.Data) return;
                        if (d.data.Data.length == 0) return;
                        var hasValue = false;
                        for (var i = 0; i < d.data.Data.length; i++) if (d.data.Data[i]) {
                            hasValue = true;
                            break;
                        }
                        if (!hasValue) return;

                        var data = d.data;
                        if (!self.c.widget.__storedCats) self.c.widget.__storedCats = [];
                        self.c.widget.__storedCats.push(this.c.xAxis[0].categories);
                        //this.storedCats.push(this.c.xAxis[0].categories);
                        this.c.xAxis[0].categories = [];

                        for (var i = 0; i < data.Cols[1].tuples.length; i++) {
                            this.c.xAxis[0].categories.push(data.Cols[1].tuples[i].caption.toString());
                            data.Data[i] = {
                                y: data.Data[i],
                                drilldown: true,
                                cube: data.Info.cubeName,
                                path: data.Cols[1].tuples[i].path
                            };
                        };
                        require("charts/ChartBase").fixData(data.Data);
                        self.c.widget.drillLevel++;
                        self.c.widget.drills.push(self.p.path);
                        this.c.addSeriesAsDrilldown(this.p,{
                            colorByPoint: true,
                            data: data.Data,
                            name: data.Cols[0].tuples[0].caption,
                            format: data.Cols[0].tuples[0].format
                        });
                    }
                });<commit_msg>fixes<commit_after>define(['charts/ChartBase'], function (cb) {
    var o = {
        type: "highcharts",
        callback: function (d) {

            //this.config.storedCats = [];
            this.config.c = null;
            this.config.p = null;
            var data = d.data;
            this.config.xAxis.title = {
                text: data.Cols[1].caption
            };
            this.config.yAxis.title = {
                text: data.Cols[0].caption
            };
            this.config.xAxis.categories = [];
            this.config.series = [];

            cb.multivalueDataConvertor(this.config, d);

            /*for (var i = 0; i < data.Cols[1].tuples.length; i++) {
                this.config.xAxis.categories.push(data.Cols[1].tuples[i].caption.toString());
                data.Data[i] = {
                    y: data.Data[i],
                    drilldown: true,
                    cube: data.Info.cubeName,
                    path: data.Cols[1].tuples[i].path
                };
            };
            require("charts/ChartBase").fixData(data.Data);
            var name = "Count";
            var format = "";
            if (data.Cols[0].tuples[0]) {
                name = data.Cols[0].tuples[0].caption;
                format = data.Cols[0].tuples[0].format;
            }
            this.config.series = [{
                colorByPoint: true,
                data: data.Data,
                name: name,
                format: format
            }];*/
            /*var data = d.data;

            this.config.xAxis.title = {
                text: data.Cols[1].caption
            };
            this.config.yAxis.title = {
                text: data.defaultCaption || data.Cols[0].caption
            };
            var _pos = 0;
            this.config.xAxis.categories = [];
            this.config.series = [];
            for (var i = 0; i < data.Cols[1].tuples.length; i++) {
                this.config.xAxis.categories.push(data.Cols[1].tuples[i].caption.toString());
            }

            for(var j = 0; j< data.Cols[0].tuples.length; j++){
                var tempData = [];
                for(var i = 0; i< data.Cols[1].tuples.length; i++){
                    tempData[i] = {
                        y: data.Data[i* data.Cols[0].tuples.length + j],
                        drilldown: true,
                        cube: data.Info.cubeName,
                        path: data.Cols[1].tuples[i].path
                    };

                };
                require("charts/ChartBase").fixData(tempData);
                this.config.series.push({
                    colorByPoint:  (data.Cols[0].tuples.length>1) ? false : true,
                    data: tempData,
                    name: data.Cols[0].tuples[j].caption,
                    format: data.Cols[0].tuples[j].format
                });
            }*/

        },
        config: {

            requestDrilldown: function(point) {

                var mc = require("MessageCenter");
                this.p = point;
                this.c = point.series.chart;

                mc.subscribe("data_acquired:drilldown", {
                    subscriber: this,
                    once: true,
                    callback: function (d) {
                        if (!d.data.Data) return;
                        if (d.data.Data.length == 0) return;
                        var hasValue = false;
                        for (var i = 0; i < d.data.Data.length; i++) if (d.data.Data[i]) {
                            hasValue = true;
                            break;
                        }
                        if (!hasValue) return;

                        var data = d.data;
                        if (!self.c.widget.__storedCats) self.c.widget.__storedCats = [];
                        self.c.widget.__storedCats.push(this.c.xAxis[0].categories);
                        //this.storedCats.push(this.c.xAxis[0].categories);
                        this.c.xAxis[0].categories = [];

                        for (var i = 0; i < data.Cols[1].tuples.length; i++) {
                            this.c.xAxis[0].categories.push(data.Cols[1].tuples[i].caption.toString());
                            data.Data[i] = {
                                y: data.Data[i],
                                drilldown: true,
                                cube: data.Info.cubeName,
                                path: data.Cols[1].tuples[i].path
                            };
                        };
                        require("charts/ChartBase").fixData(data.Data);
                        self.c.widget.drillLevel++;
                        self.c.widget.drills.push(self.p.path);

                        var name = "Count";
                        var format = "";
                        if (data.Cols[0].tuples[0]) {
                            name = data.Cols[0].tuples[0].caption;
                            format = data.Cols[0].tuples[0].format;
                        }
                        this.c.addSeriesAsDrilldown(this.p,{
                            colorByPoint: true,
                            data: data.Data,
                            name: name,
                            format: format
                        });
                    }
                });
{'fraction_non_alphanumeric': 0.12812931204415534, 'fraction_numerical': 0.00827912477823773, 'mean_word_length': 0.9806753855162991, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7627989', 'n_tokens_mistral': 2891, 'n_tokens_neox': 2702, 'n_words': 412}