欢迎光临
我们一直在努力

适用于iOS的雷达图表效果

建站超值云服务器,限时71元/月

适用于iOS的雷达图表效果

项目介绍:

Usage

var dataSet = ChartDataSet()
dataSet.entries = [ChartDataEntry(value: 100),
                    ChartDataEntry(value: 70),
                    ChartDataEntry(value: 80),
                    ChartDataEntry(value: 40),
                    ChartDataEntry(value: 90),
                    ChartDataEntry(value: 30)]
var dataSet2 = ChartDataSet()
dataSet2.entries = [ChartDataEntry(value: 50),
                    ChartDataEntry(value: 50),
                    ChartDataEntry(value: 70),
                    ChartDataEntry(value: 90),
                    ChartDataEntry(value: 70),
                    ChartDataEntry(value: 100)]
dataSet2.strokeColor = .red
dataSet2.fillColor = UIColor(red: 1, green: 0, blue: 0, alpha: 0.5)
        
let chartView = RadarChartView()
chartView.dataSets = [dataSet, dataSet2]
chartView.titles = ["Apple", "Beef", "Cheese", "Donuts", "Egg", "Fig"]
chartView.webTitles = ["20", "40", "60", "80", "100"]
chartView.frame = CGRect(x: 0, y: 100, width: view.frame.width, height: view.frame.width)

view.addSubview(chartView)
If you use RadarChartView in UITableViewCell, watch this sample

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 9.0+
Swift 3.1

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 适用于iOS的雷达图表效果
分享到: 更多 (0)