Certainly, Richardo - thanks for the assistance.
Here's the dashboard code:
function responseHandler(response) {
// Remove the loading message (if exists).
var loadingMsgContainer = document.getElementById('loading');
loadingMsgContainer.style.display = 'none';
if (!gadgetHelper.validateResponse(response)) {
// Default error handling was done, just leave.
return;
}
dataTable = response.getDataTable();
var tx = prefs.getBool("haxis_time_format");
if ( tx )
formatTimeXAxis( dataTable );
var ref = getMaxColumn( dataTable );
// Define a slider control for the y-axis.
slider = new google.visualization.ControlWrapper({
'controlType': 'NumberRangeFilter',
'containerId': 'control1',
'options': {
'filterColumnIndex': ref, 'minValue': 0,
'ui':
{ 'labelStacking':'horizontal','orientation':'vertical','label':'' }
}
});
google.visualization.events.addListener( slider,'statechange',onControlStateChange );
dashboard.bind( slider,lineChart );
dashboard.draw( dataTable );
};
function formatTimeXAxis( _table ) {
// format the x-axis in time-only format.
var v;
var sp;
for ( var i = 0;i<_table.getNumberOfRows();i++ ) {
v = _table.getValue( i,0 );
sp = v.indexOf( ' ' );
if ( sp > 0 ) {
ts = v.substring( sp+1,v.length );
_table.setValue( i,0,ts );
}
}
Also, using the default binding/linkage seems to produce similar
results - filtered rows/columns.
Let me know what you think - thanks
John
On Sep 20, 7:34 am, Riccardo Govoni ☢ <
battleho...@gmail.com> wrote:
> Would you mind pasting the code you use to assemble the
> google.visualization.Dashboard as well, if any?
>
> I suspect you are using a google.visualization.Dashboard linking together
> the slider with the linechart, _and_ your own onControlStateChange callback.
> The former is geared toward performing row filtering (that's the way
> dashboards work by default), while your code performs the column filtering.
> The combination of the two is likely to generate the problem you describe.
>
> -- R.
>