Home › forums › Using CanvasJS › Prevent Autoscroll after render
This topic contains 1 reply, has 2 voices, and was last updated by Bivek Singh 1 year, 9 months ago.
Every time i render the chart the window scrolls to center the charts in the middle of the window. How can i prevent this functionality?
There can be various reasons due to which the page scrolls to the chart. Are you rendering the chart on trigger of some event? Or does that happen even for the first chart render without any event associated to it? If you are rendering it on trigger of some event, prevent the default action of that event using event.preventDefault();. If this doesn’t solve your issue, please create a jsFiddle so that we can further look into the issue.
You must be logged in to reply to this topic.