I show a legend on top of a flutter chart with these options:
behaviors: [new charts.SeriesLegend(
desiredMaxRows: 2,
position: charts.BehaviorPosition.top,
outsideJustification: charts.OutsideJustification.middle,
horizontalFirst: true
),
The problem is that the legend does not wrap to a new row when it does not fit on the screen width. How can I make the legend to wrap into a new row?
Regards,
Use desiredMaxColumns instead of desiredMaxRows, or set horizontalFirst: false
[desiredMaxColumns] the max columns to use before laying out items in a new row. By default there is no limit. The max columns created is the smaller of desiredMaxColumns and number of legend entries.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With