2015-08-20 171 views
0

我的HorizontalBarChartView有陰影。我怎樣才能刪除它?從Horizo​​ntalBarChartView中刪除陰影

下圖是設置這樣的: chartView.userInteractionEnabled = NO; chartView.drawGridBackgroundEnabled = NO; chartView.drawBarShadowEnabled = NO; chartView.drawBordersEnabled = NO; chartView.leftAxis.enabled = NO; chartView.rightAxis.enabled = NO; chartView.drawValueAboveBarEnabled = NO;

回答

0

嘗試禁用BarChartView.drawBarShadowEnabled

有則shadowColor在BarChartDataSet太:

/// the color used for drawing the bar-shadows. The bar shadows is a surface behind the bar that indicates the maximum value 
public var barShadowColor = UIColor(red: 215.0/255.0, green: 215.0/255.0, blue: 215.0/255.0, alpha: 1.0) 
0

如果您使用的是迅速的,而不是objc,只需更換「 NO'by'false'

chartView.drawBarShadowEnabled = false 

編輯: 從代碼源:

在ChartsDemo例如0​​
/// if set to true, a grey area is drawn behind each bar that indicates the maximum value 
173  @objc open var drawBarShadowEnabled: Bool 

link

//: ### General 
chartView.pinchZoomEnabled   = false 
chartView.drawBarShadowEnabled  = false 
chartView.doubleTapToZoomEnabled = false 
chartView.drawGridBackgroundEnabled = true 
chartView.fitBars     = true 
+0

請提供更多的解釋,從那裏找到的建議,提供虛假的,而不是沒有或文檔鏈接等 –

+0

這取決於您是否使用swift或objc版本的ios-charts(但未指定)。 –