Post

Replies

Boosts

Views

Activity

Comment on Charts Framework: chartYScale(domain:) scales the y-axis correctly but BarMarks are drawn down to bottom part of the screen
They most likely used a foregroundStyle with a linearGradient. An example would be similar to (assuming the charts left legend are these numbers, and the max is 11, the min is 8) let blueLocation: Double = 1 - ((11 - 9) / (11 - 8)) let yellowLocation: Double = 1 - ((11 - 10) / (11 - 8)) LineMark(x: .., y: ..).foregroundStyle(.linearGradient(stops: [.init(color: .blue, location 0.0), .init(color: .blue, location: blueLocation), .init(color: .yellow, location: blueLocation+.0001), .... ])
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’23
Comment on Charts Framework: chartYScale(domain:) scales the y-axis correctly but BarMarks are drawn down to bottom part of the screen
They most likely used a foregroundStyle with a linearGradient. An example would be similar to (assuming the charts left legend are these numbers, and the max is 11, the min is 8) let blueLocation: Double = 1 - ((11 - 9) / (11 - 8)) let yellowLocation: Double = 1 - ((11 - 10) / (11 - 8)) LineMark(x: .., y: ..).foregroundStyle(.linearGradient(stops: [.init(color: .blue, location 0.0), .init(color: .blue, location: blueLocation), .init(color: .yellow, location: blueLocation+.0001), .... ])
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on Auto-generated Intents code contains thousands of warnings in Xcode 13 beta
This is fantastic tedrog36, I used your 'fix' and created a wrapper header, that only imports the auto-generated "AppName-swift.h", with your clang diagnostic statements, and then I can just import that wrapper header in all the places I was previously importing the auto-generated one.
Replies
Boosts
Views
Activity
Jul ’22