Skip to main content

dateFromPos

Description​

Gets the date of the specified horizontal position in the chart area

dateFromPos: (pos: number) => Date

Parameters​

  • pos - (required) number - the relative horizontal position you want to know the date of

Returns​

  • date - (Date) - the date of the specified horizontal position in the chart area

Example​

var date = gantt.dateFromPos(200);

Details​

note

The method returns a date that is currently rendered in the Gantt chart. If a date isn't rendered in the chart - the method will return 'null'.

For example, for the Gantt chart above, the method will return the following:

gantt.dateFromPos(0); // -> Sun Mar 31 2013 00:00:00
gantt.dateFromPos(74); // -> Mon Apr 01 2013 01:22:17
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.