         
         updateOffsetWidths()
         
+        #if !TARGET_INTERFACE_BUILDER
         // Animation loop for when the range adapts
         displayLink = CADisplayLink(target: self, selector: #selector(animationUpdate))
         displayLink.addToRunLoop(NSRunLoop.mainRunLoop(), forMode: NSRunLoopCommonModes)
         displayLink.paused = true
+        #endif
         
         isCurrentlySettingUp = false
         

            
            // Need to update the graph points so they are in their right positions for the new viewport.
            // Animate them into position if animation is enabled, but make sure to stop any current animations first.
            dequeueAllAnimations()
            startAnimations()
            
            // The labels will also need to be repositioned if the viewport has changed.

        
        // Create all the GraphPoints which which are used for drawing.
        for i in 0 ..< data.count {
            #if TARGET_INTERFACE_BUILDER
            let value = data[i]
            #else
            let value = (shouldAnimateOnStartup) ? self.range.min : data[i]
            #endif
            
            let position = calculatePosition(i, value: value)
            let point = GraphPoint(position: position)
