Hi Richard,

In JavaScript, prepending 0 to a number means that it is an octal number,
and octal numbers cannot have decimal points. Try entering "01.00" in a
JavaScript console. You will get the error "SyntaxError: Unexpected
number", which is exactly the error that you get for your code. If you
still have issues after removing the prepended zeroes, post back, and we
will investigate again.



On Sat, Feb 28, 2015 at 5:51 AM Richard Wallace <richiewallac...@gmail.com>
wrote:

> I'm attempting to create a basic google chart.
> X axis is a time, y axis is a value.
> Data is formatted as so:
>
>     <html>
>     <head>
>       <script type="text/javascript" src="https://www.google.com/jsapi
> "></script>
>       <script type="text/javascript">
>         google.load('visualization', '1.1', {packages: ['line']});
>         google.setOnLoadCallback(drawChart);
>
>         function drawChart() {
>
>           var data = new google.visualization.DataTable();
>           data.addColumn('number', 'Time');
>           data.addColumn('number', 'Yesterday');
>           data.addColumn('number', 'Today');
>           data.addColumn('number', 'TwoDayAgo');
>
>           data.addRows([
>             [01.00,  37.8, 80.8, 41.8],
>             [02.00,  30.9, 69.5, 32.4],
>             [03.00,  25.4,   57, 25.7],
>             [04.00,  11.7, 18.8, 10.5],
>             [05.00,  11.9, 17.6, 10.4]
>           ]);
>
>           var options = {
>             chart: {
>               title: 'Results',
>               subtitle: 'Comparison'
>             },
>             width: 900,
>             height: 500
>           };
>
>           var chart = new google.charts.Line(document.
> getElementById('linechart_material'));
>
>           chart.draw(data, options);
>         }
>       </script>
>     </head>
>     <body>
>       <div id="linechart_material"></div>
>     </body>
>     </html>
>
> Note the decimal places in the data table.
> If I remove the decimal places it will work om
> However the chart does not show?
>
> --
> 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 google-visualization-api+unsubscr...@googlegroups.com.
> To post to this group, send email to google-visualization-api@
> googlegroups.com.
> Visit this group at http://groups.google.com/
> group/google-visualization-api.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to