Skip to content

Instantly share code, notes, and snippets.

@mbcrump
Created March 25, 2014 15:38
Show Gist options
  • Save mbcrump/9764456 to your computer and use it in GitHub Desktop.
Save mbcrump/9764456 to your computer and use it in GitHub Desktop.
Getting Started ViewController.m File
//
// ViewController.m
// GettingStarted
//
// Created by Michael Crump on 03/25/14.
// Copyright (c) 2013 Michael Crump. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
NSMutableArray *randomData = [[NSMutableArray alloc] init];
for (int i=0; i<10; i++) {
[randomData addObject:[[TKChartDataPoint alloc] initWithX:@(i) Y:@(arc4random()%300)]];
}
TKChartLineSeries *lineSeries = [[TKChartLineSeries alloc] initWithItems:randomData];
_chartView.allowAnimations = YES;
_chartView.title.hidden = NO;
_chartView.title.text = @"Getting Started";
[_chartView addSeries: lineSeries];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment