class_docstr: XY Line graph class
docstr: Compute x/y min and max and x/y scale and set labels
code: def _compute(self):
      """Compute x/y min and max and x/y scale and set labels"""
      if self.xvals:
          if self.xrange:
              x_adapter = (
                  reduce(compose, self._x_adapters)
                  if getattr(self, "_x_adapters", None)
                  else ident
              )
  
              xmin = x_adapter(self.xrange[0])
              xmax = x_adapter(self.xrange[1])
  
          else:
              xmin = min(self.xvals)
              xmax = max(self.xvals)
          xrng = xmax - xmin
      else:
          xrng = None
  
      if self.yvals:
          ymin = self._min
          ymax = self._max
  
          if self.include_x_axis:
              ymin = min(ymin or 0, 0)
              ymax = max(ymax or 0, 0)
  
          yrng = ymax - ymin
      else:
          yrng = None
  
      for serie in self.all_series:
          serie.points = serie.values
          if self.interpolate:
              vals = list(
                  zip(
                      *sorted(
                          filter(lambda t: None not in t, serie.points),
                          key=lambda x: x[0],
                      )
                  )
              )
              serie.interpolated = self._interpolate(vals[0], vals[1])
  
      if self.interpolate:
          self.xvals = [
              val[0]
              for serie in self.all_series
              for val in serie.interpolated
          ]
          self.yvals = [
              val[1]
              for serie in self.series
              for val in serie.interpolated
          ]
          if self.xvals:
              xmin = min(self.xvals)
              xmax = max(self.xvals)
              xrng = xmax - xmin
          else:
              xrng = None
  
      # these values can also be 0 (zero), so testing explicitly for None
      if xrng is not None:
          self._box.xmin, self._box.xmax = xmin, xmax
  
      if yrng is not None:
          self._box.ymin, self._box.ymax = ymin, ymax
  
file_path: pygal/pygal/graph/xy.py
imports: from functools import reduce
  from pygal.graph.dual import Dual
  from pygal.graph.line import Line
  from pygal.util import cached_property, compose, ident
label_desc: Use image node_id 5 for calling the XY obj's underlying member method code with example usage: obj._compute() without return types