src/charts/grouped-bar.js
function cleanData(originalData) {
            return originalData.reduce((acc, d) => {
                    d.value = +d[valueLabel];
                    d.group = d[groupLabel];
                    // for tooltip
                    d.topicName = getGroup(d);
                    d.name = d[nameLabel];

                    return [...acc, d];
                }, []);
        }
function cleanData(originalData) {
            return originalData.reduce((acc, d) => {
                    d.value = +d[valueLabel];
                    d.group = d[groupLabel];
                    // for tooltip
                    d.topicName = getGroup(d);
                    d.name = d[nameLabel];

                    return [...acc, d];
                }, []);
        }
function cleanData ( originalData ) { return originalData . reduce ( ( acc , d ) => { d . value = + d [ valueLabel ] ; d . group = d [ groupLabel ] ; // for tooltip d . topicName = getGroup ( d ) ; d . name = d [ nameLabel ] ; return [ ... acc , d ] ; } , [ ] ) ; }
Cleaning data casting the values, groups, topic names and names to the proper type while keeping
the rest of properties on the data
@param  {GroupedBarChartData} originalData   Raw data from the container
@return {GroupedBarChartData}                Parsed data with values and dates
@private
Cleaning data casting the values groups topic names and names to the proper type while keeping the rest of properties on the data