google / charts

https://pub.dev/packages/charts_flutter
Apache License 2.0
2.8k stars 1.2k forks source link

How to change format of timestamp in TimeSeriesChart in x-axis ? #741

Closed palicka closed 2 years ago

palicka commented 2 years ago

I'm able to set formatter for timestamp, but it's only applied for some of them, mostly first (15.2). It tries to be clever, and shows only 17 ,19 ,21 but it doesn't look good. Is it possible to apply formatter for all timestamps ? (+ Is it possible to control which timestamps should be displayed ? for example , if I want timestamp for every day, (or week/ year etc...)) Thanks

                  tickFormatterSpec: new charts.AutoDateTimeTickFormatterSpec(
                      day: new charts.TimeFormatterSpec(
                          format: 'd', transitionFormat: 'dd.MM')))

Screenshot 2022-02-20 at 17 53 42