src/charts/stacked-area.js
/**
         * Draws the different areas into the chart-group element
         * @private
         */
Draws the different areas into the chart-group element
@private
Draws the different areas into the chart - group element @private
function drawStackedAreas(){
            area = d3Shape.area()
                .curve(d3Shape.curveMonotoneX)
                .x( ({data}) => xScale(data.date) )
                .y0( (d) => yScale(d[0]) )
                .y1( (d) => yScale(d[1]) );
            let series = svg.select('.chart-group').selectAll('.layer')
                .data(layersInitial)
                .enter()
              .append('g')
                .classed('layer-container', true);
            series
              .append('path')
                .attr('class', 'layer')
                .attr('d', area)
                .style('fill', ({key}) => categoryColorMap[key]);
            svg.select('.chart-group').selectAll('.layer')
                .data(layers)
                .transition()
                .delay( (_, i) => areaAnimationDelays[i])
                .duration(areaAnimationDuration)
                .ease(ease)
                .attr('d', area)
                .style('opacity', areaOpacity)
                .style('fill', ({key}) => categoryColorMap[key]);
            series.exit()
                .transition()
                .style('opacity', 0)
                .remove();
        }
function drawStackedAreas ( ) { area = d3Shape . area ( ) . curve ( d3Shape . curveMonotoneX ) . x ( ( { data } ) => xScale ( data . date ) ) . y0 ( ( d ) => yScale ( d [ 0 ] ) ) . y1 ( ( d ) => yScale ( d [ 1 ] ) ) ; let series = svg . select ( '.chart-group' ) . selectAll ( '.layer' ) . data ( layersInitial ) . enter ( ) . append ( 'g' ) . classed ( 'layer-container' , true ) ; series . append ( 'path' ) . attr ( 'class' , 'layer' ) . attr ( 'd' , area ) . style ( 'fill' , ( { key } ) => categoryColorMap [ key ] ) ; svg . select ( '.chart-group' ) . selectAll ( '.layer' ) . data ( layers ) . transition ( ) . delay ( ( _ , i ) => areaAnimationDelays [ i ] ) . duration ( areaAnimationDuration ) . ease ( ease ) . attr ( 'd' , area ) . style ( 'opacity' , areaOpacity ) . style ( 'fill' , ( { key } ) => categoryColorMap [ key ] ) ; series . exit ( ) . transition ( ) . style ( 'opacity' , 0 ) . remove ( ) ; }
Draws the different areas into the chart-group element
 @private
Draws the different areas into the chart - group element @private
// Creating Area function // Update // Exit