<commit_before>/**
 * @author <NAME>.
 *         FE Development Lab <<EMAIL>>
 */

'use strict';

var predicate = require('../../helpers/predicate');
var areaTypeEventDetectorFactory = require('./areaTypeEventDetector');
var simpleEventDetectorFactory = require('./simpleEventDetector');
var groupTypeEventDetectorFactory = require('./groupTypeEventDetector');
var boundsTypeEventDetectorFactory = require('./boundsTypeEventDetector');

function mouseEventDetectorFactory(params) {
    var chartType = params.chartOptions.chartType;
    var chartTypes = params.chartOptions.chartTypes;
    var zoomable = params.chartOptions.series.zoomable;
    var seriesAllowSelect = params.chartOptions.series.allowSelect;
    var factory;

    if (predicate.isBarTypeChart(chartType)) {
        factory = boundsTypeEventDetectorFactory;
    } else if (predicate.isCoordinateTypeChart(chartType)
         || predicate.isPieChart(chartType)) {
        factory = simpleEventDetectorFactory;
    } else if (params.chartOptions.tooltip.grouped) {
        factory = groupTypeEventDetectorFactory;
    } else {
        factory = areaTypeEventDetectorFactory;
    }

    params.chartType = chartType;
    params.chartTypes = chartTypes;
    params.zoomable = zoomable;
    params.allowSelect = seriesAllowSelect;

    return factory(params);
}

mouseEventDetectorFactory.componentType = 'mouseEventDetector';

module.exports = mouseEventDetectorFactory;<commit_msg>change mouseEventDetector type prioty<commit_after>/**
 * @author <NAME>.
 *         FE Development Lab <<EMAIL>>
 */

'use strict';

var predicate = require('../../helpers/predicate');
var areaTypeEventDetectorFactory = require('./areaTypeEventDetector');
var simpleEventDetectorFactory = require('./simpleEventDetector');
var groupTypeEventDetectorFactory = require('./groupTypeEventDetector');
var boundsTypeEventDetectorFactory = require('./boundsTypeEventDetector');

function mouseEventDetectorFactory(params) {
    var chartType = params.chartOptions.chartType;
    var chartTypes = params.chartOptions.chartTypes;
    var zoomable = params.chartOptions.series.zoomable;
    var seriesAllowSelect = params.chartOptions.series.allowSelect;
    var factory;

    if (params.chartOptions.tooltip.grouped) {
        factory = groupTypeEventDetectorFactory;
    } else if (predicate.isBarTypeChart(chartType)) {
        factory = boundsTypeEventDetectorFactory;
    } else if (predicate.isCoordinateTypeChart(chartType)
         || predicate.isPieChart(chartType)) {
        factory = simpleEventDetectorFactory;
    } else {
        factory = areaTypeEventDetectorFactory;
    }

    params.chartType = chartType;
    params.chartTypes = chartTypes;
    params.zoomable = zoomable;
    params.allowSelect = seriesAllowSelect;

    return factory(params);
}

mouseEventDetectorFactory.componentType = 'mouseEventDetector';

module.exports = mouseEventDetectorFactory;
{'fraction_non_alphanumeric': 0.10157858613589568, 'fraction_numerical': 0.0, 'mean_word_length': 4.4793233082706765, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2012359', 'n_tokens_mistral': 791, 'n_tokens_neox': 781, 'n_words': 146}