Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
double y axis
posted

hi,

Our program has one requirement: we have to support  the double Y axis graph,but i do not know how to make it with nuclios. 

could you give me some ideals about this ?

thank you very much!

双Y轴.jpg
  • 26458
    Offline posted

    Hi, sorry that this post went unanswered for so long.

    Once you have an axis in the chart, moving its labels is only a matter of setting axis.labelsLocation property to one of predefined locations.

    For example, if you add two series with two distinct Y axis keys, your chart will have two Y axes. You can then take one of these axes and change its labelsLocation property.

    [_chart addSeriesForType:[IGColumnSeries class] usingKey:@"column" withDataSource:_dsh firstAxisKey:@"x" secondAxisKey:@"yLeft"];
    [_chart addSeriesForType:[IGLineSeries class] usingKey:@"line" withDataSource:_dsh firstAxisKey:@"x" secondAxisKey:@"yRight"];

    IGNumericYAxis *yRight = (IGNumericYAxis*)[_chart findAxisByKey:@"yRight"];
    yRight.labelsLocation = IGAxisLabelsLocationOutsideRight;