DDSpiderChart alternatives and similar libraries
Based on the "Charts" category.
Alternatively, view DDSpiderChart alternatives based on common mentions on social networks and blogs.
-
Scrollable-GraphView
An adaptive scrollable graph view for iOS to visualise simple discrete datasets. Written in Swift. -
FSInteractiveMap
A charting library to visualize and interact with a vector map on iOS. It's like Geochart but for iOS! -
ANDLineChartView
ANDLineChartView is easy to use view-based class for displaying animated line chart. -
TWRCharts
An iOS wrapper for ChartJS. Easily build animated charts by leveraging the power of native Obj-C code. -
Dr-Charts
Dr-Charts is a highly customisable, easy to use and interactive chart / graph framework in Objective-C.
WorkOS - The modern identity platform for B2B SaaS
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of DDSpiderChart or a related project?
README
DDSpiderChart
Easy to use Spider (Radar) Chart library for iOS written in Swift.
Requirements
- iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
- Xcode 8.0+
- Swift 3.0+
Installation
CocoaPods
DDSpiderChart is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "DDSpiderChart"
Usage
Styling in Interface Builder
You can use DDSpiderChartView within Interface Builder. Just drag & drop a UIView and set its class to DDSpiderChartView. The library supports IBDesignable protocol, so you will see your customized chart in Xcode.
Programmatically
To create a new instance of the chart:
let spiderChartView = DDSpiderChartView(frame: .zero) // Replace with some frame or add constraints
spiderChartView.axes = ["Axis 1", "Axis 2", "Axis 3", "Axis 4"] // Set axes by giving their labels
spiderChartView.addDataSet(values: [1.0, 0.5, 0.75, 0.6], color: .red) // Add first data set
spiderChartView.addDataSet(values: [0.9, 0.7, 0.75, 0.7], color: .blue) // Add second data set
To remove a data set from chart:
let dataSet1 = spiderChartView.addDataSet(values: [0.9, 0.7, 0.75, 0.7], color: .blue) // Add second data set
// Later
spiderChartView.removeDataSetView(dataSet!)
Customization:
spiderChartView.color = .white // This will change the color of the circles
spiderChartView.circleCount = 20 // How many circles there will be
spiderChartView.circleGap = 5 // The distance between circles
// circleCount * circleGap would be the radius of the chart itself
Text Styling: (It just works by passing an array of NSAttributedString's as axes. You have a lot flexibility this way.)
// Custom font with custom size & color example
func attributedAxisLabel(_ label: String) -> NSAttributedString {
let attributedString = NSMutableAttributedString()
attributedString.append(NSAttributedString(string: label, attributes: [NSAttributedStringKey.foregroundColor: UIColor.black, NSAttributedStringKey.font: UIFont(name: "AvenirNextCondensed-Bold", size: 16)!]))
return attributedString
}
override func viewDidLoad() {
super.viewDidLoad()
spiderChartView.axes = ["PAS", "DRI", "SPD", "DEF", "PHY", "SHT"].map { attributedAxisLabel($0) }
}
Author
Deniz Adalar, [email protected]
License
DDSpiderChart is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the DDSpiderChart README section above
are relevant to that project's source code only.