Your jsonDataTest seems to work fine as is in this jsfiddle:
https://jsfiddle.net/dlaliberte/avdgy4ws/6/
Could you create a jsfiddle that demonstrates the problem you are seeing?

On Tue, Oct 4, 2022 at 1:26 PM maxdatabook <[email protected]> wrote:

> I took this json DataTable example from Google documentation and save to
> json DataTest
>
> var jsonDataTest = {
>   cols: [{id: 'A', label: 'NEW A', type: 'string'},
>          {id: 'B', label: 'B-label', type: 'number'},
>          {id: 'C', label: 'C-label', type: 'date'}
>   ],
>   rows: [{c:[{v: 'a'},
>              {v: 1.0, f: 'One'},
>              {v: new Date(2008, 1, 28, 0, 31, 26), f: '2/28/08 12:31 AM'}
>         ]},
>          {c:[{v: 'b'},
>              {v: 2.0, f: 'Two'},
>              {v: new Date(2008, 2, 30, 0, 31, 26), f: '3/30/08 12:31 AM'}
>         ]},
>          {c:[{v: 'c'},
>              {v: 3.0, f: 'Three'},
>              {v: new Date(2008, 3, 30, 0, 31, 26), f: '4/30/08 12:31 AM'}
>         ]}
>   ]
> }
>
> But I get an error when I do this:
>
> var data = new google.visualization.DataTable(jsonDataTest);
>
> how do I fix it.  I've tried variation of this tip I've read elsewhere but
> doesn't work. jsonData = JSON.stringify(eval("(" + jsonDataTest + ")"));
>
> Thanks!
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/aee17454-0fa3-4d92-a988-a9aaf628babcn%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/aee17454-0fa3-4d92-a988-a9aaf628babcn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 

• Daniel LaLiberte

 • SWE

 • Cambridge MA

 • [email protected] <[email protected]>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJNN6RbpXh6PLgOhjp44oF3%2BdyqAVD7SedhZbfELtAVUBg%40mail.gmail.com.

Reply via email to