How to change line chart background color on charts_flutter plugin?


I am using charts_flutter to create a line chart, but i have difficulty to change the color of the charts. the background color follow the themes background color, i wany change to white background.

enter image description here


You can use ColorUtil method from dart for doing that:

color: chart.ColorUtil.fromDartColor(Colors.white)

Answered By – Yozmo

Answer Checked By – David Goodson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *