I\'am using highchart for plotting a graph with angular:
HTML:
Thanks, at last I got the answer:
HTML:
<img id="mock" />
JS:
var svg = document.getElementById('chart').children[0].innerHTML;
//svg = chart.getSVG();
var base_image = new Image();
svg = "data:image/svg+xml," + svg;
base_image.src = svg;
$('#mock').attr('src', svg);
We can save image tag directly in DB also. Ref. Save highchart to binary image.
var canvas = document.createElement("chart");
Replace to:
var canvas = document.getElementById("chart");