def _bar(self, serie, parent, x, y, i, zero, secondary=False):
        """Internal stacking bar drawing function"""
        if secondary:
            cumulation = (
                self.secondary_negative_cumulation
                if y < self.zero else self.secondary_positive_cumulation
            )
        else:
            cumulation = (
                self.negative_cumulation
                if y < self.zero else self.positive_cumulation
            )
        zero = cumulation[i]
        cumulation[i] = zero + y
        if zero == 0:
            zero = self.zero
            y -= self.zero
        y += zero

        width = (self.view.x(1) - self.view.x(0)) / self._len
        x, y = self.view((x, y))
        y = y or 0
        series_margin = width * self._series_margin
        x += series_margin
        width -= 2 * series_margin
        if self.secondary_series:
            width /= 2
            x += int(secondary) * width
            serie_margin = width * self._serie_margin
            x += serie_margin
            width -= 2 * serie_margin
        height = self.view.y(zero) - y
        r = serie.rounded_bars * 1 if serie.rounded_bars else 0
        self.svg.transposable_node(
            parent,
            'rect',
            x=x,
            y=y,
            rx=r,
            ry=r,
            width=width,
            height=height,
            class_='rect reactive tooltip-trigger'
        )
        return x, y, width, height