2010-07-01 67 views

回答

4

您應該只需設置繪圖範圍以包含要顯示的負值。例如:

CPXYPlotSpace *plotSpace = (CPXYPlotSpace *)lineChart.defaultPlotSpace; 
plotSpace.yRange = [CPPlotRange plotRangeWithLocation:CPDecimalFromFloat(-10.0f) length:CPDecimalFromFloat(20.0f)]; 
plotSpace.xRange = [CPPlotRange plotRangeWithLocation:CPDecimalFromFloat(-10.0f) length:CPDecimalFromFloat(20.0f)]; 

將顯示在X和Y

值從-10到10