src/charts/stacked-area.js
/**
         * Creates coloured circles marking where the exact data y value is for a given data point
         * @param  {obj} dataPoint Data point to extract info from
         * @private
         */
Creates coloured circles marking where the exact data y value is for a given data point
@param  {obj} dataPoint Data point to extract info from
@private
Creates coloured circles marking where the exact data y value is for a given data point @param { obj } dataPoint Data point to extract info from @private
function highlightDataPoints({values}) {
            let accumulator = 0;
            eraseDataPointHighlights();
            values = values
                        .filter(v => !!v)
                        .sort((a, b) => colorOrder[a.el] > colorOrder[b.el]);
            values.forEach(({name}, index) => {
                let marker = verticalMarkerContainer
                                .append('g')
                                .classed('circle-container', true),
                    circleSize = 12;
                accumulator = accumulator + values[index][valueLabel];
                marker.append('circle')
                    .classed('data-point-highlighter', true)
                    .attr('cx', circleSize)
                    .attr('cy', 0)
                    .attr('r', 5)
                    .style('stroke-width', 2)
                    .style('stroke', categoryColorMap[name]);
                marker.attr('transform', `translate( ${(- circleSize)}, ${(yScale(accumulator))} )` );
            });
        }
function highlightDataPoints ( { values } ) { let accumulator = 0 ; eraseDataPointHighlights ( ) ; values = values . filter ( v => ! ! v ) . sort ( ( a , b ) => colorOrder [ a . el ] > colorOrder [ b . el ] ) ; values . forEach ( ( { name } , index ) => { let marker = verticalMarkerContainer . append ( 'g' ) . classed ( 'circle-container' , true ) , circleSize = 12 ; accumulator = accumulator + values [ index ] [ valueLabel ] ; marker . append ( 'circle' ) . classed ( 'data-point-highlighter' , true ) . attr ( 'cx' , circleSize ) . attr ( 'cy' , 0 ) . attr ( 'r' , 5 ) . style ( 'stroke-width' , 2 ) . style ( 'stroke' , categoryColorMap [ name ] ) ; marker . attr ( 'transform' , ` ${ ( - circleSize ) } ${ ( yScale ( accumulator ) ) } ` ) ; } ) ; }
Creates coloured circles marking where the exact data y value is for a given data point
 @param  {obj} dataPoint Data point to extract info from
 @private
Creates coloured circles marking where the exact data y value is for a given data point @param { obj } dataPoint Data point to extract info from @private
// sorting the values based on the order of the colors, // so that the order always stays constant