You can create dynamic named ranges for this.
Activate the sheet with the source data.
On the Formulas tab of the ribbon, click Name Manager.
Click New...
Enter XValues in the Name box, and enter the following formula in the Refers to box:
=OFFSET($A$1,1,0,COUNTA($A:$A)-1,1)
Click OK.
Click New...
Enter YValues in the Name box, and enter the following formula in the Refers to box:
=OFFSET($B$1,1,0,COUNTA($B:$B)-1,1)
Click OK.
Click Close to close the Name Manager.
Select the chart.
On the Design tab of the ribbon, click Select Data.
Click Edit under Legend Entries (Series).
Clear the Series values box, and enter the following formula:
=Book1.xlsx!YValues
where Book1.xlsx is the name of the workbook.
Click OK.
Click Edit under Horizontal (Category) Axis Labels.
Clear the Axis label range box, and enter the following formula:
=Book1.xlsx!XValues
where again Book1.xlsx is the name of the workbook.
Click OK.
Finally, click OK to close the Select Data Source dialog.
Your chart will now dynamically adjust itself to new data in columns A and B.
Warning: the definition of the named ranges assumes that there are no other data below the source data in columns A and B.