src/charts/stacked-area.js
function cleanData(originalData) {
            originalData = originalData.length === 0 ? createFakeData() : originalData;

            return originalData.reduce((acc, d) => {
                d.date = new Date(d[dateLabel]),
                d.value = +d[valueLabel]

                return [...acc, d];
            }, []);
        }
function cleanData(originalData) {
            originalData = originalData.length === 0 ? createFakeData() : originalData;

            return originalData.reduce((acc, d) => {
                d.date = new Date(d[dateLabel]),
                d.value = +d[valueLabel]

                return [...acc, d];
            }, []);
        }
function cleanData ( originalData ) { originalData = originalData . length === 0 ? createFakeData ( ) : originalData ; return originalData . reduce ( ( acc , d ) => { d . date = new Date ( d [ dateLabel ] ) , d . value = + d [ valueLabel ] return [ ... acc , d ] ; } , [ ] ) ; }
Cleaning data casting the values and dates to the proper type while keeping
the rest of properties on the data. It creates fake data is the data is empty.
@param  {areaChartData} originalData   Raw data from the container
@return {areaChartData}                Parsed data with values and dates
@private
Cleaning data casting the values and dates to the proper type while keeping the rest of properties on the data . It creates fake data is the data is empty .