src/charts/tooltip.js
function _sortByAlpha(topics) {
            return topics
                .map(d => d)
                .sort((a, b) => {
                    if (a.name > b.name) return 1;
                    if (a.name === b.name) return 0;

                    return -1;
                });

            let otherIndex = topics.map(({ name }) => name).indexOf('Other');

            if (otherIndex >= 0) {
                let other = topics.splice(otherIndex, 1);

                topics = topics.concat(other);
            }
        }
function _sortByAlpha(topics) {
            return topics
                .map(d => d)
                .sort((a, b) => {
                    if (a.name > b.name) return 1;
                    if (a.name === b.name) return 0;

                    return -1;
                });

            let otherIndex = topics.map(({ name }) => name).indexOf('Other');

            if (otherIndex >= 0) {
                let other = topics.splice(otherIndex, 1);

                topics = topics.concat(other);
            }
        }
function _sortByAlpha ( topics ) { return topics . map ( d => d ) . sort ( ( a , b ) => { if ( a . name > b . name ) return 1 ; if ( a . name === b . name ) return 0 ; return - 1 ; } ) ; let otherIndex = topics . map ( ( { name } ) => name ) . indexOf ( 'Other' ) ; if ( otherIndex >= 0 ) { let other = topics . splice ( otherIndex , 1 ) ; topics = topics . concat ( other ) ; } }
Sorts topic by alphabetical order for arrays of objects with a name proeprty
@param  {Array} topics   List of topic objects
@return {Array}          List of topic name strings
@private
Sorts topic by alphabetical order for arrays of objects with a name proeprty