Setting a hard minimum axis value in Google Charts API

you need to set viewWindow like this: var data = new google.visualization.DataTable(); data.addColumn(‘string’, ‘Date’); data.addColumn(‘number’, ‘Uptime’); data.addColumn(‘number’, ‘Downtime’); data.addRows([ [‘Dec 1, 1830’, 99.875, 0.125], [‘Dec 8, 1830’, 99.675, 0.325], [‘Dec 15, 1830’, 99.975, 0.025], [‘Dec 22, 1830’, 100.0, 0.0] ]); var chart = new google.visualization.ColumnChart(document.getElementById(‘chart_div’)); chart.draw(data, {width: 400, height: 240, isStacked: true, vAxis: { title: … Read more

Google chart redraw/scale on window resize

To redraw only when the window resize is completed and avoid multiple triggers, I think is better create an event: //create trigger to resizeEnd event $(window).resize(function() { if(this.resizeTO) clearTimeout(this.resizeTO); this.resizeTO = setTimeout(function() { $(this).trigger(‘resizeEnd’); }, 500); }); //redraw graph when window resize is completed $(window).on(‘resizeEnd’, function() { drawChart(data); });

Why does google.load cause my page to go blank?

Looks like google.load is adding the script to the page using a document.write(), which if used after the page loads, wipes out the html. This explains more in-depth: http://groups.google.com/group/google-ajax-search-api/browse_thread/thread/e07c2606498094e6 Using one of the ideas, you could use a callback for the load to force it use append rather than doc.write: setTimeout(function(){google.load(‘visualization’, ‘1’, {‘callback’:’alert(“2 sec wait”)’, … Read more

Download link for Google Spreadsheets CSV export – with Multiple Sheets

Every document in Google Sheets supports the “Chart Tools datasource protocol”, which is explained (in a rather haphazard way) in these articles: “Creating a Chart from a Separate Spreadsheet” “Query Language Reference” “Implementing the Chart Tools Datasource Protocol” To download a specific sheet as a CSV file, replace {key} with the document’s ID and {sheet_name} … Read more

Remove padding or margins from Google Charts

By adding and tuning some configuration options listed in the API documentation, you can create a lot of different styles. For instance, here is a version that removes most of the extra blank space by setting the chartArea.width to 100% and chartArea.height to 80% and moving the legend.position to bottom: // Set chart options var … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)