Below is the Chart I have created , I want to adding padding on right side while the dynamic chart is scrolling horizontally.
This is my code that updates data to chart
setInterval(function(){updateChart()}, 100);
var updateChart = function () {
if(xVal > 160) return false;
chart.getDefaultAxisX().setInterval(xVal-100, xVal+2)
yVal = yVal + Math.round(5 + Math.random() *(-5-5));
series.add({ x: xVal, y: yVal})
seriestwo.add({ x: xVal, y: yVal+500})
xVal++;
// update chart after specified time.
};
On every update I am calling this line to achieve what I need now.
chart.getDefaultAxisX().setInterval(xVal-100, xVal+2)
This is somewhat shaking the chart and not smooth , How do I actually add padding , I was checking all documentation , but not found anything.
You guys can play around here - https://www.arction.com/lightningchart-js-interactive-examples/examples/lcjs-example-0150-ecg.html