Initial Package commit
A simple animated LineChart example.
import SwiftUI struct ExampleView: View { @ObservedObject var model = LineModel() var body: some View { Color.white .overlay( LineShape(model: model) .fill(gradient) ) .onTapGesture { withAnimation { model.add(CGFloat.random(in: 0...100)) } } } var gradient: LinearGradient { LinearGradient( gradient: Gradient(colors: [Color.green, Color.green.opacity(0.2)]), startPoint: .top, endPoint: .bottom ) } }
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
LineChart
A simple animated LineChart example.