The ScrollableLineChart library is a robust and versatile Swift library designed to create smooth, interactive, and scrollable line charts in iOS applications. This library caters to developers who need an efficient and customizable way to present time-series data or any other data that benefits from a linear graphical representation.
Line Chart Without Curve | Curved Line Chart |
---|---|
@IBOutlet weak var lineChart: LineChart!
func updateData() {
lineChart.dataEntries = [
PointEntry(value: 1, label: "one"),
PointEntry(value: 2, label: "two"),
PointEntry(value: 3, label: "three"),
]
}
Swift Version - 5.0
Gap between each point
lineGap
: CGFloat =40.0
Preseved space at top of the chart
topSpace
: CGFloat =40.0
Preserved space at bottom of the chart to show labels along the Y axis
bottomSpace
: CGFloat =40.0
The top most horizontal line in the chart will be 10% higher than the highest value in the chart
-
topHorizontalLine
: CGFloat =110.0 / 100.0
-
isCurved
: Bool =false
Active or desactive animation on dots
animateDots
: Bool =false
Active or desactive dots
showDots
: Bool =true
Dot inner Radius
innerRadius
: CGFloat =6
Dot outer Radius
outerRadius
: CGFloat =8
GSScrollableLineChart is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'GSScrollableLineChart'
megaganjotsingh, megaganjotsingh@gmail.com
GSScrollableLineChart is available under the MIT license. See the LICENSE file for more info.
Contributions to the GSScrollableLineChart library are welcome. You can fork the repository and submit pull requests to enhance features or fix issues. For major changes, please open an issue first to discuss what you would like to change.