@tahir,
The date-time axis is linear, hence all dates/times within a date range will be displayed on the x-axis regardless of the data being passed.
To make all candlesticks equidistant, you can pass labels instead of x values for the candlesticks. This way, CanvasJS will automatically distribute them evenly on the x-axis without considering the actual time intervals. However, if your scenario requires using x-values (for accurate timestamps), you can use scaleBreaks to remove the gaps during non-trading hours.
—
Thangaraj Raman
Team CanvasJS