src/charts/step.js
/**
         * Draws grid lines on the background of the chart
         * @return void
         */
Draws grid lines on the background of the chart
@return void
Draws grid lines on the background of the chart @return void
function drawGridLines(){
            maskGridLines = svg.select('.grid-lines-group')
                .selectAll('line.horizontal-grid-line')
                .data(yScale.ticks(numOfVerticalTicks))
                .enter()
                  .append('line')
                    .attr('class', 'horizontal-grid-line')
                    .attr('x1', (xAxisPadding.left))
                    .attr('x2', chartWidth)
                    .attr('y1', (d) => yScale(d))
                    .attr('y2', (d) => yScale(d));
            baseLine = svg.select('.grid-lines-group')
                .selectAll('line.extended-x-line')
                .data([0])
                .enter()
                  .append('line')
                    .attr('class', 'extended-x-line')
                    .attr('x1', (xAxisPadding.left))
                    .attr('x2', chartWidth)
                    .attr('y1', height - margin.bottom - margin.top)
                    .attr('y2', height - margin.bottom - margin.top);
        }
function drawGridLines ( ) { maskGridLines = svg . select ( '.grid-lines-group' ) . selectAll ( 'line.horizontal-grid-line' ) . data ( yScale . ticks ( numOfVerticalTicks ) ) . enter ( ) . append ( 'line' ) . attr ( 'class' , 'horizontal-grid-line' ) . attr ( 'x1' , ( xAxisPadding . left ) ) . attr ( 'x2' , chartWidth ) . attr ( 'y1' , ( d ) => yScale ( d ) ) . attr ( 'y2' , ( d ) => yScale ( d ) ) ; baseLine = svg . select ( '.grid-lines-group' ) . selectAll ( 'line.extended-x-line' ) . data ( [ 0 ] ) . enter ( ) . append ( 'line' ) . attr ( 'class' , 'extended-x-line' ) . attr ( 'x1' , ( xAxisPadding . left ) ) . attr ( 'x2' , chartWidth ) . attr ( 'y1' , height - margin . bottom - margin . top ) . attr ( 'y2' , height - margin . bottom - margin . top ) ; }
Draws grid lines on the background of the chart
 @return void
Draws grid lines on the background of the chart @return void
//draw a horizontal line to extend x-axis till the edges