Time on X-Axis with an accuracy upto 1 second

Thread is closed for posting
2 posts, 0 answers
  1. Deepak
    Deepak avatar
    11 posts
    Member since:
    Dec 2014

    Posted 28 Jan 2015 Link to this post

    How can I draw a line graph with X-Axis as timeline ranging for 90 days and accuracy up to 1 second ?

    thanks, Deepak
  2. Jack
    Jack avatar
    2333 posts

    Posted 29 Jan 2015 Link to this post

    Hi Deepak,

    The following code should set the axis precision to 1 second:
    TKChartLineSeries *series = [[TKChartLineSeries alloc] initWithItems:items];
    TKChartDateTimeAxis *axis = [[TKChartDateTimeAxis alloc] initWithMinimum:minDate andMaximum:maxDate];
    axis.majorTickIntervalUnit = TKChartDateTimeAxisIntervalUnitSeconds;
    axis.majorTickInterval = 1;
    axis.allowPan = YES;
    axis.allowZoom = YES;
    series.xAxis = axis;
    [_chart addSeries:series];

    However, it looks like there is an issue when setting the axis manually and when the time interval between two points is larger than the major tick interval unit. I logged the issue in our feedback portal and you can use this link to track the issue status. Your Telerik points are updated.

    Should you have further questions, do not hesitate to ask.


    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.

Back to Top