use null instead of empty object.
const config = { ... axis: { x: null, y: null }, }; <Line {...config} />