You find below the HTML code of the visualisation. You can copy and paste the code into an existing HTML page. For more information see also ?print.gvis
<!-- AnnotationChart generated in R 3.0.3 by googleVis 0.5.0-4 package --> <!-- Sun Mar 23 10:25:52 2014 --> <!-- jsHeader --> <script type="text/javascript"> // jsData function gvisDataAnnotationChart () { var data = new google.visualization.DataTable(); var datajson = [ [ new Date(2008,0,1), 3000, null, null, 40645, null, null ], [ new Date(2008,0,2), 14045, null, null, 20374, null, null ], [ new Date(2008,0,3), 5502, null, null, 50766, null, null ], [ new Date(2008,0,4), 75284, null, null, 14334, "Out of stock", "Ran out of stock of pens at 4pm" ], [ new Date(2008,0,5), 41476, "Bought pencils", "Bought 200k pencils", 66467, null, null ], [ new Date(2008,0,6), 333222, null, null, 39463, null, null ] ]; data.addColumn('date','Date'); data.addColumn('number','Pencils'); data.addColumn('string','Title.Pencils'); data.addColumn('string','Annotation.Pencils'); data.addColumn('number','Pens'); data.addColumn('string','Title.Pens'); data.addColumn('string','Annotation.Pens'); data.addRows(datajson); return(data); } // jsDrawChart function drawChartAnnotationChart() { var data = gvisDataAnnotationChart(); var options = {}; options["width"] = 600; options["height"] = 350; options["fill"] = 10; options["displayExactValues"] = true; options["colors"] = ['#0000ff','#00ff00']; var chart = new google.visualization.AnnotationChart( document.getElementById('AnnotationChart') ); chart.draw(data,options); } // jsDisplayChart (function() { var pkgs = window.__gvisPackages = window.__gvisPackages || []; var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || []; var chartid = "annotationchart"; // Manually see if chartid is in pkgs (not all browsers support Array.indexOf) var i, newPackage = true; for (i = 0; newPackage && i < pkgs.length; i++) { if (pkgs[i] === chartid) newPackage = false; } if (newPackage) pkgs.push(chartid); // Add the drawChart function to the global list of callbacks callbacks.push(drawChartAnnotationChart); })(); function displayChartAnnotationChart() { var pkgs = window.__gvisPackages = window.__gvisPackages || []; var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || []; window.clearTimeout(window.__gvisLoad); // The timeout is set to 100 because otherwise the container div we are // targeting might not be part of the document yet window.__gvisLoad = setTimeout(function() { var pkgCount = pkgs.length; google.load("visualization", "1", { packages:pkgs, callback: function() { if (pkgCount != pkgs.length) { // Race condition where another setTimeout call snuck in after us; if // that call added a package, we must not shift its callback return; } while (callbacks.length > 0) callbacks.shift()(); } }); }, 100); } // jsFooter </script> <!-- jsChart --> <script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartAnnotationChart"></script> <!-- divChart --> <div id="AnnotationChart" style="width: 600px; height: 350px;"> </div>