Plotting Data in App Inventor from Google Sheets

Hello,

I have a google sheet with x and y coordinate values that I am looking to plot on the Chart element. Everything works up until trying to plot where an issue occurs.

"Error 4101: Invalid Chart Entry Values." It shows the values that I wanted to plot however they are invalid as I believe they are being treated as a string and therefore cannot be plotted is my guess.


image

The next step for the project is for the x and y coords to be sent via bluetooth which will also need to be converted?

You have at least two problems.

You try to process sheet data in the same event where you requested it.

You issue two range requests where you needed just A:B

You must learn to work with tables (lists of lists).

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

If you don't need to do any additional processing on the data, there is an even easier way to do this:

  1. In the Designer, select ChartData2D1 and set its Source to Spreadsheet1
  2. Set the SpreadsheetXColumn and SpreadsheetYColumn properties to A and B.
  3. In your blocks, call Spreadsheet1.ReadRange("Sheet1", "A:B")

Once the sheet is read by the app, the chart will redraw automatically.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.