Skip to content

Commit 977d80f

Browse files
LineGraph scalling works.
1 parent ff5a9c6 commit 977d80f

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

GraphKit/Example/ExampleLineGraph.m

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ - (void)viewDidLoad {
2525
self.view.backgroundColor = [UIColor gk_cloudsColor];
2626

2727
[self _setupExampleGraph];
28-
// [self _setupTestingGraph];
28+
// [self _setupTestingGraphLow];
29+
// [self _setupTestingGraphHigh];
2930
}
3031

3132
- (void)_setupExampleGraph {
@@ -48,7 +49,7 @@ - (void)_setupExampleGraph {
4849
[self.graph draw];
4950
}
5051

51-
- (void)_setupTestingGraph {
52+
- (void)_setupTestingGraphLow {
5253

5354
/*
5455
A custom max and min values can be achieved by adding
@@ -71,6 +72,23 @@ - (void)_setupTestingGraph {
7172
[self.graph draw];
7273
}
7374

75+
- (void)_setupTestingGraphHigh {
76+
77+
self.data = @[
78+
@[@1000, @2000, @3000, @4000, @5000, @6000, @10000]
79+
];
80+
81+
self.labels = @[@"2001", @"2002", @"2003", @"2004", @"2005", @"2006", @"2007"];
82+
83+
self.graph.dataSource = self;
84+
self.graph.lineWidth = 3.0;
85+
86+
// self.graph.startFromZero = YES;
87+
self.graph.valueLabelCount = 10;
88+
89+
[self.graph draw];
90+
}
91+
7492
- (void)didReceiveMemoryWarning {
7593
[super didReceiveMemoryWarning];
7694
}

0 commit comments

Comments
 (0)