There's never a fixed time of chart preparation. A chart is normally prepared within a range of time, which too is likely to vary depending on constraints or technical reasons from Railway's side.
3 to 4 hours prior to scheduled departure is the range of time within which a chart may be prepared for majority of trains.