flutterflutter-charts

How to plot charts on Flutter with DateTime on Axis x


I have to implement a chart on my app that has DateTime values on the x axis. I am currently using fl_chart, but has some open issue regarding charts with DateTime values on the x axis which prevent me from continuing to use this library (#462, #438).

Which library can I use to plot this kid of graph and that is al least a bit customizable on colors and style?


Solution

  • This package syncfusion provides a lot of customization options.

    For your problem, you can choose the type of the axis:

    You can customize the xAxis as a DateTime axis.

    SfCartesianChart(
        primaryXAxis: DateTimeAxis(
            minimum: DateTime(2010),
            maximum: DateTime(2020)
        )
    )