如何在底部中心对齐图例

时间:2019-05-05 11:47:45

标签: charts flutter

我正在使用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,
          ),
        ],
      );

导致以下结果: enter image description here

0 个答案:

没有答案