Closed GoogleCodeExporter closed 9 years ago
Hey, please show us your numberForPlot delegate method. I think you return
something like
-(NSNumber *) numberForPlot:(CPPlot *)plot field:(NSUInteger)fieldEnum
recordIndex:(NSUInteger)index {
switch(fieldEnum)
case CPBarPlotFieldBarLocation:
return = index;
whereby you should do a return of index + 0.5;
-> this will center your bar between index and index +1
this is quite useful since touch events also refer to these zones. (a touch
between 0 and 1 will result in a zero)
Original comment by Wrede....@gmail.com
on 8 Jun 2011 at 12:28
This took care of the issue for me, but it feels like a hack. Seems like I'm
feeding the graph false data so it shows up properly. Shouldn't Core Plot just
handle this situation gracefully and adjust accordingly?
Anyway, thanks for the feedback - this is perfect in the meantime.
Original comment by cory.imd...@gmail.com
on 8 Jun 2011 at 8:55
Another possible solution is to change the x plot range to start at -0.5 and
increase the length accordingly. Core Plot does not automatically adjust the
plot range for you.
Original comment by eskr...@mac.com
on 9 Jun 2011 at 1:31
Original issue reported on code.google.com by
cory.imd...@gmail.com
on 8 Jun 2011 at 12:44Attachments: