Sort On Pie Chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
stemlett
Newbie
Newbie
Posts: 10
Joined: Mon Jan 31, 2005 5:00 am

Sort On Pie Chart

Post by stemlett » Mon Jul 28, 2008 3:48 pm

My customers have reported an issue whereby if when showing a Pie Chart, they edit the chart through Series->General and change the Sort ComboBox the values in the legend change but the chart remains unchanged. This doesn't appear to happen with bar charts i.e. the chart gets redraw according to the change in sort order.

Delphi 7, TeeChart 7.07

Best regards,


Simon

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

Post by Narcís » Tue Jul 29, 2008 9:04 am

Hi Simon,

This works fine for me here using v7.12, which is latest TeeChart Pro v7 VCL release avaialable at the client area. Could you please try if v7.12 solves the problem at your end?

Thanks in advance.
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

stemlett
Newbie
Newbie
Posts: 10
Joined: Mon Jan 31, 2005 5:00 am

Post by stemlett » Tue Jul 29, 2008 9:20 am

Hi Narcis,

Is 7.12 available for D7? From the customer downloads section the installer is listed as 7.07 for D7.

Best regards,


Simon

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

Post by Narcís » Tue Jul 29, 2008 9:38 am

Hi Simon,

For Delphi 7 v7.12 is only available as the sourcecode installer. You can install it and run the TeeRecompile tool shipped with it to install the packages at Delphi 7.
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

stemlett
Newbie
Newbie
Posts: 10
Joined: Mon Jan 31, 2005 5:00 am

Post by stemlett » Tue Jul 29, 2008 10:58 am

Hi Narcis,

Thanks for the info, I've now upgraded my installation to 7.12 but I still get the same result. I'm creating a PieSeries in via ReportBuilder and adding series values.

The chart created appears as follows:

Image

I then go to Edit Chart->Series->General and change the sort order to ascending. The legend and the labels on the pie chart change but not the size of pie

Image

If i change the series type to a bar chart then the bars sorted and arranged as I would expect.

Best regards,

Simon

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

Post by Narcís » Tue Jul 29, 2008 11:16 am

Hi Simon,

Can you reproduce it using a TChart component outside ReportBuilder?

Thanks in advance.
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

stemlett
Newbie
Newbie
Posts: 10
Joined: Mon Jan 31, 2005 5:00 am

Post by stemlett » Tue Jul 29, 2008 12:00 pm

Hi Narcis,

I created a new app, dropped a Chart, Button and TeeCommander onto the form and added the following:

uses Series;

procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
begin
Chart1.AddSeries(TPieSeries.Create(Self));
Chart1.SeriesList[0].ValueFormat := '0.00';
Chart1.SeriesList[0].Title := 'Test Series';

Randomize;
for i := 0 to 4 do
begin
Chart1.SeriesList[0].Add(Random(100), Format('Value %d',), clTeeColor);
end;
end;


The chart gets created, go to Series->General and then change the sort order. The labels and legend change, but not the chart. If you change the TPieSeries to TBarSeries, the sorting works as expected. This seems to happen on both D7 and D2007.

Best regards,

Simon

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

Post by Narcís » Tue Jul 29, 2008 12:20 pm

Hi Simon,

Thanks for the information but this works fine for me here. Would you be so kind to send us that project so that we can test it here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
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

stemlett
Newbie
Newbie
Posts: 10
Joined: Mon Jan 31, 2005 5:00 am

Post by stemlett » Tue Jul 29, 2008 12:55 pm

I've uploaded the D2007 version of the application (ChartTest.Zip) via the upload site.

Best regards,


Simon

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

Post by Narcís » Tue Jul 29, 2008 1:08 pm

Hi Simon,

Thanks for the example project. I could reproduce the issue using your .exe. However, building the project here using v7.12 worked fine. I'm going to send you the exe built here and also the project with a little modification displaying the TeeChart version it's using when running it.

I suspect your project and/or your IDE are still referencing old TeeChart versions. You should check that v7.12 packages are enabled at Project->Options->Packages and that their "Bin" and "Lib" folders ar on *top* of the search path list at Project->Options->Directories/Conditionals.
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

stemlett
Newbie
Newbie
Posts: 10
Joined: Mon Jan 31, 2005 5:00 am

Post by stemlett » Wed Jul 30, 2008 8:33 am

Hi Narcis,

I think I must be doing something stupid here but I can't get it to work. I'm pretty certain I've purged any old versions of TeeChart, I've installed the source code and in the environment path I've put the sources folder at the top of the list.

When I do a Build All I see it compile the Tee*.pas files and the only Tee*.pas files are in the sources folder. I've added a label that displays the TeeMsg_Version constant and that shows 'TeeChart Pro v7.12 Win32'

The app still does the same thing. I see the pie chart and when I change the sort order the labels and legend change but not the sizes of the sections of the pie chart.

I haven't received yet the project you mentioned so I can't test that as yet.

Thanks in anticipation.

Best regards,

Simon

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

Post by Narcís » Wed Jul 30, 2008 8:45 am

Hi Simon,

I sent it to your forums profile e-mail address. It may have been blocked since it contained an executable file. Anyway, you can download it from our server.

Please let me know when you have finished downloading it as I'll remove if from the server.

Thanks in advance.
Last edited by Narcís on Wed Jul 30, 2008 9:01 am, edited 1 time in total.
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

stemlett
Newbie
Newbie
Posts: 10
Joined: Mon Jan 31, 2005 5:00 am

Post by stemlett » Wed Jul 30, 2008 9:00 am

Thanks Narcis,

I've got the file now.

Your EXE works fine here but when I compile it here it doesn't, yet the dialog boxes for the version are the same (!)

I've obviously got something wrong here so thanks for all your help and i'll continue to work to track it down.

Best regards,

Simon

stemlett
Newbie
Newbie
Posts: 10
Joined: Mon Jan 31, 2005 5:00 am

Post by stemlett » Wed Jul 30, 2008 5:01 pm

Hi,

I think there is something definately amiss with the installation. If I run the Tee7New EXE from the Examples folder and select the Pie chart this exhibits the same behaviour and this shows V7.12 in the about box.

Best regards,

Simon

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

Post by Narcís » Thu Jul 31, 2008 8:34 am

Hi Simon,

Yes, I think so. You should make a list of all TeeChart packages and search on your machine for old packges and remove them.

BTW: You could also try this in a machine where TeeChart hasn't been installed previously.
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

Post Reply