"A generic SChartAxis has been created, use a subclass instead" message (and crash)


#1

I’m just starting with Charts component, and here’s what I’m getting when trying to load data into my chart:

A generic SChartAxis has been created, use a subclass instead
 From: SChartAxis at 0x27160e60, axisRange = (null), defaultRange = (null), maxRange = (null)
 
  I checked my datasource, and all of the points seem to be set properly (xAxis values go from 0 to 249, with 1 increment; values of yAxis are float values from 3rd party source).
 
What's worst, after that last message I'm getting thrown out all the way up to main.m with just 3 backtrace records in main thread and no indication of what might have happened.
 
Being in addition a beginner iOS dev, I'm pretty much lost at this point... Help? :)
(using xCode 4.6, ARC, if that helps..)

#2

Hi,

The error message shows that you are using an SChartAxis. This is an abstract class that you can’t use as a chart’s axis. You need to use a subclass of SChartAxis.

It sounds like in your case you need SChartNumberAxis. Try that instead and hopefully that will be working for you!


#3

Oh many thanks! I switched to SChartNumberAxis and SChartDateTimeAxis (I needed to use date axis as well) - and it all worked. Now that I look at the error message I was getting, it looks so clear and simple. Guess the whole thing crashing got me into a panic mode :slight_smile:

Thanks again! Great product!