SChart ignoring series made of 0s


#1

I’m trying to create a simple chart. When the dataset is:

@{
   @"Value": @0.0,
   @"Date": @1364828400
 },
@{
   @"Value": @0.0,
   @"Date": @1364914800
  },
@{
   @"Value": @0.0,
   @"Date": @1365001200
 }
]

I receive this error message:

Ignoring range with 0.000000 span
From: SChartNumberAxis at 0xc287030, axisRange = { 0.000000, 0.000000 }, defaultRange = { 0.000000, 0.000000 }, maxRange = { 0.000000, 0.000000 }

and my app gets stuck. No error message. Nothing.

Has anybody seen anything similar?


#2

Hi Claus,

It looks as though that might be a bug. I’ve raised it as an issue that needs to be investigated, but until then, it might be a good idea to try adding a hidden series with a Value above 0 to your chart to force it to calculate a non-zero range.

Jan


#3

My temporary solution is to scan the series and if all values are zero I simply set a standard range [0.0,10.00].
Please keep me posted with updates about the bug fix.

Thanks a lot.