Small range value in yaxis not display

2 posts, 0 answers
  1. Raja
    Raja avatar
    1 posts
    Member since:
    Nov 2014

    Posted 05 Mar 2015 Link to this post

    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
  2. Yoanna
    Admin
    Yoanna avatar
    44 posts

    Posted 06 Mar 2015 Link to this post

    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.

     
  3. DevCraft banner
Back to Top