docs: function (boxWidth, boxHeight, point) {
  
              var chart = this.chart,
                distance = this.distance,
                ret = {},
                swapped,
                first = ['y', chart.chartHeight, boxHeight, point.plotY + chart.plotTop],
                second = ['x', chart.chartWidth, boxWidth, point.plotX + chart.plotLeft],
              // The far side is right or bottom
                preferFarSide = point.ttBelow || (chart.inverted && !point.negative) || (!chart.inverted && point.negative),
                /**
                 * Handle the preferred dimension. When the preferred dimension is tooltip
                 * on top or bottom of the point, it will look for space there.
                 */
                firstDimension = function (dim, outerSize, innerSize, point) {
                    var roomLeft = innerSize < point - distance,
                      roomRight = point + distance + innerSize < outerSize,
                      alignedLeft = point - distance - innerSize,
                      alignedRight = point + distance;
  
                    if (preferFarSide && roomRight) {
                        ret[dim] = alignedRight;
                    } else if (!preferFarSide && roomLeft) {
                        ret[dim] = alignedLeft;
                    } else if (roomLeft) {
                        ret[dim] = alignedLeft;
                    } else if (roomRight) {
                        ret[dim] = alignedRight;
                    } else {
                        return false;
                    }
                },
                /**
                 * Handle the secondary dimension. If the preferred dimension is tooltip
                 * on top or bottom of the point, the second dimension is to align the tooltip
                 * above the point, trying to align center but allowing left or right
                 * align within the chart box.
                 */
                secondDimension = function (dim, outerSize, innerSize, point) {
                    // Too close to the edge, return false and swap dimensions
                    if (point < distance || point > outerSize - distance) {
                        return false;
  
                        // Align left/top
                    } else if (point < innerSize / 2) {
                        ret[dim] = 1;
                        // Align right/bottom
                    } else if (point > outerSize - innerSize / 2) {
                        ret[dim] = outerSize - innerSize - 2;
                        // Align center
                    } else {
                        ret[dim] = point - innerSize / 2;
                    }
                },
                /**
                 * Swap the dimensions
                 */
                swap = function (count) {
                    var temp = first;
                    first = second;
                    second = temp;
                    swapped = count;
                },
                run = function () {
                    if (firstDimension.apply(0, first) !== false) {
                        if (secondDimension.apply(0, second) === false && !swapped) {
                            swap(true);
                            run();
                        }
                    } else if (!swapped) {
                        swap(true);
                        run();
                    } else {
                        ret.x = ret.y = 0;
                    }
                };
  
              // Under these conditions, prefer the tooltip on the side of the point
              if (chart.inverted || this.len > 1) {
                  swap();
              }
              run();
  
              return ret;
  
          }