TargetProcess/tauCharts

Any method renders SVG to black figure

Closed this issue · 2 comments

I've tried different methods converting obtained SVG to png, including this one:

https://blog.taucharts.com/svg-to-png/

But every time I do this, I get this
image

Is there something special I'm doing right?

Taucharts use Canvg for converting chart into PNG. You have to pass CSS paths into Export plugin:

const chart = new tauCharts.Chart({
    ...
    plugins: [
        tauCharts.api.plugins.get('exportTo')({
            cssPaths: [
                'node_modules/taucharts/build/production/tauCharts.min.css'
            ]
        })
    ]
    ...
});

Thanks, that what i was missing - CSS link..