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.


On 20 September 2011 15:25, uover82 <[email protected]> wrote:

> Hi All,
>
> I'm working with a dashboard linking a slider with a line chart
> filtering/displaying multiple columns/series.
> Things work well/as expected to some extent. However, within certain
> filter ranges, the underlying data table seems to begin filtering row
> data as well as columns, which is the problem. Here's some related
> code snippets:
>
>    function onControlStateChange() {
>      var controlState = slider.getState();
>      var filteredView =
> filterView( dataTable,controlState.lowValue,controlState.highValue );
>      lineChart.setView( filteredView.toJSON() );
>      lineChart.draw();
>    }
>
>    function filterView( _table,_min,_max ) {
>      // filter a data table by min, max column values, producing a
> data view.
>      var validColumns = [ 0 ];
>      var cellValue;
>      var valid;
>      for ( var i = 1;i<_table.getNumberOfColumns();i++ ) {
>        valid = true;
>        for ( var j = 0;j<_table.getNumberOfRows() && valid;j++ ) {
>          cellValue = _table.getValue( j,i );
>          if ( (cellValue < _min || cellValue > _max) && cellValue !=
> null )
>            valid = false;
>        }
>
>        if ( valid )
>          validColumns.push( i );
>      }
>
>      var filteredView = new google.visualization.DataView( _table );
>      filteredView.setColumns( validColumns );
>
>      return filteredView;
>    }
>
> validColumns data appears to remain correct/consistent, while the
> underlying data table/chart seems to suffer the problem in some filter
> ranges.
>
> Has anyone else experienced this issue and/or know of a remedy?
>
> Thanks
>
> John
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> 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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
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.

Reply via email to