PNLineChart.h 1.33 KB
//
//  PNLineChart.h
//  PNChartDemo
//
//  Created by kevin on 11/7/13.
//  Copyright (c) 2013年 kevinzhow. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "PNChartDelegate.h"


@interface PNLineChart : UIView

/**
 * This method will call and troke the line in animation
 */

- (void)strokeChart;

@property (nonatomic, retain) id<PNChartDelegate> delegate;

@property (nonatomic) NSArray *xLabels;

@property (nonatomic) NSArray *yLabels;

/**
 * Array of `LineChartData` objects, one for each line.
 */
@property (nonatomic) NSArray *chartData;

@property (nonatomic) NSMutableArray *pathPoints;

@property (nonatomic) CGFloat xLabelWidth;

@property (nonatomic) CGFloat yValueMax;

@property (nonatomic) CGFloat yValueMin;

@property (nonatomic) NSInteger yLabelNum;

@property (nonatomic) CGFloat yLabelHeight;

@property (nonatomic) CGFloat chartCavanHeight;

@property (nonatomic) CGFloat chartCavanWidth;

@property (nonatomic) CGFloat chartMargin;



@property (nonatomic) BOOL showLabel;


/**
 *  show CoordinateAxis ornot, Default is not
 */
@property (nonatomic, getter = isShowCoordinateAxis) BOOL showCoordinateAxis;
@property (nonatomic) UIColor *axisColor;
@property (nonatomic) CGFloat axisWidth;

@property (nonatomic, strong) NSString *xUnit;
@property (nonatomic, strong) NSString *yUnit;

@end