What exactly is the problem?
At least, I can fix the crash of your demo program. I am not very happy about TDbChartSource being in TAChart. It is a very "stupic" datasource, relies heavily on the RecNo and RecordCount properties of the dataset which are known to be very unreliable, in particular with server databases (but even with the TDbf in your example RecordCount returns a wrong value).
It is highly recommended to copy the dataset records into a TListChartSource, either a separate component or the built-in ListSource of the series:
var
NitrogenField: TField;
i: Integer;
begin
// Copy the dataset to a ListChartSource. Do not use DBChartSource.
NitrogenField := Dbf1.FieldByName('Nitrogen');
Dbf1.First;
i := 1;
while not Dbf1.EoF do
begin
ListChartSource1.Add(i, NitrogenField.AsFloat);
Dbf1.Next;
inc(i);
end;
end;
Since your sample code does not provide a field for the x values, I used a counter variable (i) for x.
After these changes in the FormCreate event (and assigning the ListChartSource1 to the Source property of the series, instead of the DBChartSoruce), your demo no longer crashes.