indenpendman / BBStockChartView

An iOS stock chart view, K-Line, volume Line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StockChartView

An iOS stock chart view, K-Line, volume graph.

Screenshots

BBStockchartView is used in project BBAltcoin in AppStore and Android. The iOS source is here.

Installation

Using CocoaPods

Pod "BBStockChartView"

Or add all files in folder "BBStockChartView" to your project. Done!

Usage

See the demo XCode project for details

//init with any size, autolayout
_chartView = [[BBChartView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];

//ChartView add area, area add series
Area* areaup = [[Area alloc] init];
Area* areadown = [[Area alloc] init];
BarSeries* bar = [[BarSeries alloc] init];
StockSeries* stock = [[StockSeries alloc] init];
[areaup addSeries:stock];
[areadown addSeries:bar];

// add data to bar and stock
// [stock addPoint:]
[self.chartView addArea:areaup];
[self.chartView addArea:areadown];
// two area's height ratio
[self.chartView setHeighRatio:0.3 forArea:areadown];

// set any color you like
[BBTheme theme].barBorderColor = [UIColor clearColor];
[BBTheme theme].xAxisFontSize = 11;

// begin to show the view animated
[self.chartView drawAnimated:YES];

About

An iOS stock chart view, K-Line, volume Line

License:MIT License


Languages

Language:Objective-C 85.4%Language:Ruby 14.6%