How do I create an x-axis with Swift Charts with 1 unit per day instead of 1 unit per data point?
问题 I have a chart that takes time series data. The time series data is recorded at most once per day, but on an irregular schedule. I.e., the data could look like this: 1/1, 1500 1/13, 1600 1/14, 1700 2/22, 1800 5/1, 1400 Using Charts, my line graph populates the x-axis with one unit per data point (i.e., in the example above, there would be 5 units on the xaxis, instead of ~120 days) How do I create the x-axis with units for all dates in range? The code for my chart: func setChartData(data: (