Any pointers/alternatives are welcome.
Google charts works fine but the GET method is limited to +/- 2000 chars in the url. (so you can only send a limited amount of data into a chart)
The Google chart POST method also works fine with the servoy http plugin. However there's no method inside the Servoy Poster object to get the PNG image.
(I've posted a request at Servoy for that)
- Code: Select all
//Get poster object to do http (file) posts. If posting files, it will post multipart!
var poster = plugins.http.getPoster('http://chart.apis.google.com/chart');
var p1 = poster.addParameter('cht','lc');
var p2 = poster.addParameter('chtt','This is | my chart');
var p3 = poster.addParameter('chs','300x200');
var p4 = poster.addParameter('chxt','x');
var p5 = poster.addParameter('chd','t:40,20,50,20,100');
var httpCode = poster.doPost(); //httpCode 200 is ok
var pageData = poster.getPageData() //need getMediaData() here
globals.chartImage = pageData;