2013-07-04 37 views
2

當前我正在參考以下coreplot tutorial來學習條形圖繪圖。顯示沒有選擇的Coreplot條形圖值

因此而呈現出的價值WRT各條用戶必須挖掘各條&終於CPTBarPlotDelegate方法被調用&值顯示

-(void)barPlot:(CPTBarPlot *)plot barWasSelectedAtRecordIndex:(NSUInteger)index { 

} 

但是我期待是不選擇任何酒吧,它應該告訴我所有90度取向的值。

這是可能的。怎麼做 ?

回答

2

使用任何繪圖的數據標籤來標記每個值。設置labelTextStyle以打開基本數字標籤。使用下列屬性自定義標籤:

  • labelOffset
  • labelRotation
  • labelField
  • labelTextStyle
  • labelFormatter
  • labelShadow

如果基本文本標籤不夠用或者您想跳過某些標籤,請使用以下數據源方法之一提供自定義標籤:

-(NSArray *)dataLabelsForPlot:(CPTPlot *)plot recordIndexRange:(NSRange)indexRange; 
-(CPTLayer *)dataLabelForPlot:(CPTPlot *)plot recordIndex:(NSUInteger)idx;