If you don't need to do any additional processing on the data, there is an even easier way to do this:
- In the Designer, select ChartData2D1 and set its Source to Spreadsheet1
- Set the SpreadsheetXColumn and SpreadsheetYColumn properties to A and B.
- In your blocks, call Spreadsheet1.ReadRange("Sheet1", "A:B")
Once the sheet is read by the app, the chart will redraw automatically.