function getNearestDataPoint(mouseX) {
            let adjustedMouseX = mouseX - margin.left,
                epsilon = xScale2.bandwidth(),
                nearest = [];

            layers.forEach(function (data) {
                let found = data.values.find((d2) => Math.abs(adjustedMouseX >= xScale(d2[nameLabel]) + xScale2(d2[groupLabel])) && Math.abs(adjustedMouseX - xScale2(d2[groupLabel]) - xScale(d2[nameLabel]) <= epsilon));

                if (found) {
                    found.values = data.values;
                    found.key = found.name;
                    nearest.push(found);
                }

            });

            return nearest.length ? nearest[0] : undefined;
        }
Finds out the data entry that is closer to the given position on pixels
@param  {Number} mouseX X position of the mouse
@return {obj}        Data entry that is closer to that x axis position