LineChart zoom resets each time data is updated, Can we maintain the zoom level somehow?

13 views
Skip to first unread message

Liam Herron

unread,
Nov 16, 2015, 12:14:41 PM11/16/15
to Google Visualization API

I have a live chart (InterestRateCurve) that gets data updates every few seconds. The DataTable size has been fixed and my x-axis values are fixed.
The update code looks like the following:


function updateChart(msg, args)
{
var i, j;
for (i=0; i < dataTable.getNumberOfRows(); i++)
{
for (j=0; j < dataTable.getNumberOfColumns(); j++)
{
dataTable.setCell(i, j, msg[i][j]);
};
};

chartObj.draw(dataTable, chartOptions);
};


When I try to zoom into and pan my chart, it resets as soon as new data arrives.  This is frustrating when you really want to zoom.  Is there any way to maintain the zoom and position of the graph even if data updates?  Is there another method I should be calling instead of "draw" or is there some chart option I could set?

Thanks,
--Liam

Reply all
Reply to author
Forward
0 new messages