Hi All,

I am querying DB and populating Products in an arraylist then i am
converting them to JsonArray
here is a snippet

ArrayList<ProductTest> list= pimpl.getProductList(productId,
startDate, endDate);
Gson gson = new Gson();
String json = gson.toJson(list);
 JsonParser parser = new JsonParser();
JsonArray array = parser.parse(json).getAsJsonArray();

on client side (JSP) i am trying to pass this array to  datatable
 var data = new google.visualization.DataTable(<%=array%>);

it is giving no table no columns however the array prints
[{"product_id":0,"unique_visitors":9237},{"product_id":
1,"unique_visitors":237},{"product_id":2,"unique_visitors":3000},
{"product_id":3,"unique_visitors":3000},{"product_id":
4,"unique_visitors":3000}] on console is there anything wrong in this
code ?

Please help

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-chart-api?hl=en.

Reply via email to