https://github.com/octree/stockee
Highly customizable performant k-line chart written in swift.
https://github.com/octree/stockee
kline klinechart swift
Last synced: 11 months ago
JSON representation
Highly customizable performant k-line chart written in swift.
- Host: GitHub
- URL: https://github.com/octree/stockee
- Owner: octree
- License: mit
- Created: 2022-05-17T02:48:30.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T09:29:18.000Z (over 1 year ago)
- Last Synced: 2025-07-26T19:08:10.871Z (11 months ago)
- Topics: kline, klinechart, swift
- Language: Swift
- Homepage:
- Size: 167 KB
- Stars: 53
- Watchers: 3
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stockee
Highly customizable lightweight k-line chart written in swift.

## Installation
### Swift Package Manager
- File > Swift Packages > Add Package Dependency
- Add https://github.com/octree/Stockee.git
- Select "Up to Next Major" with "1.3.1"
### Cocoapods
```bash
pod 'Stockee'
```
## Docs
[中文文档](./README_CN.md)
### Sample
Use a declarative syntax to build your k-line chart like `SwiftUI`. It's simpler and easier to read.
```swift
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()
}
}
```
## License
**Stockee** is available under the MIT license. See the LICENSE file for more info.