D'oh! *facepalm*
I missed the closing } for the two functions, it should be:

google.visualization.events.addListener(chart, 'rangechange', function () {
    var start = chart.getVisibleChartRange().start;
    var end = chart.getVisibleChartRange().end;
    var fooBase = chart.getValue(chart.getFilteredRows(start)[0], 1);
    var barBase = chart.getValue(chart.getFilteredRows(start)[0], 2);
    var view = new google.visualization.DataView(data);
    view.setColumns([0, {
        type: 'number',
        label: 'foo',
        func: function (dataTable, rownum) {
            return dataTable.getValue(rownum, 1) / fooBase;
        }
    }, {
        type: 'number', 
        label: 'bar', 
        func: function (dataTable, rownum) {
            return dataTable.getValue(rownum, 2) / barBase;
        }
    }]);
    chart.draw(view, options);
});

-- 
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/-/c97UixrUkAcJ.
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