This is a migrated thread and some comments may be shown as answers.

Small range value in yaxis not display

1 Answer 93 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Raja
Top achievements
Rank 1
Raja asked on 05 Mar 2015, 10:42 AM
Hi,
My value range is between 1.60 to 1.68 ...

TKChartNumericAxis *yAxis = [[TKChartNumericAxis alloc] initWithMinimum:@1.60 andMaximum:@1.68];   
not display y axis values

But if i pass values between 1.60 to 2.60 means ok.

plz assist.. i need to diaplay value in range 1.60 to 1.68

1 Answer, 1 is accepted

Sort by
0
Yoanna
Telerik team
answered on 06 Mar 2015, 08:31 AM
Hi Raja,

I was able to reproduce the described issue. Thank you for reporting it. I logged the issue in our feedback portal and you can use the following link to track its status. I updated also your Telerik points accordingly.

You can work around the issue by multiplying all your values by 100 and working with the new values. Afterwards, modify the text of the labels to your original values by implementing chart:textForAxis:value:atIndex: method of TKChartDelegate.

Consider the following code snippet:
TKChartNumericAxis *yAxis = [[TKChartNumericAxis alloc] init];
    chart.yAxis = yAxis;
    yAxis.range = [TKRange rangeWithMinimum:@(160) andMaximum:@(168)];
    yAxis.majorTickInterval = @1;   
}
 
-(NSString *)chart:(TKChart *)chart textForAxis:(TKChartAxis *)axis value:(id)value atIndex:(NSUInteger)index
{  
    NSNumber* number;
    if(axis == chart.yAxis){
     number = [NSNumber numberWithDouble:[value doubleValue] / 100];
    }
    else{
     number = [NSNumber numberWithDouble:[value doubleValue]];
    }
    return [NSString stringWithFormat:@"%@", number];
}

I hope this helps. If you have any questions do not hesitate to contact us.

Regards,
Yoanna
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Chart
Asked by
Raja
Top achievements
Rank 1
Answers by
Yoanna
Telerik team
Share this question
or