I am using jsPDF to generate PDF documents through Appcelerator\'s Titanium. Now i need to add a simple pie chart with two segments. How could i do that in simplest way?
Maybe you can check the jsPDF site first, you can generate you image with a library (perhaps google chart), save the chart as image and then add to the PDF, using the plugin jspdf.plugin.addimage.js
and some code.
This is an example taken from their web site
var imgData = 'here the jpeg image string on base64';
var doc = new jsPDF();
doc.setFontSize(40);
doc.text(35, 25, "Octonyan loves jsPDF");
doc.addImage(imgData, 'JPEG', 15, 40, 180, 180);