TAreaSeries stacked negative number behavior

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
WCantrall
Newbie
Newbie
Posts: 27
Joined: Mon May 03, 2004 4:00 am
Location: USA
Contact:

TAreaSeries stacked negative number behavior

Post by WCantrall » Thu Sep 07, 2006 4:42 pm

Something has changed between Version 5 and Version 7 (7.07) in how negative numbers in a series is handled in a stacked bar chart. Version 5 works the way I want, version 7 does not work correctly
I have exported metafiles and *.tee files I can upload or email with an exact comparison using the same data.
Please let me know how to proceed.
thanks!

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

Post by Narcís » Fri Sep 08, 2006 7:30 am

Hi WCantrall,

Could you please send us those files via our news://www.steema.net/steema.public.attachments newsgroup? It would be very helpful if you could attach a project we can run "as-is" to reproduce those charts you mention.

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

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

Post by Narcís » Fri Sep 15, 2006 8:30 am

Hi WCantrall,

I'm afraid we will need a demo to reproduce the problem here. Could you please send us an example project we can run "as-is" at the attachments newsgroup?

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

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 Sep 20, 2006 7:34 am

Dear Bill,

Thanks for the project. However, to be able to see which is the exact problem we should be able to see how the chart was created. Would you be so kind to send us an example project we can run "as-is" or some code so that we can see how the chart was created?

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

WCantrall
Newbie
Newbie
Posts: 27
Joined: Mon May 03, 2004 4:00 am
Location: USA
Contact:

Post by WCantrall » Wed Sep 20, 2006 12:24 pm

This seems pretty silly. This is just math. I can't think of any project I could write that would show you anything more than this one.
In a stacked area chart, you are now (with version 7) calculating any negative numbers incorrectly. For example, if the first 2 area series displayed have a stacked Y value of 10.5 at X point number 1 and the third area value at x point one is a -1.5 the stacked Y value should be 9.0! And it should be displayed as 9.0 for both the "line" and the "fill". the color "fill" for series 3 should drop below the value 10 from the previous 2 series. See my example chart from version 5. You instead appear to drop the coordinate for the "line" of area series 3 down to zero at X point 1 and do nothing for the fill area.
So the problem is in the display or code of TAreaSeries. It changed between versions 5 and 7. My calculating of the values for the series has nothing to do with it.
If you insist on another project, and I have already sent one which displays data values which show this behavior, can you please tell me what is wrong with this project? Do you need one with say only 3 areaseries and only 5 x values?
Thanks

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 Sep 20, 2006 12:52 pm

Hi WCantrall,

Thanks for the information. I thing I could reproduce this myself using the code below with 3 stacked area series:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  Series1.Add(5);
  Series1.Add(7);
  Series1.Add(2);
  Series1.Add(4);
  Series1.Add(8);

  Series2.Add(2);
  Series2.Add(1);
  Series2.Add(3);
  Series2.Add(4);
  Series2.Add(5);

  Series3.Add(6);
  Series3.Add(8);
  Series3.Add(3);
  Series3.Add(4);
  Series3.Add(-2);
end;
When customers sends us .tee files, most times don't help much as we need to see how is the chart exactly created. We weren't 100% sure of which the exact problem was, that's why we asked you for an additional project.

Anyway, I've added this issue (TV52011757) to our defect list to be fixed for future releases.
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

WCantrall
Newbie
Newbie
Posts: 27
Joined: Mon May 03, 2004 4:00 am
Location: USA
Contact:

Post by WCantrall » Wed Sep 20, 2006 1:15 pm

Dear Narcis,
thanks! I would suggest this slight change:
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.Add(5);
Series1.Add(7);
Series1.Add(2);
Series1.Add(4);
Series1.Add(8);

Series2.Add(2);
Series2.Add(1);
Series2.Add(3);
Series2.Add(4);
Series2.Add(5);

Series3.Add(6);
Series3.Add(8);
Series3.Add(-2);
Series3.Add(4);
Series3.Add(2);
end;

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 Sep 20, 2006 1:24 pm

Hello WCantrall,

Thanks for the suggestion. In fact I had already played with an example like that. Anyway, I updated this in the bug list.
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