MrWooJ

Adding Scatter methods

PNScatterChart in UIView
  1 +//
  2 +// PNScatterChart.h
  3 +// PNChartDemo
  4 +//
  5 +// Created by Alireza Arabi on 12/4/14.
  6 +// Copyright (c) 2014 kevinzhow. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +#import <QuartzCore/QuartzCore.h>
  11 +#import "PNChartDelegate.h"
  12 +#import "PNScatterChartData.h"
  13 +#import "PNScatterChartDataItem.h"
  14 +
  15 +@interface PNScatterChart : UIView
  16 +
  17 +@property (nonatomic, retain) id<PNChartDelegate> delegate;
  18 +
  19 +/** Array of `ScatterChartData` objects, one for each line. */
  20 +@property (nonatomic) NSArray *chartData;
  21 +
  22 +/** Controls whether to show the coordinate axis. Default is NO. */
  23 +@property (nonatomic, getter = isShowCoordinateAxis) BOOL showCoordinateAxis;
  24 +@property (nonatomic) UIColor *axisColor;
  25 +@property (nonatomic) CGFloat axisWidth;
  26 +
  27 +/** String formatter for float values in y-axis labels. If not set, defaults to @"%1.f" */
  28 +@property (nonatomic, strong) NSString *yLabelFormat;
  29 +
  30 +/** Default is true. */
  31 +@property (nonatomic) BOOL showLabel;
  32 +
  33 +/** Default is 18-point Avenir Medium. */
  34 +@property (nonatomic) UIFont *descriptionTextFont;
  35 +
  36 +/** Default is white. */
  37 +@property (nonatomic) UIColor *descriptionTextColor;
  38 +
  39 +/** Default is black, with an alpha of 0.4. */
  40 +@property (nonatomic) UIColor *descriptionTextShadowColor;
  41 +
  42 +/** Default is CGSizeMake(0, 1). */
  43 +@property (nonatomic) CGSize descriptionTextShadowOffset;
  44 +
  45 +/** Default is 1.0. */
  46 +@property (nonatomic) NSTimeInterval duration;
  47 +
  48 +@property (nonatomic) CGFloat AxisX_minValue;
  49 +@property (nonatomic) CGFloat AxisX_maxValue;
  50 +
  51 +@property (nonatomic) CGFloat AxisY_minValue;
  52 +@property (nonatomic) CGFloat AxisY_maxValue;
  53 +
  54 +- (void) setAxisXWithMinimumValue:(CGFloat)minVal andMaxValue:(CGFloat)maxVal toTicks:(int)numberOfTicks;
  55 +- (void) setAxisYWithMinimumValue:(CGFloat)minVal andMaxValue:(CGFloat)maxVal toTicks:(int)numberOfTicks;
  56 +- (void) setup;
  57 +- (void) drawLineFromPoint : (CGPoint) startPoint ToPoint : (CGPoint) endPoint WithLineWith : (CGFloat) lineWidth AndWithColor : (UIColor*) color;
  58 +
  59 +@end
This diff is collapsed. Click to expand it.