Hi,
I’m fairly new to Knime and right now trying out the Generic Javascript view. So far I’ve managed to create a view with help of C3. Now I’m trying to export my view as SVG image but it seems that the CSS style is not included.
The SVG output looks like this:
while the output in the interactive view looks like this:
My code for generating the SVG image:
var serializer = new XMLSerializer();
var svgElement = document.getElementById(‘chart’).getElementsByTagName(‘svg’)[0];
knimeService.inlineSvgStyles(svgElement);
svgElement.querySelectorAll(‘g’).forEach(b=>b.removeAttribute(‘clip-path’));
var graph = serializer.serializeToString(svgElement);
return graph;
Any idea on how the get the CSS style included in the SVG image? I thought that the knimeService.inlineSvgStyles(svgElement) would do the trick, but it doesn’t seem to work? Any input appreciated.
Br,
Ted