Recently I updated from Tee7Pro to Tee8Pro. There is still a bug (was already there in Tee5!

It involves some patches in series.pas and TeEngine.pas.


Regards - Hans
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Code: Select all
Function TBarSeries.DrawSeriesForward(ValueIndex:Integer):Boolean;
begin
Case FMultiBar of
mbNone,
mbSide,
mbSideAll: result:=inherited DrawSeriesForward(ValueIndex);
mbStacked,
mbSelfStack:
begin
{$IFDEF HH_PATCH_TC_STACKED}
result:=not GetVertAxis.Inverted;
{$else}
result:=YValues.Value[ValueIndex]>=YOrigin; { 5.01 }
if GetVertAxis.Inverted then result:=not result;
{$endif}
end;
else
result:=(not GetVertAxis.Inverted);
end;
end;
////////////////////////////////////////////////////////////////
Procedure DrawAllSeriesValue(ValueIndex:Integer);
{$IFDEF HH_PATCH_TC_STACKED}
// These two functions respectively only draw all the positive values and all the negative values
// this allows the Roofs of the barseries to be placed correctly instead of creating M.G.Escher like charts
Procedure TryDrawPosSeries(ASeries:TChartSeries);
begin
With ASeries do
if FActive and (ZOrder=TheSeries.ZOrder) and (ValueIndex<Count) and (MandatoryValueList[ValueIndex]>=0.0) then
DrawValue(ValueIndex)
end;
Procedure TryDrawNegSeries(ASeries:TChartSeries);
begin
With ASeries do
if FActive and (ZOrder=TheSeries.ZOrder) and (ValueIndex<Count) and (MandatoryValueList[ValueIndex]<0.0) then
DrawValue(ValueIndex)
end;
{$ENDIF}
{ If the ASeries parameter has the same "Z" order than the current
series, draw the point }
Procedure TryDrawSeries(ASeries:TChartSeries);
begin
With ASeries do
if FActive and (ZOrder=TheSeries.ZOrder) and (ValueIndex<Count) then
DrawValue(ValueIndex)
end;
var t : Integer;
tmp1 : Integer;
tmp2 : Integer;
Begin
tmp1:=SeriesList.IndexOf(TheSeries);
tmp2:=SeriesCount-1;
{$IFDEF HH_PATCH_TC_STACKED}
// This splits up drawing of series in a negative and a positive phase
// the negative phase is drawn first so the roof tops of negative Bars will
// be overwritten by the bottoms of the positive bars. Also fixes the same
// problem for the area charts
if ValueIndex<TheSeries.Count then
begin
if TheSeries.DrawSeriesForward(ValueIndex) then
begin
for t:=tmp2 downto tmp1 do TryDrawNegSeries(Series[t]);
for t:=tmp1 to tmp2 do TryDrawPosSeries(Series[t]);
end
else
begin
for t:=tmp2 downto tmp1 do TryDrawPosSeries(Series[t]);
for t:=tmp1 to tmp2 do TryDrawNegSeries(Series[t]);
end
end
else
begin
for t:=tmp1 to tmp2 do TryDrawNegSeries(Series[t]);
for t:=tmp1 to tmp2 do TryDrawPosSeries(Series[t]);
end;
{$ELSE}
if ValueIndex<TheSeries.Count then
begin
if TheSeries.DrawSeriesForward(ValueIndex) then
for t:=tmp1 to tmp2 do TryDrawSeries(Series[t])
else
for t:=tmp2 downto tmp1 do TryDrawSeries(Series[t])
end
else for t:=tmp1 to tmp2 do TryDrawSeries(Series[t])
{$endif}
end;
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Code: Select all
Function TBarSeries.DrawSeriesForward(ValueIndex:Integer):Boolean;
begin
Case FMultiBar of
mbNone,
mbSide,
mbSideAll: result:=inherited DrawSeriesForward(ValueIndex);
else
result:=(not GetVertAxis.Inverted);
end;
end;
Code: Select all
{ Draw one single point (ValueIndex) for all Series }
Procedure DrawAllSeriesValue(ValueIndex:Integer);
{ If the ASeries parameter has the same "Z" order than the current
series, draw the point }
Procedure TryDrawPosSeries(ASeries:TChartSeries);
begin
With ASeries do
if FActive and (ZOrder=TheSeries.ZOrder) and (ValueIndex<Count) and (MandatoryValueList[ValueIndex]>=0.0) then
DrawValue(ValueIndex)
end;
Procedure TryDrawNegSeries(ASeries:TChartSeries);
begin
With ASeries do
if FActive and (ZOrder=TheSeries.ZOrder) and (ValueIndex<Count) and (MandatoryValueList[ValueIndex]<0.0) then
DrawValue(ValueIndex)
end;
var t : Integer;
tmp1 : Integer;
tmp2 : Integer;
Begin
tmp1:=SeriesList.IndexOf(TheSeries);
tmp2:=SeriesCount-1;
// This splits up drawing of series in a negative and a positive phase
// the negative phase is drawn first so the roof tops of negative Bars will
// be overwritten by the bottoms of the positive bars. Also fixes the same
// problem for the area charts
if ValueIndex<TheSeries.Count then
begin
if TheSeries.DrawSeriesForward(ValueIndex) then
begin
for t:=tmp2 downto tmp1 do TryDrawNegSeries(Series[t]);
for t:=tmp1 to tmp2 do TryDrawPosSeries(Series[t]);
end
else
begin
for t:=tmp2 downto tmp1 do TryDrawPosSeries(Series[t]);
for t:=tmp1 to tmp2 do TryDrawNegSeries(Series[t]);
end
end
else
begin
for t:=tmp1 to tmp2 do TryDrawNegSeries(Series[t]);
for t:=tmp1 to tmp2 do TryDrawPosSeries(Series[t]);
end;
end;
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
BarSeries1.Clear;
BarSeries2.Clear;
BarSeries3.Clear;
BarSeries2.Add(-5);
BarSeries3.Add(-5);
end;
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Code: Select all
<snip>
if ValueIndex<TheSeries.Count then
begin
if TheSeries.DrawSeriesForward(ValueIndex) then
begin
for t:=tmp2 downto tmp1 do
TryDrawNegSeries(Series[t]);
<snip>
Code: Select all
<snip>
if True then
begin
if TheSeries.DrawSeriesForward(ValueIndex) then
begin
for t:=tmp2 downto tmp1 do
TryDrawNegSeries(Series[t]);
<snip>
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |