* feat: new protocol for chained functions, and added support for explicit Y ranges. X coming as well * feat: add new axis interface (#253)
18 lines
473 B
Swift
18 lines
473 B
Swift
import SwiftUI
|
|
|
|
extension View {
|
|
|
|
/// Attach chart style to a View
|
|
/// - Parameter style: chart style
|
|
/// - Returns: `View` with chart style attached
|
|
public func chartStyle(_ style: ChartStyle) -> some View {
|
|
self.environmentObject(style)
|
|
}
|
|
|
|
public func toStandardCoordinateSystem() -> some View {
|
|
self
|
|
.rotationEffect(.degrees(180), anchor: .center)
|
|
.rotation3DEffect(.degrees(180), axis: (x: 0, y: 1, z: 0))
|
|
}
|
|
}
|