我正在使用google charts for flutter,并尝试在底部中间对齐图例。
我尝试使用outsideJustification: charts.OutsideJustification.middleDrawArea
,但它仍然向左对齐。是否可以在图例中对齐图例?
这就是我所拥有的
charts.NumericComboChart(
data,
animate: true,
// hide Axis
primaryMeasureAxis: noneAxisRenderer,
// hide Axis
secondaryMeasureAxis: noneAxisRenderer,
// hide Axis
domainAxis: noneAxisRenderer,
// Configure the default renderer as a line renderer. This will be used
// for any series that does not define a rendererIdKey.
defaultRenderer: charts.LineRendererConfig(),
// Custom renderer configuration for the point series.
behaviors: [
charts.SeriesLegend(
position: charts.BehaviorPosition.bottom,
cellPadding: EdgeInsets.symmetric(horizontal: 2.0),
outsideJustification: charts.OutsideJustification.middleDrawArea,
),
],
);