GithubHelp home page GithubHelp logo

easycharts's Introduction

EasyCharts

A simple chart lib used for iOS(Objective-c). :-)

中文说明

Requirements

  • ARC
  • iOS>=8.0
  • iPhone || iPad
  • Xcode 8.0 or later

Features

  • BrokenLineChart
  • PieChart
  • ProgressChart
  • BarGraph
  • RadarMap

Continuously updating ...…

Installation

At present

  • by cloning the project into your repository

Usage

Import header file

#import "EasyCharts.h"

The following describes the basic use of several graphs.

BrokenLineChart

BrokenLineChart now includes :BrokenLineTypeCenterPoint and BrokenLineTypeNormal

BrokenLineTypeNormalIs an ordinary broken line chart BrokenLineTypeCenterPointmade the selected point always centered

Besides BrokenLineType ,There are two more parameters when creating an object,one is frame, the other is object ECBrokenLineConfig ,parameters below:

You can use ECBrokenLineConfig to configure the attributes of the brokenLine charts,Each attribute is set to default values.Of course you can use nil.

@property (nonatomic, strong) UIColor *brokenLineColor;
@property (nonatomic, strong) UIColor *backVeiwLineColor;
@property (nonatomic, strong) UIColor *backVeiwTextColor;
@property (nonatomic, strong) UIColor *backVeiwBackGroupColor;
@property (nonatomic, strong) UIColor *brokenAbscissaColor;

@property (nonatomic, assign) CGFloat minValue;  //default 0
@property (nonatomic, assign) CGFloat maxValue;  //default 100

@property (nonatomic, assign) CGFloat numberOfIntervalLines; //default 5
@property (nonatomic, assign) BrokenLineType brokenLineType;

Delegate is called when the point on the line is clicked.

- (void)brokenLineView:(ECBrokenLineView *)brokenLineView
   selectedAtIndexPath:(NSIndexPath *)indexPath;

Initialization:

 ECBrokenLineView *brokenLineView = [ECBrokenLineView lineViewWithFrame:frame
                                                      withBrokenLineConfig:nil
                                                            brokenLineType:BrokenLineTypeNormal];
    brokenLineView.delegate = self;
    [self.view addSubview:brokenLineView];
 ECBrokenLineView *brokenLineView = [ECBrokenLineView lineViewWithFrame:frame
                                                      withBrokenLineConfig:nil
                                                            brokenLineType:BrokenLineTypeCenterPoint];
    brokenLineView.delegate = self;
    [self.view addSubview:brokenLineView];

Data filling: ( If the value is less than the minimum value, the minimum value is displayed。If the value is greater than the maximum value, the maximum value is displayed;point on both sides filled with dashed lines)

[self.brokenLineView reloadLineViewDataWithPointValveList:self.pointValveList
                                                    titleText:self.pointTextList];

The effect of BrokenLineTypeNormal

EC_lineNormal

The effect of BrokenLineTypeCenterPoint

EC_lineCenterView

ProgressView

Initialization--Just transfer frame.

ECProgressChartView *progressView = [ECProgressChartView progressChartViewWithFrame:frame];
    [self.view addSubview:progressView];

Data filling:

[self.progressView resetProgress:[self createProgress]];

The effect of ProgressView:

EC_lineCenterView

BrokenLineChart && ProgressView

Application scene:

EC_lineCenterView

PieChart

Initialization--Just transfer frame.

 ECPieChartView *pieView = [ECPieChartView pieChartViewWithFrame:CGRectMake(0, 100, ECScreenW, 200)];
    [self.view addSubview:pieView];

Data filling:Three parameters:percentList、colorList、arcTextList]

[pieView drawPieChartWithPercentList:self.percentList
                               colorList:self.colorList
                             arcTextList:self.arcTextList];

The effect of PieChart:

EC_lineCenterView

Communication

  • If you found a bug, and can provide steps to reliably reproduce it, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

easycharts's People

Contributors

foolsong 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.