I have a problem when I'm populating a TLineSeries with values through code:
Code: Select all
for iC := 0 to slReadingTypes.Count - 1 do
begin
csSeries := TLineSeries.Create(self);
csSeries.Marks.ArrowLength := 1;
csSeries.Pointer.Style := psCircle;
csSeries.Pointer.Visible := true;
csSeries.Pointer.Size := 2;
csSeries.XValues.DateTime := true;
csSeries.Title := slReadingTypes[iC];
fraGTGraphNew.chtGraph.AddSeries(csSeries);
ldsGraph.Filtered := True;
ldsGraph.Filter := 'READTYPE = ''' + slReadingTypes[iC] + '''';
ldsGraph.First;
while not ldsGraph.eof do
begin
csSeries.AddXY(ldsGraph['TESTDATE'],ldsGraph['READING']);
ldsGraph.Next;
end;
end;
Perhaps I'm populating the values at an incorrect time?
The problem is that when I for example add only two dates (i.e. 1/5/2007 and 7/2/2009) the Bottom Axis displays ticks for values which don't exist and is a very undesirable formatting problem (so on the bottom axis instead of only seeing 1/5/2007 and 7/2/2009 and nothing in between I see all dates in between and the Y-Axis values aren't even aligned with the Bottom Axis grid).
Normally when a Client Data Set is assigned to a series it only shows values which exist.
I spend quite a bit of time playing around with the Chart settings, as well as somehow trying to tell the Chart through code to only display ACTUAL values, but I can't seem to be able to figure it out.
Please help, I've been stuck with this problem for quite some time now and need to have it corrected before our next release (which is scheduled very soon).
I can't attach a screen shot "Sorry, the board attachment quota has been reached."
Marcin.