ElvisShakya When I used the scroll-chart action, I get that the current.on is not a function. Do help.
tasha Hello ElvisShakya Please check if you are applying scroll-chart action like in the example: https://stackblitz.com/edit/vitejs-vite-vdxsxdey?file=src%2FGanttComponent.jsx
ElvisShakya This is not the way I have implemented it. Can we scroll the Gantt chart to a certain area when the chart is loaded? Also, we do not have a tooltip as of now?
tasha To scroll the Gantt chart to a certain area when the chart is loaded please use the exec method, which triggers gantt actions, along with scroll-chart action: api.exec('scroll-chart', { left: 1000, }); Please check the example: https://stackblitz.com/edit/vitejs-vite-vdxsxdey?file=src%2FGanttComponent.jsx
tasha Unfortunately now there is no api in React Gantt to get access to the gantt element in the chart but you can try to use dom api to get access to it. Please take a look at the example: https://stackblitz.com/edit/vitejs-vite-vdxsxdey?file=src%2Fdata.js,src%2FGanttComponent.jsx
tasha Here is another way of finding out the position of current day in the gantt and scroll there: https://stackblitz.com/edit/vitejs-vite-ixgyuvof?file=package.json,src%2FGanttComponent.jsx