Giter VIP home page Giter VIP logo

tkradarchart's Introduction

TKRadarChart

A customizable radar chart in Swift

Swift Version License MIT [CocoaPods](http://cocoapods.org/?q= TKRadarChart) [CocoaPods](http://cocoapods.org/?q= TKRadarChart) Carthage compatible Support

Requirements

  • iOS 8.0+
  • Xcode 8.0
  • Swift 3.0

Installation

CocoaPods

You can use CocoaPods to install TKRadarChart by adding it to your Podfile:

platform :ios, '8.0'
use_frameworks!
pod 'TKRadarChart'

To get the full benefits import TKRadarChart wherever you import UIKit

import UIKit
import TKRadarChart

Carthage

Create a Cartfile that lists the framework and run carthage update. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/TKRadarChart.framework to an iOS project.

github "tbxark/TKRadarChart"

Manually

  1. Download and drop TKRadarChart.swift in your project.
  2. Congratulations!

Usage example

Base

Base Description Demo
Step Background polygon laps(min 1) image image
Row Number of edges of polygon (min 3) image image
Section At the same time show the number of data image image

TKRadarChartConfig

This structure is used for custom charts

    var radius: CGFloat    
    var minValue: CGFloat
    var maxValue: CGFloat

    var showPoint: Bool
    var showBorder: Bool
    var fillArea: Bool
    var clockwise: Bool
    var autoCenterPoint: Bool

TKRadarChartDataSource

This protocol represents the data model object. as such, it supplies no information about appearance

protocol TKRadarChartDataSource: class {
    func numberOfStepForRadarChart(radarChart: TKRadarChart) -> Int
    func numberOfRowForRadarChart(radarChart: TKRadarChart) -> Int
    func numberOfSectionForRadarChart(radarChart: TKRadarChart) -> Int

    func titleOfRowForRadarChart(radarChart: TKRadarChart, row: Int) -> String
    func valueOfSectionForRadarChart(withRow row: Int, section: Int) -> CGFloat
}

TKRadarChartDelegate

This represents the display and behaviour of the TKRadarChart.

protocol TKRadarChartDelegate: class {

    func colorOfTitleForRadarChart(radarChart: TKRadarChart) -> UIColor
    func colorOfLineForRadarChart(radarChart: TKRadarChart) -> UIColor
    func colorOfFillStepForRadarChart(radarChart: TKRadarChart, step: Int) -> UIColor

    func colorOfSectionFillForRadarChart(radarChart: TKRadarChart, section: Int) -> UIColor
    func colorOfSectionBorderForRadarChart(radarChart: TKRadarChart, section: Int) -> UIColor

}

Release History

  • 1.3.1 Upgrade framework config

  • 1.3.0 Support swift 3.0

  • 1.0.1 Complete basic functions, add Cocoapod and Carthage support

Contribute

We would love for you to contribute to TKRadarChart, check the LICENSE file for more info.

Meta

TBXark โ€“ @tbxark โ€“ [email protected]

Distributed under the MIT license. See LICENSE for more information.

https://github.com/TBXark

tkradarchart's People

Contributors

tbxark avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.