average(items) {
    if (!items.length) {
      return false;
    }

    let i, len;
    let xSet = new Set();
    let y = 0;
    let count = 0;

    for (i = 0, len = items.length; i < len; ++i) {
      const el = items[i].element;
      if (el && el.hasValue()) {
        const pos = el.tooltipPosition();
        xSet.add(pos.x);
        y += pos.y;
        ++count;
      }
    }

    // No visible items where found, return false so we don't have to divide by 0 which reduces in NaN
    if (count === 0 || xSet.size === 0) {
      return false;
    }

    const xAverage = [...xSet].reduce((a, b) => a + b) / xSet.size;

    return {
      x: xAverage,
      y: y / count
    };
  }
Average mode places the tooltip at the average position of the elements shown