src/operator/data-builder.js
function createSortingFnArg(groupedDatum, targetFields, targetFieldDetails) {
    const arg = {
        label: groupedDatum[0]
    };

    targetFields.reduce((acc, next, idx) => {
        acc[next] = groupedDatum[1].map(datum => datum[targetFieldDetails[idx].index]);
        return acc;
    }, arg);

    return arg;
}
function createSortingFnArg(groupedDatum, targetFields, targetFieldDetails) {
    const arg = {
        label: groupedDatum[0]
    };

    targetFields.reduce((acc, next, idx) => {
        acc[next] = groupedDatum[1].map(datum => datum[targetFieldDetails[idx].index]);
        return acc;
    }, arg);

    return arg;
}
function createSortingFnArg ( groupedDatum , targetFields , targetFieldDetails ) { const arg = { label : groupedDatum [ 0 ] } ; targetFields . reduce ( ( acc , next , idx ) => { acc [ next ] = groupedDatum [ 1 ] . map ( datum => datum [ targetFieldDetails [ idx ] . index ] ) ; return acc ; } , arg ) ; return arg ; }
Creates the argument value used for sorting function when sort is done
with another fields.

@param {Array} groupedDatum - The grouped datum for a single dimension field value.
@param {Array} targetFields - An array of the sorting fields.
@param {Array} targetFieldDetails - An array of the sorting field details in schema.
@return {Object} Returns an object containing the value of sorting fields and the target field name.
Creates the argument value used for sorting function when sort is done with another fields .