dateFromPos

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

Date dateFromPos(number pos);

Parameters

posnumberthe relative horizontal position you want to know the date of

Returns

Datethe date of the specified horizontal position in the chart area

Example

var date = gantt.dateFromPos(200);

Details

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
Back to top