In the browser you can use a charting library that renders to <canvas> such as chart.js

Then once you have rendered your chart on the canvas you can obtain the image data as PNG or JPG:

var canvas = document.getElementById('myCanvas');
var dataURL = canvas.toDataURL("image/png");

This will give you a base64 encoded uri of the image that you could use with an html image:

var imgElement = document.getElementById('myImg');
imgElement.src = dataURL;

You can also directly get the image data from the canvas:

var imgData = canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height);

Related Query

More Query from same tag