This is really making me crazy.....
I am trying to perform a query on a spread sheet and then display the x-y plot; very simple!
The problem is that if the first column (column A) contains numbers both columns A & B are shown and the there is no X-axis. However, if column A is text then, A will be x-axis and B will be y-axis which is what i want.
How do I make column A to show up as x-axis if it contains numbers?
Here is the code which is straight from an example:
function drawVisualization() { // To see the data that this visualization uses, browse to // http://spreadsheets.google.com/ccc?key=pCQbetd-CptGXxxQIG7VFIQ var query = new google.visualization.Query( 'https://docs.google.com/spreadsheet/ccc?key=0AqzQGhNv6cV-dDBzZmZ2NzVGSkVVTUEwMEZPOG5YTHc'); // Apply query language. query.setQuery('SELECT A,D ORDER BY D'); // Send the query with a callback function. query.send(handleQueryResponse);}function handleQueryResponse(response) { if (response.isError()) { alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } var data = response.getDataTable(); visualization = new google.visualization.LineChart(document.getElementById('visualization')); visualization.draw(data);}