What happens when you skip the dashboard and draw the Table with the data
directly, ie:
table = new google.visualization.ChartWrapper({
dataTable: data,
'chartType': 'Table',
'containerId': 'chart3',
'options': {
'width': '670px',
'allowHtml': true,
'showRowNumber': true,
'alternatingRowStyle': true,
'height': 300,
//'page': 'enable',
//'pageSize': 10,
//'hAxis': {'title': 'Assessment History'}
},
'view': {'columns': [1,2,3,4,5,6]}
});
table.draw();
On Sunday, May 6, 2012 2:29:28 PM UTC-4, T-Roy wrote:
>
> I have introduced a date formatter for a data table that is used in a
> dashboard context, but it does not have an affect on the table output.
> Here is a code snippet:
>
>
> //var data is a dataTable object created with json from a server.
>
> var date_formatter_medium = new
> google.visualization.DateFormat({formatType:'medium'});
> date_formatter_medium.format(data,5); //I have double and triple
> checked the column index
>
> table = new google.visualization.ChartWrapper({
> 'chartType': 'Table',
> 'containerId': 'chart3',
> 'options': {
> 'width': '670px',
> 'allowHtml': true,
> 'showRowNumber': true,
> 'alternatingRowStyle': true,
> 'height': 300,
> //'page': 'enable',
> //'pageSize': 10,
> //'hAxis': {'title': 'Assessment History'}
> },
> 'view': {'columns': [1,2,3,4,5,6]}
> });
>
> // Create a dashboard
> new
> google.visualization.Dashboard(document.getElementById('dashboard')).
> // Establish bindings, declaring the both the slider and the
> category
> bind(schoolPicker, groupPicker).
> bind(groupPicker, userPicker).
> bind(userPicker, assessmentPicker).
> // slider and picker will drive both charts. stackcol,table
> bind(assessmentPicker, [stackcol, table]).
> // Draw the entire dashboard.
> draw(data);
> }
>
>
> The dashboard display ok, no errors. However, the date field displays a
> very long date format such as
>
> Sat Apr 21 2012 00:00:00 GMT-0600 (Mountain Daylight Time)
>
> I am wondering if this is because the table definition creates a data view
> to show a subset of columns???
>
> If so, how can I get around this?
>
> Thanks for any ideas!
>
>
>
--
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/-/0OljeLfYIiQJ.
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.