paintLegend method 
    
      
  
void
paintLegend(
 - Context context
) 
    
    
  Implementation
  @protected
void paintLegend(Context context) {
  if (legendPosition != PieLegendPosition.none && _legendWidget != null) {
    if (_legendAnchor != null &&
        _legendPivot != null &&
        _legendStart != null) {
      context.canvas
        ..saveContext()
        ..moveTo(_legendStart!.x, _legendStart!.y)
        ..lineTo(_legendPivot!.x, _legendPivot!.y)
        ..lineTo(_legendAnchor!.x, _legendAnchor!.y)
        ..setLineWidth(legendLineWidth)
        ..setLineCap(PdfLineCap.round)
        ..setLineJoin(PdfLineJoin.round)
        ..setStrokeColor(legendLineColor)
        ..strokePath()
        ..restoreContext();
    }
    _legendWidget!.paint(context);
  }
}