Adding space before and after bounding data points on X-axis

Using a custom layout.xaxis.range is probably your best bet.