@chikwado,
You can use the showAt() method to programmatically move the crosshair along the axis. This method allows you to position the crosshair at any specific value on axisX (or axisY), which can help you achieve the scrolling effect you want. Please find the code-snippet below.
var xValue = 10, timeoutId;
function moveCrosshair() {
if (xValue > 90) {
clearTimeout(timeoutId);
return;
}
chart.axisX[0].crosshair.showAt(xValue);
xValue += 10;
timeoutId = setTimeout(moveCrosshair, 500);
}
moveCrosshair();
Please take a look at this JSFiddle for a working example.
If this does not fulfill your requirements, could you please brief us more about it, so that we can understand your scenario better and help you out?
—
Ananya Deka
Team CanvasJS