Possible to exclude irrelevant data from axis?

I'm experimenting with replacing my graph implementation with SwiftCharts. One issue I ran into is that I'm graphing stock data, but that data is only present during trading hours. In the screenshot I included, you can see my implementation on top vs the SwiftCharts version as well as the stocks app.

Because trading is from 9:30AM-4:00PM, if the times are graphed linearly, there will be large gaps for nights and weekends.

The way I implemented this before was to treat each "tick" of data as equal width. .chartXScale(type: .category) seems like it would do something similar, but if I try that I get the following error:

Fatal error: the specified scale type is incompatible with the data values and visual property.

Hi there,

did you find. a solution? I am having the same error message.

I'm trying to only display daylight hours on my x axis: .chartXScale(domain: allDaytimeDates, type: .category)

Cheers

Possible to exclude irrelevant data from axis?
 
 
Q