code: def _SeriesFactory(ser):
      
      xChart_tag = ser.getparent().tag
  
      try:
          SeriesCls = {
              qn('c:areaChart'):     AreaSeries,
              qn('c:barChart'):      BarSeries,
              qn('c:bubbleChart'):   BubbleSeries,
              qn('c:doughnutChart'): PieSeries,
              qn('c:lineChart'):     LineSeries,
              qn('c:pieChart'):      PieSeries,
              qn('c:radarChart'):    RadarSeries,
              qn('c:scatterChart'):  XySeries,
          }[xChart_tag]
      except KeyError:
          raise NotImplementedError(
              'series class for %s not yet implemented' % xChart_tag
          )
  
      return SeriesCls(ser)
docs: Return an instance of the appropriate subclass of _BaseSeries based on the
      xChart element *ser* appears in.