Skip to content

Swift tool for creating smooth, and scrollable line charts in iOS apps

License

Notifications You must be signed in to change notification settings

megaganjotsingh/GSScrollableLineChart

Repository files navigation

GSScrollableLineChart

CI Status Version License Platform

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

Usage

@IBOutlet weak var lineChart: LineChart!

func updateData() {
  lineChart.dataEntries = [
    PointEntry(value: 1, label: "one"),
    PointEntry(value: 2, label: "two"),
    PointEntry(value: 3, label: "three"),
  ]
}

Requirements

Swift Version - 5.0

Properties

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

Installation

GSScrollableLineChart is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'GSScrollableLineChart'

Author

megaganjotsingh, [email protected]

License

GSScrollableLineChart is available under the MIT license. See the LICENSE file for more info.

Contribution

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.

About

Swift tool for creating smooth, and scrollable line charts in iOS apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published