Page 1 of 2

Bug in Anit-Alias tool when using pie chart in 2D mode

Posted: Thu Feb 05, 2009 12:29 pm
by 10049140
Hi.

When I use the anti-alias tool in my pie chart a switch to 2D mode, the chart is looking strange:

Image
The borders of the slice do not match correctly.

Im using TeeChart V8.04.

Is this a know issue?
Is there a workaround or when will this be fixed?

Thanks!

Posted: Thu Feb 05, 2009 2:42 pm
by yeray
Hi marder,

Yes you are right. I've added it to the wish list to be fixed as soon as possible (TV52013843).

In the meanwhile, you could use this as workaround:

Code: Select all

  Chart1.View3D := true;
  Chart1.Aspect.Elevation := 0;

Posted: Thu Feb 05, 2009 2:54 pm
by 10049140
Hi Yeray.

Ok, this workaround works fine.
Just like it should look like in 2D mode :wink:

Thanks!

Re: Bug in Anit-Alias tool when using pie chart in 2D mode

Posted: Fri Nov 11, 2011 10:50 am
by 10049140
Hi.

I just updated to TeeChart Pro V2011 and noticed that this issue is still not fixed.
Even worse is, that the workaround you offered (whish worked perfectly with TeeChart Pro V8) dose no longer work
Image

The chart looks like this with TeeChart Pro V8:
Image

When I remove the workaround and set just 3DView to False, I still see the issue that I initially reported in this ticket:
Image

Could you please tell me why my initial reported issue has not been fixed in the last 2 years?
Also, could you provide me a workaround that I should use in TreeChart Pro V2011?

Thanks and best regards.

Re: Bug in Anit-Alias tool when using pie chart in 2D mode

Posted: Mon Nov 14, 2011 3:09 pm
by yeray
Hello marder,
marder wrote:Could you please tell me why my initial reported issue has not been fixed in the last 2 years?
When we or our customers detect a bug, we add it into a list assigning a priority to it. One of the things that help us to decide what priority to assign to an issue uses to be if there is a workaround that helps the customer to achieve what's desired. But there are other variables affecting the time to close an item in that list such as the complexity of the problem, the study of the possible collateral damages, the number of issues with even higher priority that claims our team attention,...
marder wrote:Also, could you provide me a workaround that I should use in TreeChart Pro V2011?
I've seen setting Chart3DPercent to 1 makes the initial workaround work again:

Code: Select all

  Chart1.View3D := true;
  Chart1.Aspect.Elevation:=0;
  Chart1.Chart3DPercent:=1;
However, it's a quite ugly workaround. Another possibility you may prefer, is to use GDI+ instead of the Antialias tool. GDI+ incorporates the Antialias and doesn't reproduce the bug.

Code: Select all

uses TeeGDIPlus, Series;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.Canvas:=TGDIPlusCanvas.Create;

  Chart1.View3D:=false;
  Chart1.AddSeries(TPieSeries).FillSampleValues();
end;
Anyway, I've incremented the bug priority.

Re: Bug in Anit-Alias tool when using pie chart in 2D mode

Posted: Mon Nov 14, 2011 4:58 pm
by 10049140
Hello Yeray.

Thanks for your fast reply!

The workaround with Chart1.Chart3DPercent := 1dose not work very good.
Both, 3D and 2D charts do not look as smoothly as with TeeChart Pro V8.

Anyway, your other suggestion to us GDI+ canvas work quite well.

Best regards.

Re: Bug in Anit-Alias tool when using pie chart in 2D mode

Posted: Tue Nov 15, 2011 12:01 pm
by 10049140
Hello Yeray.

I encountered 2 other issues when using your suggested workaround with GDI+
Image

1. The background shadow of the chart title is not correctly shown.
This issue does not occur without the suggested workaround.

2. The back-wall of the grey slice is shown/painted over the green slice.
This issue seems to occur even without the suggested workaround. (Should I open a new post for this?)

Are these known issues?
Is there a workaround/fix for these issues?

Thanks and best regards.

Re: Bug in Anit-Alias tool when using pie chart in 2D mode

Posted: Wed Nov 16, 2011 12:09 pm
by yeray
Hello marder,
marder wrote:1. The background shadow of the chart title is not correctly shown.
This issue does not occur without the suggested workaround.
I'm trying to reproduce it with the following code but I can't.

Code: Select all

uses TeeGDIPlus;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.Canvas:=TGDIPlusCanvas.Create;

  Chart1.Title.Transparent:=false;
end;
Could you please modify the code above so we can reproduce the problem here in a simple application?
Thanks in advance.
marder wrote:2. The back-wall of the grey slice is shown/painted over the green slice.
This issue seems to occur even without the suggested workaround. (Should I open a new post for this?)
I'm afraid this is a known problem [TV52013467]. It's not a trivial problem that would probably need a complete redesign of the series to be fixed.

Re: Bug in Anit-Alias tool when using pie chart in 2D mode

Posted: Wed Nov 16, 2011 2:29 pm
by 10049140
Hello Yeray.

Related to 1.
Add the following line in order to reproduce this issue:

Code: Select all

Chart1.Title.Shadow.Transparency := 0;
Anyway, this is no critical issue. I set my shadow transparency to different value to fix this.

Related to 2.
I cannot reproduce this issue with my former version (TeeChart Pro V8). This is really annoying, since we want to update to Delphi XE2 and therefor need the V2011 of TeeChart.
Could you please tell me when this issue occurs, since it seems to be not always reproducible (seems to be related to the number of slice, their size and the rotation of the chart).

Best regards.

Re: Bug in Anit-Alias tool when using pie chart in 2D mode

Posted: Wed Nov 16, 2011 4:04 pm
by yeray
Hello Marder,
marder wrote:Related to 1.
Add the following line in order to reproduce this issue:

Code: Select all

    Chart1.Title.Shadow.Transparency := 0;
Anyway, this is no critical issue. I set my shadow transparency to different value to fix this.
I haven't still been able to reproduce it here with the code below:

Code: Select all

uses TeeGDIPlus;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.Canvas:=TGDIPlusCanvas.Create;
  Chart1.Title.Transparent:=false;
  Chart1.Title.Shadow.Transparency:=0;
end;
Note in XE you'll have to add "VCLTee.TeeGDIPlus" instead of just "TeeGDIPlus". But I can't reproduce it neither in D7 or DXE2.
marder wrote:Related to 2.
I cannot reproduce this issue with my former version (TeeChart Pro V8). This is really annoying, since we want to update to Delphi XE2 and therefor need the V2011 of TeeChart.
Could you please tell me when this issue occurs, since it seems to be not always reproducible (seems to be related to the number of slice, their size and the rotation of the chart).
It's not easy to determine the exact conditions where this happens. As you said it depends on many factors. Doing some tests I think we can say that this seems to happen when a slice is drawn from an angle between 0º and 90º, and to an angle equal to 180º or equal to 360º.

Re: Bug in Anit-Alias tool when using pie chart in 2D mode

Posted: Fri Nov 18, 2011 1:14 pm
by 10049140
Hi Yeray.
But I can't reproduce it neither in D7 or DXE2.
I have seen this behavior with Delphi 2010 (latest version).
I had the Title.Shadow.Transparency := 0 set in the DFM file itself not in source code, but I don't think that this matters.
Maybe this is related to some other settings of Title.Shadow, however setting the transparency to any other value than 0 resolves this issue.
It's not easy to determine the exact conditions where this happens.
Ok. I will now just leave this as it and hope that there is not too much complains about this :wink:
Could you please post if there are any news related to this issue (workaround or fix)?

best regards.

Re: Bug in Anit-Alias tool when using pie chart in 2D mode

Posted: Fri Nov 18, 2011 3:33 pm
by 10049140
Dear Yeray.

Sorry, to bother you again, but when using your workaround with "TGDIPlusCanvas.Create()" in my FormCreate event I get an access violation when using this in Delphi XE2 with the pre-release source code edition (from October 04, 2011)

Call stack:

Code: Select all

------------------------------------------------------------------------------------------------------------------
|Address |Module               |Unit                  |Class                   |Procedure/Method       |Line     |
------------------------------------------------------------------------------------------------------------------
|Running Thread: ID=6816; Priority=0; Class=; [Main]                                                             |
|----------------------------------------------------------------------------------------------------------------|
|009E0BCA|SpaceObServer_XE2.exe|SearchData.pas        |                        |FilePropertyToViewType |1722[17] |
|00A9525A|SpaceObServer_XE2.exe|GDIPOBJ.pas           |TGPPen                  |Create                 |2999[0]  |
|00A1F871|SpaceObServer_XE2.exe|TeCanvas.pas          |TCanvas3D               |Create                 |5131[1]  |
|00A9524C|SpaceObServer_XE2.exe|GDIPOBJ.pas           |TGPPen                  |Create                 |2999[0]  |
|00C29DD9|SpaceObServer_XE2.exe|TeeGDIPlus.pas        |TGDIPlusCanvas          |Create                 |295[20]  |
|00C29D98|SpaceObServer_XE2.exe|TeeGDIPlus.pas        |TGDIPlusCanvas          |Create                 |275[0]   |
|00C3EBD2|SpaceObServer_XE2.exe|Main.pas              |TMainForm               |FormCreate             |2005[5]  |
This does not occur when I use the binary version of the XE2 prerelease (November 02, 2011)

best regards.

Re: Bug in Anit-Alias tool when using pie chart in 2D mode

Posted: Mon Nov 21, 2011 2:40 pm
by yeray
Hello Marder,
marder wrote:Sorry, to bother you again, but when using your workaround with "TGDIPlusCanvas.Create()" in my FormCreate event I get an access violation when using this in Delphi XE2 with the pre-release source code edition (from October 04, 2011)
Please, give a try to the final v2011.04 release. If you still have this problem, don't hesitate to let us know.

Re: Bug in Anit-Alias tool when using pie chart in 2D mode

Posted: Mon Nov 21, 2011 4:05 pm
by 10049140
Hello Yeray.

Thanks for inform my about the official release!

I'm afraid, but the exception still occurs with the official release (source code edition) for Delphi XE2 Update 2.

Code: Select all

Call Stack Information:
------------------------------------------------------------------------------------------------------------------
|Address |Module               |Unit                  |Class                   |Procedure/Method       |Line     |
------------------------------------------------------------------------------------------------------------------
|Running Thread: ID=4572; Priority=0; Class=; [Main]                                                             |
|----------------------------------------------------------------------------------------------------------------|
|0095B6A2|SpaceObServer_XE2.exe|SearchData.pas        |                        |FilePropertyToViewType |1722[17] |
|00A09892|SpaceObServer_XE2.exe|GDIPOBJ.pas           |TGPPen                  |Create                 |2999[0]  |
|00998ADD|SpaceObServer_XE2.exe|TeCanvas.pas          |TCanvas3D               |Create                 |5181[1]  |
|00A09884|SpaceObServer_XE2.exe|GDIPOBJ.pas           |TGPPen                  |Create                 |2999[0]  |
|00B8D1A1|SpaceObServer_XE2.exe|TeeGDIPlus.pas        |TGDIPlusCanvas          |Create                 |317[20]  |
|00B8D160|SpaceObServer_XE2.exe|TeeGDIPlus.pas        |TGDIPlusCanvas          |Create                 |297[0]   |
|00BA292E|SpaceObServer_XE2.exe|Main.pas              |TMainForm               |FormCreate             |2006[5]  |
(There are some differences in the lines of the call stack now, so I posted it again.)

Please note that this does not occur for Delphi 2010, using the same source.
Best regards.

Re: Bug in Anit-Alias tool when using pie chart in 2D mode

Posted: Tue Nov 22, 2011 10:15 am
by narcis
Hi marder,

Can you please attach a simple example project we can run "as-is" to reproduce the problem here?

Thanks in advance.