Having the same issue now that I build the app with iOS 14.5.
I will use the work-around mentioned by apoorvet (thanks!), but this is surely a bug right?
Post
Replies
Boosts
Views
Activity
You can also set the Visibility directly:
Chart{
BarMark(x: .value("o", 5),
y: .value("m", "Duration: 5m"),
width: 7)
.foregroundStyle(.orange)
BarMark(x: .value("o", 7),
y: .value("m", "Intervals: 7"),
width: 7)
.foregroundStyle(.teal)
}
.chartYAxis(.hidden)
.chartXAxis(.hidden)
Thank for looking into this darkpaw.
The final design will include a number inside the circle, and the default opacity would make the text more difficult to read.
I will continue to play around with this and hopefully I will find a solution- I will post it here if I find something.
Thanks again for the help.
Ok, I need to add a post-it note to my monitor "in SwiftUI- order matters".
It will work as expected if the order of LineMark and AreaMark is swapped.
Chart {
ForEach(rankings) { element in
AreaMark(...)
LineMark(...)
}
}
Thanks for the idea Claude31, it kind of works to negate the number. The lowest numbers are now top to bottom, but I also have a gradient that now appears on the wrong side of the linke marks.
That I know, as mentioned in my OP. That is not the issue though.
Had the same issue and solved by deleting derived data.