infinum / flutter-charts

Customizable charts library for flutter.
https://pub.dev/packages/charts_painter
MIT License
144 stars 42 forks source link

ValueDecoration Alignment not working with maxBarWidth #43

Closed ABausG closed 1 year ago

ABausG commented 2 years ago
Screenshot 2022-03-23 at 09 04 05

When setting maxBarWidth in the item options the ValueDecoration alignment is not properly aligned anymore.

...
                foregroundDecorations: [
                  ValueDecoration(
                    textStyle: Theme.of(context).textTheme.bodyText2,
                    alignment: Alignment.topCenter,
                  ),
                ],
                itemOptions: BarItemOptions(
                  maxBarWidth: 100,
...
itsJoKr commented 1 year ago

ValueDecoration is deprecated in 3.0. This could be recreated with WidgetDecoration and little bit of math.