Skip to content

Simple Radar Chart (or Spider Web) Generator for iOS

Notifications You must be signed in to change notification settings

agbarbosa/RPRadarChart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

RP Radar Chart

This is a simple library for plotting Radar Charts (or Spider Web Charts) in iOS.

Examples (Using random values):

RPRadarChart

RPRadarChart

WARNING

This library is under development, actually is part of an App I'm developing at work, so don't expect it to be finished. I know the code is messy, sorry about that (I'll try to beautify it in the future). Anyway, even if isn't finished you already can:

  • Plot one or more set of floats.
  • Set a different color for each set.
  • Customize how is the chart displayed: - Line width - Dots radius - Show or not values. - Show or not guide lines. - Show or not guide numbers. - Fill or not the drawed area.

Planned features:

  • Addjust values positions if needed.
  • Add a Legend for each data set.
  • Animate a transitions from one data set to another.

Use

Just add RPRadarChart.h and RPRadarChart.m to your project. You can plot something with this few lines:

You can use simple data source protocol to show values on chart such as:

// get number of spokes in radar chart

  • (NSInteger)numberOfSopkesInRadarChart:(RPRadarChart*)chart;

// get number of datas

  • (NSInteger)numberOfDatasInRadarChart:(RPRadarChart*)chart;

// get max value for this radar chart

  • (float)maximumValueInRadarChart:(RPRadarChart*)chart;

// get title for each spoke

  • (NSString*)radarChart:(RPRadarChart*)chart titleForSpoke:(NSInteger)atIndex;

// get data value for a specefic data item for a spoke

  • (float)radarChart:(RPRadarChart*)chart valueForData:(NSInteger)dataIndex forSpoke:(NSInteger)spokeIndex;

// get color legend for a specefic data

  • (UIColor*)radarChart:(RPRadarChart*)chart colorForData:(NSInteger)atIndex;

Licensing

RPRadarChart is licensed under MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

githalytics.com alpha

About

Simple Radar Chart (or Spider Web) Generator for iOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%