Latest 0.2.0
Homepage https://github.com/ushisantoasobu/Yashin
License MIT
Platforms ios 9.0, requires ARC
Authors

Simple Rader Chart written in Swift.

Carthage compatible
CI Status
Version
License
Platform

Usage

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

Basic

import UIKit
import Yashin

class SomeViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        let radarChart = Yashin(frame: self.view.frame)
        self.view.addSubview(radarChart)

        radarChart.set(
            ["shoot", "pass", "dribble", "speed", "power", "stamina", "mentality"],
            [([8,9,8,8,7,6,9], UIColor.greenColor().colorWithAlphaComponent(0.40))]
        )
    }
}

Yashin

Setting some properties

// param
radarChart.maxValue = 100 // Max value of chart. Default is 10
radarChart.minValue = 0 // Min value of chart. Default is 0

// appearance
radarChart.padding = 100 // Padding from chart to outline frame. Default is 60.0
radarChart.fontSize = 13.0 // Font size. Default is 11.0
radarChart.scaleLineWidth = 4.0 // Scale-line width. Default is 2.0
radarChart.scaleLineHidden = false // Scale-line hidden flag. Default is false

// color
radarChart.lineColor = UIColor.brownColor() // Color of chart outer-line. Default is UIColor.darkGrayColor()
radarChart.subLineColor = UIColor.lightGrayColor() // Color of chart inner-line. Default is UIColor.darkGrayColor().colorWithAlphaComponent(0.50)

radarChart.set(
    ["shoot", "pass", "dribble", "speed", "power", "stamina", "mentality"],
    [([84,91,88,83,75,60,94], UIColor.greenColor().colorWithAlphaComponent(0.40))]
)

Yashin

Setting multi data

radarChart.set(
    ["shoot", "pass", "dribble", "speed", "power", "stamina", "mentality"],
    [
        ([6,9,5,8,7,4,6], UIColor.greenColor().colorWithAlphaComponent(0.40)),
        ([7,6,7,7,8,8,6], UIColor.blackColor().colorWithAlphaComponent(0.40)),
        ([8,7,8,7,7,9,5], UIColor.redColor().colorWithAlphaComponent(0.40))
    ]
)

Yashin

Requirements

  • iOS 9.0 or later
  • Xcode 7.2

Installation

Carthage

Add the following to your Cartfile:

github "ushisantoasobu/Yashin"

And run carthage update, then add the framework as described in Carthage Readme

CocoaPods

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

pod "Yashin"

Author

ushisantoasobu, [email protected]

License

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

Latest podspec

{
    "name": "Yashin",
    "version": "0.2.0",
    "summary": "Simple Rader Chart written in Swift.",
    "description": "With setting up 2 lines of code and data-list, you can draw simple but cool Rader Chart",
    "homepage": "https://github.com/ushisantoasobu/Yashin",
    "license": "MIT",
    "authors": {
        "ushisantoasobu": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ushisantoasobu/Yashin.git",
        "tag": "0.2.0"
    },
    "social_media_url": "https://twitter.com/ushisantoasobu",
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "Yashin": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This