Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 264

Summary: [TV52016090] There is a customer suggesting a change in TeeDBCrossTab.pas. Right n...
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: ChartAssignee: Steema Issue Manager <issuemanager>
Status: CONFIRMED ---    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2013-11-20 10:35:18 EST
There is a customer suggesting a change in TeeDBCrossTab.pas. Right now, when there is a point at a given XValue for one of the series but not for another series, a 0 value is being added. The customer suggests to add a null point for those "empty" values.
http://www.teechart.net/support/viewtopic.php?f=3&t=13119
At TeeDBCrossTab.pas, starting line 305, where says:
                if tmpPoint=-1 then
                begin
                  tmpSeries.Add(tmpValue,tmpLabel,clTeeColor);
                  with Series.ParentChart do
                  for t:=0 to SeriesCount-1 do
                  if tmpSeries<>Series[t] then
                     if tmpSeries.Count>Series[t].Count then
                        for tt:=1 to (tmpSeries.Count-Series[t].Count) do
                        begin
                           Series[t].Add(0,tmpLabel);
                        end;
                end
                else
                begin
                  With tmpSeries.MandatoryValueList do
                  case Formula of
                    gfCount,
                    gfSum: Value[tmpPoint]:=Value[tmpPoint]+tmpValue;
                    end;
                  end;
                end;

He suggests to change it for:
                if tmpPoint=-1 then
                begin
                  tmpSeries.Add(tmpValue,tmpLabel,clTeeColor);
                  with Series.ParentChart do
                  for t:=0 to SeriesCount-1 do
                  if tmpSeries<>Series[t] then
                     if tmpSeries.Count>Series[t].Count then
                        for tt:=1 to (tmpSeries.Count-Series[t].Count) do
                        begin
                           Series[t].AddNull(TmpLabel); // Occupy it with a NULL value
                        end;
                end
                else
                begin
                  With tmpSeries.MandatoryValueList do
                  case Formula of
                    gfCount,
                    gfSum:begin
                      Value[tmpPoint]:=Value[tmpPoint]+tmpValue;
                      tmpSeries.ValueColor[tmpPoint]:=clTeeColor;//now this should be a valid value
                    end;
                  end;
                end;
And also at line 284 it should be:
                      for t:=0 to Series.Count-1 do
                          tmpSeries.AddNULL(Series.Labels[t]);
 [created:2012-03-16T15:58:12.000+01:00 reported by:yeray@steema.com reported in version:2011.04.41118 (TeeChart VCL)]