Hi Kim, >From what I can see in your json output, the 'type' of the first column actually says 'string', and the error message you reported says that this column cannot be of type string. It looks like you want dates instead, so make that first column be of type 'date', and then for the values, you still need to use strings (because you can't pass Date objects via JSON directly), but GViz recognizes specially formatted strings that look like this "Date(year, month, day, hour, minute, second)". Be aware that the month value is 0-based, so 8 is actually September.
I haven't looked at the rest of your code, but I hope that helps. On Tue, Sep 3, 2013 at 11:59 AM, <[email protected]> wrote: > Hello, > > I started using the Google Chart API today to do some dynmaic bar chart > creation > but get the following error: Data column(s) for axis #0 cannot be of type > string > > I am creating a comma delimited string with PHP and passing that string > back via > an $.ajax call. I then do a splice in javascript to create an array but > all the values > appear in double quotes and I believe that is what the entirety of the > issue is. One > other thing is that the date values should remaing quoted I would assume. > > I am attaching my php and javascript files if someone can help me to > figure out > how to remove the double quotes from the JSON that is created that would be > awesome and I appreciate any assitance with this issue. Again see the > attached > files. the html, php and javascript files. I am also attaching what I can > capture of the > json string from the alert box I display (not everything displays for > capture). > > Thank, > Kim H. > > -- > You received this message because you are subscribed to the Google Groups > "Google Chart 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 http://groups.google.com/group/google-chart-api. > For more options, visit https://groups.google.com/groups/opt_out. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> - 978-394-1058 [email protected] <[email protected]> 562D 5CC, Cambridge MA [email protected] <[email protected]> 9 Juniper Ridge Road, Acton MA -- You received this message because you are subscribed to the Google Groups "Google Chart 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 http://groups.google.com/group/google-chart-api. For more options, visit https://groups.google.com/groups/opt_out.
