         else
           allX = hx.unique hx.flatten series.map (s) -> s.data().map ({ x }) -> x
           stackHeights = allX.map (x) ->
-            maybeys = series.map (series) -> series.getY x, xscaletype is 'discrete'
+            maybeys = series.map (series) -> series.getY x, xScaleType is 'discrete'
             hx.sum maybeys.filter hx.identity
           {
             yymin: hx.min stackHeights

    # The series must already be tagged before calling this method
    # XXX: band series?
    allSeries = @series()
    xscaletype = @x.scaleType()
    yscaledomainmin = @yScale.domainMin

    initValue = { ymin: 0, ymax: 0 }
    types = hx.groupBy(allSeries, (d) -> d._.type)


  getYStack: (type, group, x, seriesId, start = 0) ->
    allSeries = @series()
    xScaleType = @x.scaleType()
    yScaleDomainMin = @yScale.domainMin

    if group
      yStack = Math.max(yScaleDomainMin, 0)
      maybeys = allSeries.map (series) ->
        if series._.seriesId < seriesId and series.group() == group and series._.type == type
          series.getY(x, xScaleType is 'discrete')
      yStack + hx.sum maybeys.filter hx.identity
    else
      Math.max(start, 0)
