We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import SwiftUI import SwiftUICharts struct ProgressMain: View { let data : ChartData = weekOfData() var body: some View { LineChart() .xAxisGrid() .yAxisGrid() .xAxisLabels() .yAxisLabels() .environmentObject(data) .frame(height: 200, alignment: .center) .padding() } } extension ProgressMain { static func weekOfData() -> ChartData { let data : [ChartDataPoint] = [ ChartDataPoint(value: 20, xAxisLabel: "Jun 18"), ChartDataPoint(value: 90), ChartDataPoint(value: 100), ChartDataPoint(value: 75), ChartDataPoint(value: 160), ChartDataPoint(value: 110), ChartDataPoint(value: 90, xAxisLabel: "Sep 20") ] let gridStyle = GridStyle(numberOfLines : 6, lineColour : Color(.lightGray).opacity(0.25), dash : [4]) let chartStyle = ChartStyle(xAxisGridStyle : gridStyle, yAxisGridStyle : gridStyle, yAxisNumberOfLabels : 1) let lineStyle = LineStyle(colour : .accent, lineType : .line, strokeStyle : StrokeStyle(lineWidth: 3, lineCap: .round, lineJoin: .round)) return ChartData(dataPoints : data, chartStyle : chartStyle, lineStyle : lineStyle) } }
The text was updated successfully, but these errors were encountered:
Grid fixed in v1.0.6.
Thanks.
Sorry, something went wrong.
Works like a champ. Thank you so much for this wonderful SwiftUI library. Version 1.0 is first class!
Excellent, glad you like it.
No branches or pull requests
SwiftUICharts-Grid.mp4
The text was updated successfully, but these errors were encountered: