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/-/9OaYLkZJncYJ.
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.