Closed GoogleCodeExporter closed 8 years ago
Returning nil or [NSNull null] from your datasource tells Core Plot that there
is missing data at that index. This is useful for showing a break in a line
plot, for example. If you return nil for all points, there is no valid data at
any point and the plot will not have anything to draw.
Original comment by eskr...@mac.com
on 13 Jan 2011 at 11:54
I am not returning nil for every data point just for one or two. And I expected
that Core Plot will behave as you wrote. But instead the Plot disappears.
Original comment by stefan.d...@gmail.com
on 14 Jan 2011 at 10:32
I found the problem [CPXYPlotspace scaleToFitPlots] does not work correctly
with [NSNull null] values. This caused by axis range to show a range where the
plot had no values.
Original comment by stefan.d...@runtastic.com
on 27 Jan 2011 at 7:56
Original comment by drewmcco...@mac.com
on 27 Jan 2011 at 8:28
I added some code to remove the nulls during the plot range calculation. Can
you see if that helps by pulling the changes?
Original comment by drewmcco...@mac.com
on 27 Jan 2011 at 8:44
I'm also facing the issue that a plot hides if you return gaps respectively nil
values. My experiences:
I have 3 line plots (1 having no nil values, 1 having the first half nil
values, 1 having at the beginning and at the end nil values) - Core Plot does
only display the plot with no nil values.
As I'm using the latest revision of core plot it seems for me that Drew's
modifications did not solve the problem.
Bernhard
Original comment by bernhard...@gmail.com
on 24 Mar 2011 at 10:40
I just tested this in CPTestApp, and it worked as expected. Returning nil
caused a gap. Returning nil for the first half of the data caused that half to
disappear, but the rest to remain.
When you say you have the latest version, do you have the version from the
mercurial repository? The downloadable release is out of date.
If you do have the very latest version from mercurial (use "hg pull -u" to
update), then you need to examine your data very carefully. For example, are
you accidentally returning nil on every single point?
Original comment by drewmcco...@mac.com
on 25 Mar 2011 at 11:42
I just figured out my problem - I was returning the wrong number of records
(numberOfRecordsForPlot). So I just returned the number of "valid" records -
but I overlooked the nil values. That's why the plot seemed to disappear!
Works all fine now!
Original comment by bernhard...@gmail.com
on 29 Mar 2011 at 6:34
Original comment by eskr...@mac.com
on 30 Jun 2011 at 12:31
Original issue reported on code.google.com by
stefan.d...@gmail.com
on 13 Jan 2011 at 5:27