Hello. No-one has any ideas here?
On Mar 17, 9:13 pm, Pegasusrjf <[email protected]> wrote: > I am using the code below to try an join two DataTables together. > > I keep getting this error: Error: Invalid column index undefined. > Should be an integer in the range [0-13]. > > The first table referenced has 14 columns, and the second table has 3 > columns. No matter what I try I can't get it to display the data. > > I am lost as I can enter commands in the debugger and see that the > data does exist for different columns. > > Any help is greatly appreciated. > > Code below... > > <script type="text/javascript"> > var visualization; > var mDriverName; > var mResultDetails; > var mDataJoin; > > function drvDataVisualization() { > var qDrvName = new google.visualization.Query('http:// > spreadsheets.google.com/pub? > key=tFijkSiJElqcqvWczlkYGfA&headers=1&gid=1'); > // Apply query language. > qDrvName.setQuery('SELECT *'); > // Send the query with a callback function. > qDrvName.send(drvDataResponse); > } > > function drvDataResponse(response) { > if (response.isError()) { > alert('Error in query: ' + > response.getMessage() + ' ' + > response.getDetailedMessage()); > return; > } > mDriverName = response.getDataTable(); > > var qRdetails = new > google.visualization.Query('http:// > spreadsheets.google.com/pub? > key=tFijkSiJElqcqvWczlkYGfA&headers=1&gid=5'); > // Apply query language. > qRdetails.setQuery('SELECT *'); > // Send the query with a callback function. > qRdetails.send(rDetailQueryResponse); > } > > function rDetailQueryResponse(response) { > if (response.isError()) { > alert('Error in query: ' + > response.getMessage() + ' ' + > response.getDetailedMessage()); > return; > } > mResultDetails = response.getDataTable(); > > mDataJoin = new > google.visualization.data.join(mResultDetails,mDriverName,'inner', > [1,0],[2,5,6,7,8],[1]); > var mDrawData = new > google.visualization.Table(document.getElementById('dvrDetails')); > mDrawData.Draw(mDataJoin,null); > } > > google.setOnLoadCallback(drvDataVisualization()); > </script> -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
