see inline for the correct code

On Thu, Jun 18, 2009 at 12:08 AM, jetsaredim<[email protected]> wrote:
>
> eh - there should be the following line under all of the data.setCell
> lines...
>
>  data.setTableProperty('page','enable');
>
> On Jun 17, 4:53 pm, jetsaredim <[email protected]> wrote:
>> I'd like to use the pagination features of the DataTable
>> visualization, but I can't seem to get it working.   I'm trying to get
>> it working with the interactive code playground with the following
>> code (basically, just the stock data x5).  I had originally tried with
>> just three elements and page=enable and then pageSize=1, but that
>> didn't work either.  Any suggestions or advice would be greatly
>> appreciated.
>>
>> function drawVisualization() {
>>   // Create and populate the data table.
>>   var data = new google.visualization.DataTable();
>>   data.addColumn('string', 'Name');
>>   data.addColumn('number', 'Height');
>>   data.addColumn('boolean', 'Smokes');
>>   data.addRows(15);
>>   data.setCell(0, 0, 'Tong Ning mu');
>>   data.setCell(1, 0, 'Huang Ang fa');
>>   data.setCell(2, 0, 'Teng nu');
>>   data.setCell(3, 0, 'Tong Ning mu');
>>   data.setCell(4, 0, 'Huang Ang fa');
>>   data.setCell(5, 0, 'Teng nu');
>>   data.setCell(6, 0, 'Tong Ning mu');
>>   data.setCell(7, 0, 'Huang Ang fa');
>>   data.setCell(8, 0, 'Teng nu');
>>   data.setCell(9, 0, 'Tong Ning mu');
>>   data.setCell(10, 0, 'Huang Ang fa');
>>   data.setCell(11, 0, 'Teng nu');
>>   data.setCell(12, 0, 'Tong Ning mu');
>>   data.setCell(13, 0, 'Huang Ang fa');
>>   data.setCell(14, 0, 'Teng nu');
>>   data.setCell(0, 1, 174);
>>   data.setCell(1, 1, 523);
>>   data.setCell(2, 1, 86);
>>   data.setCell(3, 1, 174);
>>   data.setCell(4, 1, 523);
>>   data.setCell(5, 1, 86);
>>   data.setCell(6, 1, 174);
>>   data.setCell(7, 1, 523);
>>   data.setCell(8, 1, 86);
>>   data.setCell(9, 1, 174);
>>   data.setCell(10, 1, 523);
>>   data.setCell(11, 1, 86);
>>   data.setCell(12, 1, 174);
>>   data.setCell(13, 1, 523);
>>   data.setCell(14, 1, 86);
>>   data.setCell(0, 2, true);
>>   data.setCell(1, 2, false);
>>   data.setCell(2, 2, true);
>>   data.setCell(3, 2, true);
>>   data.setCell(4, 2, false);
>>   data.setCell(5, 2, true);
>>   data.setCell(6, 2, true);
>>   data.setCell(7, 2, false);
>>   data.setCell(8, 2, true);
>>   data.setCell(9, 2, true);
>>   data.setCell(10, 2, false);
>>   data.setCell(11, 2, true);
>>   data.setCell(12, 2, true);
>>   data.setCell(13, 2, false);
>>   data.setCell(14, 2, true);
>>
>>   // Create and draw the visualization.
>>   visualization = new google.visualization.Table
>> (document.getElementById('table'));
>> // remove -  
>> data.setTableProperties({'page':'enable','showRowNumber':'True'});
>> // remove -  visualization.draw(data, null);

 visualization.draw(data, {'page':'enable','showRowNumber':true});
>>
>> }
>>
>>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to