Highly customizable lightweight k-line chart written in swift.
pod 'Stockee'
Use a declarative syntax to build your k-line chart like SwiftUI
. It's simpler and easier to read.
chartView.descriptor = ChartDescriptor(spacing: 0) {
ChartGroup(height: 200) {
GridIndicator(lineWidth: 1 / UIScreen.main.scale, color: .Stockee.border)
YAxisAnnotation()
CandlestickChart()
MAChart(configuration: .init(period: 5, color: .yellow))
MAChart(configuration: .init(period: 10, color: .teal))
MAChart(configuration: .init(period: 20, color: .purple))
}
ChartGroup(height: 18) {
TimeAnnotation(dateFormat: "HH:mm")
SelectedTimeIndicator()
}
}
Stockee is available under the MIT license. See the LICENSE file for more info.
link |
Stars: 25 |
Last commit: 3 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics