SQLite Data - Timeseries Plot Not Working

Hello. I’ve been trying to make a timeseries plot using SQLite data. I’m using Grafana v8.2.5. The plot is not showing any datapoints, although I can see that the datapoint values are being read as the legend can display the mean, range, and count of datapoints correctly. How could I fix this issue? Also, when I add a tag at the bottom, the time formatted column that I select disappears from the table view. Why would this happen? Thank you for your time!

I figured out. I had to 1) change timestamp to RFC3339 format (e.g, 2006-01-02T15:04:05-07:00), 2) cast data points as real values, and 3) add the timestamp column as a time formatted tag

Example query:

WITH converted AS (
SELECT value_string, substr(ts, 0, 20) || ‘-08:00’ AS datetime FROM data
SELECT datetime, CAST(value_string as REAL) FROM converted ORDER BY datetime ASC