Currently, the spacing logic determines the minimum difference between adjacent X values only within each series, instead of considering the combined set of X values from all series. This leads to miscalculations when series have differing X positions.
The minimum distance should be calculated using the combined set of X values from all series. This ensures a consistent and accurate spacing across all side-by-side series, regardless of the order or distribution of X values within individual series.