src/charts/sparkline.js
function drawSparklineTitle() {
            if (titleEl) {
                svg.selectAll('.sparkline-text').remove();
            }

            titleEl = svg.selectAll('.text-group')
              .append('text')
                .attr('x', chartWidth / 2)
                .attr('y', chartHeight / 6)
                .attr('text-anchor', 'middle')
                .attr('class', 'sparkline-text')
                .style('font-size', titleTextStyle['font-size'] || DEFAULT_TITLE_TEXT_STYLE['font-size'])
                .style('fill', titleTextStyle['fill'] || lineGradient[0])
                .style('font-family', titleTextStyle['font-family'] || DEFAULT_TITLE_TEXT_STYLE['font-family'])
                .style('font-weight', titleTextStyle['font-weight'] || DEFAULT_TITLE_TEXT_STYLE['font-weight'])
                .style('font-style', titleTextStyle['font-style'] || DEFAULT_TITLE_TEXT_STYLE['font-style'])
                .text(titleText)
        }
function drawSparklineTitle() {
            if (titleEl) {
                svg.selectAll('.sparkline-text').remove();
            }

            titleEl = svg.selectAll('.text-group')
              .append('text')
                .attr('x', chartWidth / 2)
                .attr('y', chartHeight / 6)
                .attr('text-anchor', 'middle')
                .attr('class', 'sparkline-text')
                .style('font-size', titleTextStyle['font-size'] || DEFAULT_TITLE_TEXT_STYLE['font-size'])
                .style('fill', titleTextStyle['fill'] || lineGradient[0])
                .style('font-family', titleTextStyle['font-family'] || DEFAULT_TITLE_TEXT_STYLE['font-family'])
                .style('font-weight', titleTextStyle['font-weight'] || DEFAULT_TITLE_TEXT_STYLE['font-weight'])
                .style('font-style', titleTextStyle['font-style'] || DEFAULT_TITLE_TEXT_STYLE['font-style'])
                .text(titleText)
        }
function drawSparklineTitle ( ) { if ( titleEl ) { svg . selectAll ( '.sparkline-text' ) . remove ( ) ; } titleEl = svg . selectAll ( '.text-group' ) . append ( 'text' ) . attr ( 'x' , chartWidth / 2 ) . attr ( 'y' , chartHeight / 6 ) . attr ( 'text-anchor' , 'middle' ) . attr ( 'class' , 'sparkline-text' ) . style ( 'font-size' , titleTextStyle [ 'font-size' ] || DEFAULT_TITLE_TEXT_STYLE [ 'font-size' ] ) . style ( 'fill' , titleTextStyle [ 'fill' ] || lineGradient [ 0 ] ) . style ( 'font-family' , titleTextStyle [ 'font-family' ] || DEFAULT_TITLE_TEXT_STYLE [ 'font-family' ] ) . style ( 'font-weight' , titleTextStyle [ 'font-weight' ] || DEFAULT_TITLE_TEXT_STYLE [ 'font-weight' ] ) . style ( 'font-style' , titleTextStyle [ 'font-style' ] || DEFAULT_TITLE_TEXT_STYLE [ 'font-style' ] ) . text ( titleText ) }
Draws the text element within the text group
Is displayed at the top of sparked area
@private
Draws the text element within the text group Is displayed at the top of sparked area