Open Maples7 opened 3 months ago
It seems https://github.com/jasudev/AxisContribution/pull/6 bring this bug in.
This PR #13 is to fix this bug.
use Date().startOfDay
as the key
struct AxisContribution_Previews: PreviewProvider {
static var previews: some View {
AxisContribution(constant: .init(), source: [Date().startOfDay: ACData(date: Date(), count: 5)])
.preferredColorScheme(.dark)
}
}
When there's data like
Date(): ACData(date: Date(), count: 5)
, It's blank for today's grid.Also, the first week doesn't show correctly. While today is Tuesday, it shouldn't show the complete week with 7 days. There should be only 3 grids instead of 7, under the situation that Sunday is the first weekday.
Reproduce: When the preview code is like this:
This is the result: