The following is a table for the Google Charts API. I'm trying to sort the "Numbers" Column descending. Anyone know how to do this?
<script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load('visualization', '1', {packages: ['table']}); </script> <script type="text/javascript"> function drawVisualization() { // Create and populate the data table. var data = new google.visualization.DataTable(); data.addColumn('string', 'Names'); data.addColumn('number', 'Numbers'); data.addRows(3); data.setCell(0, 0, 'Name 1'); data.setCell(1, 0, 'Name 2'); data.setCell(2, 0, 'Name 3'); data.setCell(0, 1, 1); data.setCell(1, 1, 2); data.setCell(2, 1, 3); visualization = new google.visualization.Table(document.getElementById('table')); visualization.draw(data, null); } google.setOnLoadCallback(drawVisualization); </script> <div id="table"></div>
sortLook here for the playground code.google.com/apis/ajax/playground/…