Pie Chart Drawing

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
B.Braster
Newbie
Newbie
Posts: 8
Joined: Thu Sep 23, 2010 12:00 am

Pie Chart Drawing

Post by B.Braster » Tue Sep 28, 2010 10:27 am

Hi,
I am trying to make the same chart as yours in the gallery PieExploded.png
I've attached my result.
As you can see your image has some differences:
1. Lines between pie's slices has the same color as the slice itself.
2. Lines and color are more smooth.
3. The image has some effects (lighting, gradient or filter)

And I've found the same post at ActiveX forums Pie Chart Drawing.

Can you give me the sample of source code (for Delphi7) so that we can make such effects.

Thanks in advance.
Attachments
PieExploded.png
PieExploded.png (15.76 KiB) Viewed 19942 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Pie Chart Drawing

Post by Narcís » Wed Sep 29, 2010 10:24 am

Hello,

This example in the gallery was created using TeeChart for .NET so there will be rendering differences between VCL and .NET versions of TeeChart. However, TeeChart 2010 has been improved to plot similar charts as you can see at the "What's New?\Welcome!\New in Series\Pie Lighting" example in the new features demo available at TeeChart's program group.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

B.Braster
Newbie
Newbie
Posts: 8
Joined: Thu Sep 23, 2010 12:00 am

Re: Pie Chart Drawing

Post by B.Braster » Mon Oct 04, 2010 3:14 pm

Thanx for the response, it really helped.
However, it brought us a serious problem. The chart window is contained in a DLL which is being used from under the Microsoft Word. Once we load this chart the winword process gets the gdi+ thread which never disappears. Closing Word after that will always freeze the winword window. If we do not use charts, then Word closes correctly.
Please adwise the correct way of using the GDI+ with charts so that it does not freez MS Word.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Pie Chart Drawing

Post by Narcís » Wed Oct 06, 2010 9:51 am

Hi B.Braster,

Have you tried freeing TeeChart's GDI+ canvas object after using it?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

B.Braster
Newbie
Newbie
Posts: 8
Joined: Thu Sep 23, 2010 12:00 am

Re: Pie Chart Drawing

Post by B.Braster » Wed Oct 06, 2010 2:00 pm

Hi.
Yes, I've tried freeing all my objects: TTeeGDIPlus, TChart and Form that contains them.
But it did not help.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Pie Chart Drawing

Post by Sandra » Fri Oct 08, 2010 2:47 pm

Hello B.Baster,

Sorry for the delay. We found this problem before when preparing TeeChart 2010 ActiveX Beta. This is in the bug list with number (TV52015196) and we just fixed it for the VCL version as well. We will send you a test version next week. Could you please, confirm the Delphi version you use?

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

B.Braster
Newbie
Newbie
Posts: 8
Joined: Thu Sep 23, 2010 12:00 am

Re: Pie Chart Drawing

Post by B.Braster » Mon Oct 11, 2010 8:31 am

Hello.
We use Delphi 7.
And we found that this error occurs not only for MS Word.
If the form contains teechart (and uses gdi+) in the library, any application that uses this library freezes.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Pie Chart Drawing

Post by Narcís » Mon Oct 11, 2010 8:45 am

Hello,

Ok, thanks for your reply. I have arranged a test installer for Delphi 7 with latest sources. I'm going to send you an email with the URL to download it.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

B.Braster
Newbie
Newbie
Posts: 8
Joined: Thu Sep 23, 2010 12:00 am

Re: Pie Chart Drawing

Post by B.Braster » Mon Oct 11, 2010 12:49 pm

Hi
It's works ok.

Can we use this test package or it's better download last release from access client page again?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Pie Chart Drawing

Post by Narcís » Mon Oct 11, 2010 12:59 pm

Hello,

There's no inconvenient from our side if you use it. However, there might be some incomplete work in the code and some things may not work as expected. It's just the sources as they were at the moment of building the installer.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

B.Braster
Newbie
Newbie
Posts: 8
Joined: Thu Sep 23, 2010 12:00 am

Re: Pie Chart Drawing

Post by B.Braster » Mon Oct 11, 2010 1:16 pm

Ok, many thanks you for your responses.

B.Braster
Newbie
Newbie
Posts: 8
Joined: Thu Sep 23, 2010 12:00 am

Re: Pie Chart Drawing

Post by B.Braster » Tue Oct 12, 2010 8:24 am

Hi again.
I've found a new problem with Pie/Donut Series.
It occurs depending on rotation angle and values in the series.
See examples in the attachment, please.
Attachments
donut_pie.zip
(338.16 KiB) Downloaded 747 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Pie Chart Drawing

Post by Narcís » Fri Oct 15, 2010 7:54 am

Hello,

I have been able to reproduce the problem here dropping a TChart and a TTeeCommander into a form and using code snippet below and added it (TV52015211) to the defect list to be fixed.

Code: Select all

uses Series, TeeDonut, TeeGDIPlus, TeCanvas;

procedure TForm1.FormCreate(Sender: TObject);
var Series1 : TDonutSeries;
    g       : TGDIPlusCanvas;
begin
  Series1:=TDonutSeries.Create(Self);
  Series1.EdgeStyle:=edFlat;
  Series1.BevelPercent:=30;
  Series1.DonutPercent:=40;
  Series1.AddPie(849, 'Cars');
  Series1.AddPie(51, 'Tables');
  Series1.AddPie(51, 'Phones');

  g:=TGDIPlusCanvas.Create;
  Chart1.Canvas:=g;
  Chart1.AddSeries(Series1);
  Chart1.Chart3DPercent:=50;
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

B.Braster
Newbie
Newbie
Posts: 8
Joined: Thu Sep 23, 2010 12:00 am

Re: Pie Chart Drawing

Post by B.Braster » Wed Oct 20, 2010 6:43 am

Ok, thank you.
We'll wait for the results.

GoToXY
Newbie
Newbie
Posts: 81
Joined: Thu Apr 03, 2008 12:00 am

Re: Pie Chart Drawing

Post by GoToXY » Wed Apr 20, 2011 9:12 pm

I was looking to make the same kind of pie chart that it was on the web site. When i found this thread i must tell you how i was disapointed. Event with the new pie lighting, the pie chart looks plain. One of the pros when i asked my boss to get TeeChart was that it would would looks pretty much nicer than the ony included in Delphi. Looks like i was wrong. And just to make things works, we bought the v8 version. So there is no way to get decent looking pie now.

I wont buy the V2010 because i still think is not as good as it should be (i went to webachive and look at the pie gallery and it was still better than the one in 2010). And maybe you should tell ppl that it isnt a VCL render so ppl wont get angry when they found out.

Office 2007/2010, Adobe Flash Builder, Flash render very sharp looking graphics compare to TeeChart. I think it is time that teechart get a new team member to really work on the output. But It is still the first thing our custom see of us and let me tell you, teechart old style graphics wont be any report for sure. We are willing to pay for an update that will really makes a change.

I don't often get upset about stuff, but this one did. At least, i got the best support i could ever though of. So im less angy :p

Thanks to have heared me and please, do something about the it.

HAve a good day.

Post Reply