docs: function() {
        var originalZoomLevel = timeline.computeZoomLevel(minDays, maxDays, width);
        //handle positioning of the overview rectangle post zoom in.
        var overViewScale = d3.time.scale()
          .domain([roundDown(minDays, clinicalTimelineUtil.getDifferenceTicksDays(originalZoomLevel)), roundUp(maxDays, clinicalTimelineUtil.getDifferenceTicksDays(originalZoomLevel))])
          .range([0 + margin.overviewAxis.left, overviewAxisWidth - margin.overviewAxis.right]);
  
        timeline.overviewX(overViewScale(brush.extent()[0].valueOf()));
  
        var xDaysRect = brush.extent()[0].valueOf();
        timeline.zoomFactor((parseInt(width) - parseInt(margin.left) - parseInt(margin.right)) / (parseInt(d3.select(timeline.divId()+" .extent").attr("width"))));
        if (timeline.zoomFactor() > 0) {
          timeline.zoomFactor(Math.min(timeline.zoomFactor(), timeline.computeZoomFactor("days", minDays, maxDays, width)));
        } else {
         timeline.zoomFactor(timeline.computeZoomFactor("days", minDays, maxDays, width));
        }
  
        var zoomLevel = timeline.computeZoomLevel(readOnlyVars.minDays, readOnlyVars.maxDays, timeline.width() * timeline.zoomFactor());
        var tickValues = timeline.getTickValues(readOnlyVars.minDays, readOnlyVars.maxDays, zoomLevel);
        // TODO: Translation post zooming is not entirely correct
        if (xDaysRect > minDays) {
          var xZoomScale = d3.time.scale()
             .domain([tickValues[0], tickValues[tickValues.length-1]])
             .range([margin.left, width * timeline.zoomFactor() - margin.right]);
          timeline.translateX(-xZoomScale(xDaysRect));
        } else {
          timeline.translateX(0);
        }
        $('.'+divId.substr(1)+'-qtip').qtip("hide");
        d3.select(divId).style("visibility", "hidden");
        timeline();
        d3.select(divId).style("visibility", "visible");
        var zoomBtn = d3.select(divId + " svg")
          .insert("text")
          .attr("transform", "translate("+(parseInt(svg.attr("width"))-70)+", "+parseInt(svg.attr("height")-5)+")")
          .attr("class", "timeline-label")
          .text("Zoom out")
          .style("cursor", "zoom-out")
          .attr("id", "timelineZoomOut");
        zoomBtn.on("click", function() {
          timeline.zoomFactor(1);
          timeline.overviewX(margin.overviewAxis.left);
          $('.'+divId.substr(1)+'-qtip').qtip("hide");
          d3.select(divId).style("visibility", "hidden");
          timeline();
          d3.select(divId).style("visibility", "visible");
          chart.scrolledX(null);
          this.remove();
        });
      }