As I said in my reply to your question on
stackoverflow.com (http://
stackoverflow.com/questions/4327712/), you're returning the same value
for X and Y which is what's causing the straight line.
Assuming you meant to use the data index as your X-value and the value
from your dataValue array as the Y-value, I would calculate the plot
space ranges like this:
plotSpace.xRange = [CPPlotRange
plotRangeWithLocation:CPDecimalFromFloat(0.0)
length:CPDecimalFromUnsignedInteger(dataValue.count)];
plotSpace.yRange = [CPPlotRange
plotRangeWithLocation:CPDecimalFromFloat(min)
length:CPDecimalFromFloat(max - min)];
Eric