Ignore:
Timestamp:
01/02/14 09:22:48 (8 years ago)
Author:
Steve Castellotti <sc@…>
Branches:
master, Servo
Children:
fc960da
Parents:
c1a500d
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • iOS/Orbit/Orbit/controllers/StatisticsViewController.m

    rc1a500d r2246ba0  
    4545   [self configurePlots]; 
    4646   [self configureAxes]; 
     47   // Block for .5 seconds 
     48//   [NSThread sleepForTimeInterval:5]; 
     49//   [self reloadData]; 
    4750} 
    4851 
     
    7679        self.hostView.hostedGraph = graphTop; 
    7780    
    78  
     81    
    7982        // Bottom graph 
    8083        CPTGraph *graphBottom = [[CPTXYGraph alloc] initWithFrame:self.hostViewBottom.bounds]; 
     
    216219        CPTMutableLineStyle *powerSymbolLineStyle = [CPTMutableLineStyle lineStyle]; 
    217220        powerSymbolLineStyle.lineColor = powerColor; 
    218 //      CPTPlotSymbol *powerSymbol = [CPTPlotSymbol ellipsePlotSymbol]; 
    219 //      powerSymbol.fill = [CPTFill fillWithColor:powerColor]; 
    220 //      powerSymbol.lineStyle = powerSymbolLineStyle; 
    221 //      powerSymbol.size = CGSizeMake(3.0f, 3.0f); 
    222 //      powerPlot.plotSymbol = powerSymbol; 
     221   //   CPTPlotSymbol *powerSymbol = [CPTPlotSymbol ellipsePlotSymbol]; 
     222   //   powerSymbol.fill = [CPTFill fillWithColor:powerColor]; 
     223   //   powerSymbol.lineStyle = powerSymbolLineStyle; 
     224   //   powerSymbol.size = CGSizeMake(3.0f, 3.0f); 
     225   //   powerPlot.plotSymbol = powerSymbol; 
    223226    
    224227} 
     
    335338        NSInteger majorIncrement = 100; 
    336339        NSInteger minorIncrement = 50; 
    337         CGFloat yMax = 700.0f;  // should determine dynamically based on max price 
     340        CGFloat yMax = 700.0f;  // should determine dynamically based on max value 
    338341        NSMutableSet *yLabels = [NSMutableSet set]; 
    339342        NSMutableSet *yMajorLocations = [NSMutableSet set]; 
     
    381384                         
    382385                case CPTScatterPlotFieldY: 
    383          //         return [NSDecimalNumber one]; 
    384386         if (index < valueCount) { 
    385                                 return [NSNumber numberWithUnsignedInteger:index]; 
     387            //         return [NSDecimalNumber one]; 
     388            //                          return [NSNumber numberWithUnsignedInteger:index]; 
     389            return [[NSNumber alloc]initWithInt:(random() % 100)]; 
    386390         } 
    387391          
     
    389393        } 
    390394        return [NSDecimalNumber zero]; 
     395} 
     396 
     397-(void)reloadData 
     398{ 
     399   [self.graphTop reloadData]; 
     400   [self.graphBottom reloadData]; 
    391401} 
    392402 
Note: See TracChangeset for help on using the changeset viewer.