Search code examples
ios-charts

remove shadow from HorizontalBarChartView


My HorizontalBarChartView has a drop shadow. How can I remove it?

The chart is setup like this: chartView.userInteractionEnabled = NO; chartView.drawGridBackgroundEnabled = NO; chartView.drawBarShadowEnabled = NO; chartView.drawBordersEnabled = NO; chartView.leftAxis.enabled = NO; chartView.rightAxis.enabled = NO; chartView.drawValueAboveBarEnabled = NO;


Solution

  • Try disable BarChartView.drawBarShadowEnabled

    There is shadowColor in BarChartDataSet too:

    /// 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)