asgallant:
I've tried applying your code with no luck. I've reviewed the group
documentation and here's what I'm doing:
creating datatable and populating it with my source data:
var data = new google.visualization.DataTable();
data.addColumn('string', 'Workflow Stage');
data.addColumn('string', 'Project Name');
then I add the source data:
data.addRows([[currentEmplyee.get_item("WFStage"),currentEmplyee.get_item("Project_x0020_Name")]]);
I add your code for the creation of the new datatable with an input of the
data table I created with my source table:
var counts = google.visualization.data.Group(data, [0], [{column: 0, type:
'number', label: 'Count',aggregation: google.visualization.data.count}]);
get my html element:
var table = new
google.visualization.Table(document.getElementById('table_div'));
now draw my table:
table.draw(counts, {allowHtml: true,showRowNumber: true});
my code executes correctly until it reaches the "var counts" line.
no table is drawn. What am I doing wrong??
Thanks in advance.
Mark
On Monday, April 23, 2012 3:17:04 PM UTC-4, asgallant wrote:
> Example code might help. This groups by column 0 in the DataTable and
> outputs a DataTable with distinct entries in column 0 and the count in
> column 1:
>
> var counts = google.visualization.data.Group(data, [0], [{
> column: 0,
> type: 'number',
> label: 'Count',
> aggregation: google.visualization.data.count
> }]);
>
> On Monday, April 23, 2012 3:09:01 PM UTC-4, asgallant wrote:
>>
>> I can't speak to using Sharepoint as a data source, but you if I
>> understand what you want correctly, you could use the Viz API's built in
>> Group<https://developers.google.com/chart/interactive/docs/reference#google_visualization_data_group>function
>> to get totals.
>>
>> On Monday, April 23, 2012 2:59:35 PM UTC-4, Coltrane wrote:
>>>
>>> Folks:
>>> I attempting to use a SharePoint list as the source for bar graph and
>>> in the the client side query language that I must use (caml) does not
>>> support the count function. Does anyone know of another manner to
>>> query the SP list as the graph datasource to gain category totals?
>>>
>>> Thanks in advance.
>>>
>>> Mark
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/DEF3_VsHyLQJ.
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.