Fixed x-axis creation with the function addAxis()

Fix issue #1825