         }
         
         
-        
-        
         for bar in newVisibleBars {
             
             let barHeight = maxBarValue > 0 ? bar.totalValue() / maxBarValue * height : 0.0

    }
    
    override func layoutSubviews() {
        clipsToBounds = true
        super.layoutSubviews()
        guard let bars = bars else { return }
//        subviews.forEach({ $0.removeFromSuperview() })
        
        let height = bounds.size.height
        
        //TODO: Does abs here make sense
        //TODO: May need to allow this negative
        
        
        let currentOffset = initialOffset - offset
//        print("Current offset is \(currentOffset)")
//        print("Initial offset is \(initialOffset)")
//        print("Offset is \(offset)")
        let newVisibleBars = visibleBarsForOffset(currentOffset)
        
        
        
        let newVisibleBarsSet = Set(newVisibleBars)
        let existingBars = Set(barToBarViews.keys)
        

            
            let barFrame = CGRect(x: xPosition, y: height - barHeight, width: bar.width, height: barHeight)
            
            let stackedBarView: StackedBarView
            if let existingStackedBarView = barToBarViews[bar] {
                stackedBarView = existingStackedBarView
                stackedBarView.frame = barFrame
            } else {
                stackedBarView = dequeueStackedBarWithFrame()
                
                stackedBarView.frame = barFrame
                stackedBarView.segments = bar.segments
                barToBarViews[bar] = stackedBarView
                addSubview(stackedBarView)
            }
        }

    }
    
    
    private func dequeueStackedBarWithFrame() -> StackedBarView {
        // This should probably sync?
        
        let stackedBarView : StackedBarView
