You must be logged in to post your query.
Home › Forums › Chart Support › Shifting not completlty working
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?
Kismal,
We are unable to reproduce the issue. Kindly create a fiddle so that we can help you out. Hope this link helps you for more information on creating dynamic charts.
You must be logged in to reply to this topic. Login/Register