src/component/toolbox/feature/DataView.js
function groupSeries(ecModel) {
    var seriesGroupByCategoryAxis = {};
    var otherSeries = [];
    var meta = [];
    ecModel.eachRawSeries(function (seriesModel) {
        var coordSys = seriesModel.coordinateSystem;

        if (coordSys && (coordSys.type === 'cartesian2d' || coordSys.type === 'polar')) {
            var baseAxis = coordSys.getBaseAxis();
            if (baseAxis.type === 'category') {
                var key = baseAxis.dim + '_' + baseAxis.index;
                if (!seriesGroupByCategoryAxis[key]) {
                    seriesGroupByCategoryAxis[key] = {
                        categoryAxis: baseAxis,
                        valueAxis: coordSys.getOtherAxis(baseAxis),
                        series: []
                    };
                    meta.push({
                        axisDim: baseAxis.dim,
                        axisIndex: baseAxis.index
                    });
                }
                seriesGroupByCategoryAxis[key].series.push(seriesModel);
            }
            else {
                otherSeries.push(seriesModel);
            }
        }
        else {
            otherSeries.push(seriesModel);
        }
    });

    return {
        seriesGroupByCategoryAxis: seriesGroupByCategoryAxis,
        other: otherSeries,
        meta: meta
    };
}
function groupSeries(ecModel) {
    var seriesGroupByCategoryAxis = {};
    var otherSeries = [];
    var meta = [];
    ecModel.eachRawSeries(function (seriesModel) {
        var coordSys = seriesModel.coordinateSystem;

        if (coordSys && (coordSys.type === 'cartesian2d' || coordSys.type === 'polar')) {
            var baseAxis = coordSys.getBaseAxis();
            if (baseAxis.type === 'category') {
                var key = baseAxis.dim + '_' + baseAxis.index;
                if (!seriesGroupByCategoryAxis[key]) {
                    seriesGroupByCategoryAxis[key] = {
                        categoryAxis: baseAxis,
                        valueAxis: coordSys.getOtherAxis(baseAxis),
                        series: []
                    };
                    meta.push({
                        axisDim: baseAxis.dim,
                        axisIndex: baseAxis.index
                    });
                }
                seriesGroupByCategoryAxis[key].series.push(seriesModel);
            }
            else {
                otherSeries.push(seriesModel);
            }
        }
        else {
            otherSeries.push(seriesModel);
        }
    });

    return {
        seriesGroupByCategoryAxis: seriesGroupByCategoryAxis,
        other: otherSeries,
        meta: meta
    };
}
function groupSeries ( ecModel ) { var seriesGroupByCategoryAxis = { } ; var otherSeries = [ ] ; var meta = [ ] ; ecModel . eachRawSeries ( function ( seriesModel ) { var coordSys = seriesModel . coordinateSystem ; if ( coordSys && ( coordSys . type === 'cartesian2d' || coordSys . type === 'polar' ) ) { var baseAxis = coordSys . getBaseAxis ( ) ; if ( baseAxis . type === 'category' ) { var key = baseAxis . dim + '_' + baseAxis . index ; if ( ! seriesGroupByCategoryAxis [ key ] ) { seriesGroupByCategoryAxis [ key ] = { categoryAxis : baseAxis , valueAxis : coordSys . getOtherAxis ( baseAxis ) , series : [ ] } ; meta . push ( { axisDim : baseAxis . dim , axisIndex : baseAxis . index } ) ; } seriesGroupByCategoryAxis [ key ] . series . push ( seriesModel ) ; } else { otherSeries . push ( seriesModel ) ; } } else { otherSeries . push ( seriesModel ) ; } } ) ; return { seriesGroupByCategoryAxis : seriesGroupByCategoryAxis , other : otherSeries , meta : meta } ; }
Group series into two types
1. on category axis, like line, bar
2. others, like scatter, pie
@param {module:echarts/model/Global} ecModel
@return {Object}
@inner
Group series into two types 1 . on category axis like line bar 2 . others like scatter pie