class_docstr: Stacked Bar graph class
docstr: Compute y min and max and y scale and set labels
docstr_tok: ["Compute","y","min","and","max","and","y","scale","and","set","labels"]
code: def _compute(self):
      """Compute y min and max and y scale and set labels"""
      positive_vals, negative_vals = self._get_separated_values()
  
      if self.logarithmic:
          positive_vals = list(
              filter(lambda x: x > self.zero, positive_vals)
          )
          negative_vals = list(
              filter(lambda x: x > self.zero, negative_vals)
          )
  
      self._compute_box(positive_vals, negative_vals)
      positive_vals = positive_vals or [self.zero]
      negative_vals = negative_vals or [self.zero]
  
      self._x_pos = (
          [x / self._len for x in range(self._len + 1)]
          if self._len > 1
          else [0, 1]
      )  # Center if only one value
  
      self._points(self._x_pos)
  
      self.negative_cumulation = [0] * self._len
      self.positive_cumulation = [0] * self._len
  
      if self.secondary_series:
          positive_vals, negative_vals = self._get_separated_values(
              True
          )
          positive_vals = positive_vals or [self.zero]
          negative_vals = negative_vals or [self.zero]
          self.secondary_negative_cumulation = [0] * self._len
          self.secondary_positive_cumulation = [0] * self._len
          self._pre_compute_secondary(positive_vals, negative_vals)
  
      self._x_pos = [(i + 0.5) / self._len for i in range(self._len)]
  
file_path: pygal/pygal/graph/stackedbar.py
imports: from pygal.adapters import none_to_zero
  from pygal.graph.bar import Bar
label_desc: Use image node_id 3 for calling the StackedBar obj's underlying member method code with example usage: obj._compute() without return types