Shinobi Chart得到“在索引0处系列找不到x轴”错误

时间:2013-11-22 10:11:00

标签: ios charts shinobi

我在我的App中使用了ShinobiChart,我将numberOfSeries设置为1:

  
      
  • - (int)的numberOfSeriesInSChart:(ShinobiChart *)图表{
      返回1;
      }
  •   

我使用SChartDateTimeAxis作为xAxis:

  

SChartDateTimeAxis * xAxis = [[SChartDateTimeAxis alloc] init];

     xAxis.labelFormatter = labelFormatter;
     xAxis.allowPanningOutOfDefaultRange = NO;
     xAxis.style.majorGridLineStyle.showMajorGridLines = NO;
    xAxis.style.majorTickStyle.showTicks = YES;
     xAxis.allowPanningOutOfMaxRange = YES;
    self.lineChart.xAxis = xAxis;

谁有同样的问题?

1 个答案:

答案 0 :(得分:0)

将轴添加到lineChart后,您需要告诉图表重绘:

[self.lineChart redrawChart];