-
Notifications
You must be signed in to change notification settings - Fork 17
Basic Usage
Roman Baitaliuk edited this page Jul 30, 2020
·
4 revisions
Declare ChartConfiguration
class in your view for all chart modifications.
let config = ChartConfiguration()
ChartDataEntry
class represents a single entry in the chart with x- and y- coordinate. Prepare an array of entries for adding to the chart.
self.config.data.entries = newEntries
BarChartView(config: self.config)
.onAppear() {
self.config.data.entries = self.createEntries()
}
.frame(height: 300)
Note: frame
is a default SwiftUI view modifier.
Please see example projects at ~/Examples