Giter VIP home page Giter VIP logo

lqwang521 / jecoreplotdigester Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maintiendrai/jecoreplotdigester

0.0 1.0 0.0 2.08 MB

基于CorePlot,简单的环形饼图、柱状图、折线图 的实现,操作简单。JECorePlotDigester is an encapsulation for BarChart、SimplePieChart、 CurvedPlotChat base on CorePlot。

Objective-C 99.28% Ruby 0.35% C 0.14% DTrace 0.01% Shell 0.22%

jecoreplotdigester's Introduction

JECorePlotDigester

基于CorePlot,简单的环形饼图、柱状图、折线图 的实现,操作简单。 JECorePlotDigester is an encapsulation for BarChart、SimplePieChart、 CurvedPlotChat base on CorePlot

prepare

install CorePlot 1.6

pod 'CorePlot', '~> 1.6'

CocoaPods

Dependency Status Reference Status

JECorePlotDigester can be installed using CocoaPods.

pod 'JECorePlotDigester', :head

Usage:

  1. Import header file
#import "JEBarChart.h"
#import "JESimplePieChart.h"
#import "JECurvedPlotView.h"
#import "JEControlChart.h"
  1. JEControlChart.
Objective-C
- (void)testControlChart {

    JEControlChart *plotItem = [[JEControlChart alloc]init];
    NSMutableArray *contentArray = [NSMutableArray array];
    
    int count = 31;
    for ( int j = 0; j < count+1; j++ ) {
        [contentArray addObject:@(0)];
    }
    
    plotItem.plotData = contentArray;
    plotItem.numberOfPoints = 31;
    
    plotItem.plotData1 = contentArray;
    plotItem.numberOfPoints = 31;
    
    UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 100, 320, 150)];
    [self.view addSubview:view];
    
    self.pieChartDetailItem = plotItem;
    [self.pieChartDetailItem renderInView:view withTheme:nil animated:YES];
}
  1. JESimplePie Chart
Objective-C
- (void)testSimplePiechart {
    PlotItem *plotItem = [[JESimplePieChart alloc]init];
    UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 400)];
    [self.view addSubview:view];
    
    ((JESimplePieChart*)plotItem).plotData = @[@20.0, @30.0, @60.0];
    
    self.pieChartDetailItem = plotItem;
    [self.pieChartDetailItem renderInView:view withTheme:nil animated:YES];
}
  1. JEBarChart
Objective-C
- (void)testBarChart {
    PlotItem *plotItem  = [[JEBarChart alloc]init];
    UIView *barView = [[UIView alloc]initWithFrame:CGRectMake(0, 200, 320, 200)];
    [self.view addSubview:barView];
    [_barChartDetailItem renderInView:barView withTheme:[CPTTheme themeNamed:kCPTPlainWhiteTheme] animated:YES];

    self.pieChartDetailItem = plotItem;
    [self.pieChartDetailItem renderInView:barView withTheme:nil animated:YES];

}

License

此SDK采用MIT许可.

###Contact

若您在使用此SDK过程中,遇到任何问题,可以邮件联系我,我的邮箱地址: [email protected]

jecoreplotdigester's People

Contributors

maintiendrai avatar

Watchers

王立权 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.