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