Chart for iOS 8 how to match columns to axis.

Thread is closed for posting
3 posts, 0 answers
  1. Daniel
    Daniel avatar
    2 posts
    Member since:
    Oct 2014

    Posted 03 Oct 2014 Link to this post


    Im current using the trial version of the framework for iOS 8 using xCode 6, I was wondering how I would match Column series up to a specific axis.

    I the problem I have is that I need to match Column Series A to yAxis A, and Column Series B to yAxis B. I have tried various methods and also used the documentation, however couldn't find anything to assign Columns to Axis apart from:

      TKChartNumericAxis *axisA = [[TKChartNumericAxis alloc]initWithMinimum:@0 andMaximum:@100];
        axisA.position = TKChartAxisPositionRight;

      TKChartNumericAxis *axisB = [[TKChartNumericAxis alloc]initWithMinimum:@0 andMaximum:@1000];
        axisB.position = TKChartAxisPositionRight;

    And then assigning the series1.yaxis to axis A and the same for series 2 and axis b, Both yAxis have different values, however this is causing the chart to stack the series of columns one on top of the other. Thanks in advance.

  2. Adrian
    Adrian avatar
    174 posts

    Posted 03 Oct 2014 Link to this post

    Hello Daniel,

    Thank you for contacting us.

    Currently clustering of column series in TKChart is possible only if all the series have same y axis. A possible workaround is to set same y axis to both of the series, so they are clustered, and add another y axis to the chart like in the following code snippet:

    TKChartCategoryAxis *xAxis = [[TKChartCategoryAxis alloc] initWithCategories:categories];
    chart.xAxis = xAxis;
    TKChartNumericAxis *leftAxis = [[TKChartNumericAxis alloc] initWithMinimum:@0 andMaximum:@1000];
    leftAxis.position = TKChartAxisPositionLeft;
    [chart addAxis:leftAxis];
    TKChartNumericAxis *rightAxis = [[TKChartNumericAxis alloc] initWithMinimum:@0 andMaximum:@100];
    rightAxis.position = TKChartAxisPositionRight;
    [chart addAxis:rightAxis];
    TKChartColumnSeries *seriesA = [[TKChartColumnSeries alloc] initWithItems:dataPoints];
    TKChartColumnSeries *seriesB = [[TKChartColumnSeries alloc] initWithItems:dataPoints1];
    [chart addSeries:seriesA];
    [chart addSeries:seriesB];

    This issue will be addressed in a future version of UI for iOS. Until then you can vote/comment/follow it in our feedback portal. I updated your Telerik points for this suggestion.

    Please do not hesitate to contact us if you need further assistance.


    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. Daniel
    Daniel avatar
    2 posts
    Member since:
    Oct 2014

    Posted 03 Oct 2014 in reply to Adrian Link to this post

    Thank you, I also tried this but i was not sure if it was correct or not.
Back to Top