Chart in swift have a black background by default

I'm using the library Charts for Swift and by default it has a black background.

I just updated to version 3.0.2 and still have a default black background behind my chart. I added a UIView in Storyboard and set the class to LineChartView, modules Charts, what do I have to do to remove that black background?

I also have tried doing this:

self.lineChart.backgroundColor = .clear

Upvotes: 2

Views: 507

Answers (1)

Yiyun Tan
Yiyun Tan

Reputation: 21

Add this line in the viewDidLoad function:

self.view.backgroundColor = UIColor.white

Upvotes: 1

Related Questions