code: function drawLine(){
              if (topLine) {
                  svg.selectAll('.line').remove();
              }
  
              topLine = d3Shape.line()
                  .curve(d3Shape.curveBasis)
                  .x(({date}) => xScale(date))
                  .y(({value}) => yScale(value));
  
              svg.select('.chart-group')
                .append('path')
                  .datum(data)
                  .attr('class', 'line')
                  .attr('stroke', `url(#${lineGradientId})`)
                  .attr('d', topLine)
                  .attr('clip-path', `url(#${maskingClipId})`);
          }
docs: Draws the line element within the chart group
  @private