Hi, it seems that your problem is that you're trying to do "addcolumn" sometimes, where the correct version is the camel-case "addColumn". If you fix all of these instances, your chart should render. In the future, you can see these errors by checking the console (Ctrl + Shift + i in Chrome) and going to the console tab. In this case, the error was "Uncaught TypeError: Object #<U> has no method 'addcolumn'".
Happy coding! - Sergey On Wed, Apr 3, 2013 at 10:33 AM, Charles Moore < [email protected]> wrote: > I'm trying to build an Annotated Timeline chart to monitor temperature > readings from laboratory instruments. > > Based on the docs at > https://google-developers.appspot.com/chart/interactive/docs/gallery/annotatedtimeline#Data_Format > > But something is killing the script. I've tried reducing the size of the > column labels, reducing the number of instruments that get reported on a > single graph, and reducing the date/time stamp to just dates, to try to > trap the error. but I'm just not seeing it... > > What am I missing? > > > My code looks like: > > > <script type='text/javascript'> > google.load('visualization', '1', { 'packages': > ['annotatedtimeline'] }); > google.setOnLoadCallback(drawChart); > function drawChart() { > var data = new google.visualization.DataTable(); > data.addColumn('date', 'Date'); > data.addcolumn('number', 'Equip: ASP Equip #23 Type: Freezer Inv#: 61431 > Room: 2216 (5.000 ± 3.00)'); > data.addColumn('string', 'title1'); > data.addColumn('string', 'text1'); > data.addcolumn('number', 'Equip: Precision Equip #10 Type: Incubator > Inv#: 55148 Room: 2216 (36.000 ± 1.50)'); > data.addColumn('string', 'title2'); > data.addColumn('string', 'text2'); > data.addcolumn('number', 'Equip: Revco Bott Equip #7B Type: Incubator > Inv#: 97880 Room: 2216 (35.000 ± 1.00)'); > data.addColumn('string', 'title3'); > data.addColumn('string', 'text3'); > data.addcolumn('number', 'Equip: Revco Bott Equip #8B Type: Incubator > Inv#: 99490 Room: 2216 (35.000 ± 1.00)'); > data.addColumn('string', 'title4'); > data.addColumn('string', 'text4'); > data.addcolumn('number', 'Equip: Revco Equip #12 Type: Refrigerator > Inv#: 97878 Room: 2216 (5.000 ± 3.00)'); > data.addColumn('string', 'title5'); > data.addColumn('string', 'text5'); > data.addcolumn('number', 'Equip: Revco Equip #9 Type: Freezer Inv#: > 97879 Room: 2216 (-20.000 ± 5.00)'); > data.addColumn('string', 'title6'); > data.addColumn('string', 'text6'); > data.addcolumn('number', 'Equip: Revco Top Equip #7A Type: Incubator > Inv#: 97880 Room: 2216 (35.000 ± 1.00)'); > data.addColumn('string', 'title7'); > data.addColumn('string', 'text7'); > data.addcolumn('number', 'Equip: Revco Top Equip #8A Type: Incubator > Inv#: 99490 Room: 2216 (35.000 ± 1.00)'); > data.addColumn('string', 'title8'); > data.addColumn('string', 'text8'); > data.addRows([ > [new Date(2013, 3, 20, 11, 30),2.188, undefined, undefined, 35.146, > undefined, undefined, 33.667, undefined, undefined, 34.813, undefined, > undefined, 3.563, undefined, undefined, -21.813, undefined, undefined, > 34.188, undefined, undefined, 35.021, undefined, undefined], > [new Date(2013, 3, 20, 12, 0), 2.146, undefined, undefined, 35.417, > undefined, undefined, 34.542, undefined, undefined, 34.813, undefined, > undefined, 3.802, undefined, undefined, -21.834, undefined, undefined, > 34.198, undefined, undefined, 35.063, undefined, undefined], > [new Date(2013, 3, 20, 12, 30),2.063, undefined, undefined, 35.532, > undefined, undefined, 34.865, undefined, undefined, 34.813, undefined, > undefined, 3.563, undefined, undefined, -21.896, undefined, undefined, > 34.188, undefined, undefined, 35.063, undefined, undefined], > [new Date(2013, 3, 20, 13, 0), 2.250, undefined, undefined, 35.542, > undefined, undefined, 35.063, undefined, undefined, 34.761, undefined, > undefined, 3.636, undefined, undefined, -21.813, undefined, undefined, > 34.167, undefined, undefined, 35.063, undefined, undefined], > [new Date(2013, 3, 20, 13, 30),7.094, undefined, undefined, 35.532, > undefined, undefined, 35.157, undefined, undefined, 34.750, undefined, > undefined, 3.573, undefined, undefined, -21.886, undefined, undefined, > 34.146, undefined, undefined, 35.011, undefined, undefined], > [new Date(2013, 3, 20, 14, 0), 6.156, undefined, undefined, 35.511, > undefined, undefined, 35.229, undefined, undefined, 34.792, undefined, > undefined, 3.625, undefined, undefined, -21.844, undefined, undefined, > 34.188, undefined, undefined, 35.011, undefined, undefined], > [new Date(2013, 3, 20, 14, 30),4.438, undefined, undefined, 35.365, > undefined, undefined, 35.292, undefined, undefined, 34.771, undefined, > undefined, 3.688, undefined, undefined, -21.927, undefined, undefined, > 34.209, undefined, undefined, 35., undefined, undefined], > [new Date(2013, 3, 20, 15, 0), 3.448, undefined, undefined, 35.313, > undefined, undefined, 35.334, undefined, undefined, 34.750, undefined, > undefined, 3.865, undefined, undefined, -21.917, undefined, undefined, > 34.188, undefined, undefined, 35.042, undefined, undefined], > [new Date(2013, 3, 20, 15, 30),3.719, undefined, undefined, 32.854, > 'Low!', 'Equip: Precision Equip #10 Type: Incubator Inv#: 55148 Room: 2216 > (36.000 ± 1.50)', 35.063, undefined, undefined, 34.698, undefined, > undefined, 3.407, undefined, undefined, -21.854, undefined, undefined, > 33.990, undefined, undefined, 34.657, undefined, undefined] > ]); > var chart = new > google.visualization.AnnotatedTimeLine(document.getElementById('chart_div')); > chart.draw(data, { displayAnnotations: true, allowRedraw: true, > allowHTML: true }); > } > </script> > > ... > > <div id="chart_div" style="width:800px; height:500px;"></div> > > -- > 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 > http://groups.google.com/group/google-visualization-api?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- 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 http://groups.google.com/group/google-visualization-api?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
