function getYMax() {
            const uniqueDataPoints = new Set(data.map(getValue));
            const isAllZero = uniqueDataPoints.size === 1 && uniqueDataPoints.has(0);

            if (isAllZero) {
                return 1;
            } else {
                return d3Array.max(data.map(getValue));
            }
        }
Gets the yMax, sets it to 1 if all data points are 0
@return {number} Calculated yMax
@private