Rethink how the domain for the plot is calculated.
// Re think in future
export const getDomain = (
detector: PlotRectangle,
): { xAxis: NumericRange; yAxis: NumericRange } => {
const maxAxis = Math.max(detector.upperBound.x, detector.upperBound.y);
const minAxis = Math.min(detector.lowerBound.x, detector.lowerBound.y);
const offset = 0.2 * (maxAxis - minAxis);
const range = new NumericRange(
Math.round(minAxis - offset),
Math.round(maxAxis + offset),
);
return { xAxis: range, yAxis: range };
};