title: Flutter charts, Place a text at center
body: <p>I am using <a href="https://pub.dev/packages/charts_flutter" rel="nofollow noreferrer">Flutter Charts</a> to create a doughnut chart.
  I want to place a text inside the doughnut, along with a legend.</p>
  
  <p>I tried using a <code>Center Widget</code> inside a <code>Stack Widget</code> but it doesn't put the text at the centre if I add a <code>DatumLegend</code> as a behaviour to the charts. 
  If I remove the legend, it shows the text at the correct position.</p>
  
  <p>My code from charts is:</p>
  
  <pre><code>Stack(
    children: &lt;Widget&gt;[
      charts.PieChart(
        getseriesList(_values),
        animate: true,
        defaultRenderer: charts.ArcRendererConfig(
            arcWidth: 40,
            arcRendererDecorators: [
              charts.ArcLabelDecorator(
                  labelPosition: charts.ArcLabelPosition.outside)
            ]),
        defaultInteractions: true,
        behaviors: [
          charts.DatumLegend(
            position: charts.BehaviorPosition.bottom,
            desiredMaxColumns: 4,
            legendDefaultMeasure: charts.LegendDefaultMeasure.none,
          ),
        ],
      ),
      Center(
        child: Container(
          margin: EdgeInsets.only(top: 4),
          child: Text(
            'CenterText',
            style: TextStyle(
              color: Colors.black38,
              fontWeight: FontWeight.w700,
            ),
          ),
        ),
      ),
    ],
  )
  </code></pre>
  
  <p>Here, I want the <code>99</code> to be placed at the center. 
  <a href="https://i.stack.imgur.com/EI0Pd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EI0Pd.jpg" alt="."></a></p>