TAChart: Use RecNo as X value if TDbChartSource.FieldX is empty.

Patch by José Mejuto

git-svn-id: trunk@27551 -
This commit is contained in:
ask 2010-10-03 03:03:53 +00:00
parent 67a5cb4020
commit 80b1644c82
2 changed files with 4 additions and 2 deletions

View File

@ -64,7 +64,7 @@
<Version Value="9"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)\"/>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>

View File

@ -192,7 +192,9 @@ begin
ds.Next;
if ds.RecNo <> AIndex then exit;
if FieldX <> '' then
FCurItem.X := ds.FieldByName(FieldX).AsFloat;
FCurItem.X := ds.FieldByName(FieldX).AsFloat
else
FCurItem.X := ds.RecNo;
if FYCount > 0 then begin
FCurItem.Y := ds.FieldByName(FFieldYList[0]).AsFloat;
for i := 0 to High(FCurItem.YList) do