Skip to content

Commit

Permalink
[TIMOB-18092] Updated casting of values
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammaddadu committed Dec 8, 2014
1 parent 7990afe commit 60ab6fa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ios/Classes/TiChartsLinePlotProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ -(void)scatterPlot:(CPTScatterPlot*)plot plotSymbolWasSelectedAtRecordIndex:(NSU

-(NSNumber*)numberForPlot:(CPTPlot*)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index
{
return [self numberForPlot:index forCoordinate:fieldEnum];
return [self numberForPlot:index forCoordinate:(CPTCoordinate)fieldEnum];
}

-(NSNumber*)highlightIndex
{
return NUMINT(highlightSymbolIndex);
return [NSNumber numberWithUnsignedInteger:highlightSymbolIndex];
}

-(void)setHighlightIndex:(id)value
Expand Down
4 changes: 2 additions & 2 deletions ios/Classes/TiChartsPiePlotProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ -(NSNumber*)numberForPlot:(CPTPlot*)plot field:(NSUInteger)fieldEnum recordIndex
if (fieldEnum == CPTPieChartFieldSliceWidth) {
num = [self numberForPlot:index];
} else {
num = [NSNumber numberWithInt:index];
num = [NSNumber numberWithUnsignedInteger:index];
}

return num;
Expand All @@ -103,7 +103,7 @@ -(CPTLayer*)dataLabelForPlot:(CPTPlot *)plot recordIndex:(NSUInteger)index

-(CGFloat)radialOffsetForPieChart:(CPTPieChart *)pieChart recordIndex:(NSUInteger)index
{
if ([explodeSet containsObject:[NSNumber numberWithInt:index]]) {
if ([explodeSet containsObject:[NSNumber numberWithUnsignedInteger:index]]) {
float amt = (float)[TiUtils floatValue:[self valueForUndefinedKey:@"explodeOffset"] def:0.0];
return amt;
}
Expand Down
8 changes: 4 additions & 4 deletions ios/Classes/TiChartsPlotProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ -(NSNumber*)numberForPlot:(NSUInteger)index forCoordinate:(CPTCoordinate)coordin
} else if (coordinate == CPTScatterPlotFieldY) {
return val;
} else {
return [NSDecimalNumber numberWithUnsignedInt:index];
return [NSDecimalNumber numberWithUnsignedInteger:index];
}
}

Expand Down Expand Up @@ -154,7 +154,7 @@ -(void)triggerReconfigure
[self performSelectorOnMainThread:@selector(reconfigurePlot) withObject:nil waitUntilDone:NO];
}

-(void)addData:(NSArray*)values startingAtIndex:(int)index
-(void)addData:(NSArray*)values startingAtIndex:(NSUInteger)index
{
if (values != nil) {
Class dictionaryClass = [NSDictionary class];
Expand Down Expand Up @@ -268,7 +268,7 @@ -(void)notifyOfDataClickedEvent:(NSUInteger)index
{
if ([self _hasListeners:@"dataClicked"]) {
NSDictionary *event = [NSDictionary dictionaryWithObjectsAndKeys:
NUMINT(index),@"index",
[NSNumber numberWithUnsignedInteger:index],@"index",
[self numberForPlot:index],@"value",
plot.identifier,@"name",
nil
Expand All @@ -293,7 +293,7 @@ -(void)notifyOfDataClickedEvent:(NSUInteger)index atPlotPoint:(CGPoint)plotPoint

if ([self _hasListeners:@"dataClicked"]) {
NSDictionary *event = [NSDictionary dictionaryWithObjectsAndKeys:
NUMINT(index),@"index",
[NSNumber numberWithUnsignedInteger:index],@"index",
[self numberForPlot:index],@"value",
self.plot.identifier,@"name",
NUMINT(viewPoint.x),@"x",
Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/TiChartsScatterPlotProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ -(NSNumber*)indexFromViewPoint:(id)args

-(NSDictionary*)dataPointFromIndex:(id)args
{
ENSURE_ARG_COUNT(args,1)
ENSURE_ARG_COUNT(args, 1);
int index = [TiUtils intValue:[args objectAtIndex:0] def:0];

double pts[2];
Expand Down

0 comments on commit 60ab6fa

Please sign in to comment.