T-Roy
unread,May 6, 2012, 2:29:28 PM5/6/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-visua...@googlegroups.com
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!