brampf / SUECharts

SwiftUI Charts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SUECharts

SwiftUI Charts

MIT License Swift 5.3

SUE stands for SwiftUI Extras and is a collection of small SwiftUI libraries for various recurring use cases

Gallery

Grid

Grid(5, 3)
    .stroke(Color.gray, style: StrokeStyle(lineWidth: 0.5, dash: [10,5]))
    .border(Color.gray, width: 2)
    .aspectRatio(5/3, contentMode: .fit)
    .padding()

Grid

LinearFunction

LinearFunction(a: 1, b: 0).stroke(Color.red, lineWidth: 1).aspectRatio(1, contentMode: .fit).border(Color.gray, width: 1).padding()

LinearFunction

Graph

Graph(dataPoints: [12,42,0,36])
    .stroke(Color.blue, lineWidth: 1)
    .border(Color.gray, width: 1)
    .padding()

Graph

Bars

Bars(true, dataPoints: [1,2,6,4,5,3])
    .stroke(Color.purple, lineWidth: 2.0)
    .border(Color.gray, width: 1)
    .padding()

Bars

License

MIT license; see LICENSE. (c) 2020

About

SwiftUI Charts

License:MIT License


Languages

Language:Swift 100.0%