It seems that SQLite optimizes the query to deliver only a subset of the entire table. I can see this also when I attach simply a DBGrid to the DataSource and scroll down - whenever I get close to the end of the scrollbar new data are added againd and again. Increasing the PacketRecords loads more records at once. When I set it to 1000 I see the chart fully populated.
But I would not use a TDbChartSource at all. Whenever a datapoint is needed this chart source iterates over all records of the dataset until the data point is found. For the next data point it repeats the entire procedure - again and again until the entire series is populated. This is extremely inefficient - and you'll notice a short delay until the series appears. And when a DBGrid is hooked to the same Datasource you see the active cell moving to the end for example when the chart is zoomed.
It is better to manually iterate over all records once to collect the data points and store them in a TListChartSource - the built-in source is fine (use series.AddXY).
Delete the DbChartSource and put this code into the query's OnAfterOpen event:
procedure TForm1.SQLQuery1AfterOpen(DataSet: TDataSet);
var
TimeField, IrrField: TField;
begin
TimeField := SQLQuery1.FieldByName('Time');
IrrField := SQLQuery1.FieldByName('Irr');
Chart1LineSeries1.BeginUpdate;
try
Chart1LineSeries1.Clear;
while not SQLQuery1.EoF do
begin
Chart1LineSeries1.AddXY(TimeField.AsDateTime, IrrField.AsFloat);
SQLQuery1.Next;
end;
finally
Chart1LineSeries1.EndUpdate;
end;
end;