src/charts/brush.js
function drawArea() {
            if (brushArea) {
                svg.selectAll('.brush-area').remove();
            }

            // Create and configure the area generator
            brushArea = d3Shape.area()
                .x(({date}) => xScale(date))
                .y0(chartHeight)
                .y1(({value}) => yScale(value))
                .curve(d3Shape.curveBasis);

            // Create the area path
            svg.select('.chart-group')
              .append('path')
                .datum(data)
                .attr('class', 'brush-area')
                .attr('d', brushArea);
        }
function drawArea() {
            if (brushArea) {
                svg.selectAll('.brush-area').remove();
            }

            // Create and configure the area generator
            brushArea = d3Shape.area()
                .x(({date}) => xScale(date))
                .y0(chartHeight)
                .y1(({value}) => yScale(value))
                .curve(d3Shape.curveBasis);

            // Create the area path
            svg.select('.chart-group')
              .append('path')
                .datum(data)
                .attr('class', 'brush-area')
                .attr('d', brushArea);
        }
function drawArea ( ) { if ( brushArea ) { svg . selectAll ( '.brush-area' ) . remove ( ) ; } // Create and configure the area generator brushArea = d3Shape . area ( ) . x ( ( { date } ) => xScale ( date ) ) . y0 ( chartHeight ) . y1 ( ( { value } ) => yScale ( value ) ) . curve ( d3Shape . curveBasis ) ; // Create the area path svg . select ( '.chart-group' ) . append ( 'path' ) . datum ( data ) . attr ( 'class' , 'brush-area' ) . attr ( 'd' , brushArea ) ; }
Draws the area that is going to represent the data

@return {void}
Draws the area that is going to represent the data