I have two servlets.
First servlet is one that extends the DataSourceServlet... yada yada yada.
It returns
google.visualization.Query.setResponse({"version":"0.6","status":"ok","sig":"1561786216","table":{"cols":[{"id":"countDate","label":"Date","type":"date","pattern":""},{"id":"SPY","label":"SPY","type":"number","pattern":""}],"rows":[{"c":[{"v":new
Date(2016,6,25)},{"v":60.47}]},{"c":[{"v":new
Date(2016,6,26)},{"v":58.14}]},{"c":[{"v":new
Date(2016,6,27)},{"v":56.03}]},{"c":[{"v":new
Date(2016,6,28)},{"v":53.07}]}]}});
Second servlet, is just an ordinary servlet. And returns the same response
as the first one. BUT, the response actually came from a cached copy saved
in a database. You know... to speed things up.
CharSequence dataTable = <get the response in some table>
response.setContentType("text/javascript; charset=UTF-8");
ServletOutputStream outputStream = response.getOutputStream();
outputStream.write(dataTable.toString().getBytes("UTF-8"));
The question is why doesn't the chart render using the second servlet.
So to be clear
query = new google.visualization.Query('queryservlet'); <-- this works
query = new google.visualization.Query('cachedresponseservlet') <-- fails
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/7db30d20-5463-4933-9665-601adc424da8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.