Welcome to the ScrollableGraphView documentation! ScrollableGraphView is a versatile and customizable graph view for iOS. Whether you need to display simple bar graphs, line graphs, or complex graphs with multiple data sets, ScrollableGraphView has you covered.
Installation
To install ScrollableGraphView, you can use Cocoapods or manually add the framework to your project.
Cocoapods
To install ScrollableGraphView using Cocoapods, add the following line to your Podfile:
pod 'ScrollableGraphView'
Then, run the following command:
pod install
Manual Installation
If you prefer to install ScrollableGraphView manually, follow these steps:
- Download the ScrollableGraphView repository.
- Drag and drop the
Source
folder into your Xcode project.
You’re now ready to start using ScrollableGraphView in your project!
Usage
To create a ScrollableGraphView, follow these steps:
- Import the framework:
import ScrollableGraphView
- Create an instance of ScrollableGraphView:
let graphView = ScrollableGraphView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
- Customize the graph appearance:
graphView.backgroundFillColor = .white
graphView.referenceLineLabelFont = UIFont.boldSystemFont(ofSize: 8)
- Add your data:
let data: [Double] = [45, 15, 30, 65, 35, 60, 20]
let labels: [String] = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul"]
let plot = BarPlot(identifier: "bar")
let dataSeries = ScrollableGraphViewDataSource(values: data, labels: labels, plot: plot)
graphView.addPlot(plot: plot)
graphView.dataSeries = dataSeries
For more advanced usage and customization options, refer to the ScrollableGraphView documentation on GitHub.
Requirements
ScrollableGraphView requires:
- iOS 9.0 or later
- Swift 4.2 or later
License
ScrollableGraphView is licensed under the MIT License. More information can be found in the LICENSE file.
Conclusion
That concludes the documentation for ScrollableGraphView. We hope you find it useful and enjoy using the framework in your iOS projects!