function getTooltipPosition([mouseX, mouseY], [parentChartWidth, parentChartHeight]) {
            let tooltipX, tooltipY;

            if (hasEnoughHorizontalRoom(parentChartWidth, mouseX)) {
                tooltipX = mouseX + tooltipOffset.x;
            } else {
                tooltipX = mouseX - chartWidth - tooltipOffset.x - margin.right;
            }

            if (hasEnoughVerticalRoom(parentChartHeight, mouseY)) {
                tooltipY = mouseY + tooltipOffset.y;
            } else {
                tooltipY = mouseY - chartHeight - tooltipOffset.y - margin.bottom;
            }

            return [tooltipX, tooltipY];
        }
Calculates the desired position for the tooltip
@param  {Number} mouseX             Current horizontal mouse position
@param  {Number} mouseY             Current vertical mouse position
@param  {Number} parentChartWidth   Parent's chart width
@param  {Number} parentChartHeight  Parent's chart height
@return {Number[]}                  X and Y position
@private