Hi,
I’m trying to shift away some data as soon as there are more than 10 datapoints. My update functions looks like:
`var updateChart = function (data) {
var dt = new Date();
dps.push({
x: xVal,
y: parseInt(data[‘value’]),
toolTipContent: ‘Date: ‘ + dt + ‘<br />’ + ‘Value: {y}’
});
xVal++;
if (dps.length > 10) {
dps.shift();
}
chart.render()
};`
It works, but not completly. The data is shifted, but the x-axis is not shifted. So, I keep seeing 0, 1, 3, … . The line is shifted, so I only see the last 10 records. Any suggestions?