src/charts/helpers/export.js
function prependTitle(html, title, svgWidth) {
        if (!title || !svgWidth) {
            return html;
        }
        let {grey} = colorSchemas;

        html =  html.replace(/<g/,`<text x="${this.margin().left}" y="${config.titleTopOffset}" font-family="${config.titleFontFamily}" font-size="${config.titleFontSize}" fill="${grey[6]}"> ${title} </text><g `);

        return html;
    }
function prependTitle(html, title, svgWidth) {
        if (!title || !svgWidth) {
            return html;
        }
        let {grey} = colorSchemas;

        html =  html.replace(/<g/,`<text x="${this.margin().left}" y="${config.titleTopOffset}" font-family="${config.titleFontFamily}" font-size="${config.titleFontSize}" fill="${grey[6]}"> ${title} </text><g `);

        return html;
    }
function prependTitle ( html , title , svgWidth ) { if ( ! title || ! svgWidth ) { return html ; } let { grey } = colorSchemas ; html = html . replace ( / <g / , ` ${ this . margin ( ) . left } ${ config . titleTopOffset } ${ config . titleFontFamily } ${ config . titleFontSize } ${ grey [ 6 ] } ${ title } ` ) ; return html ; }
if passed, append title to the raw html to appear on graph
@param  {string} html     raw html string
@param  {string} title    title of the graph
@param  {number} svgWidth width of graph container
@return {string}         raw html with title prepended
if passed append title to the raw html to appear on graph