src/charts/sparkline.js
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})`);
        }
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})`);
        }
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' , ` ${ lineGradientId } ` ) . attr ( 'd' , topLine ) . attr ( 'clip-path' , ` ${ maskingClipId } ` ) ; }
Draws the line element within the chart group
@private
Draws the line element within the chart group