Page 1 of 1

TAreaSeries stacked negative number behavior

Posted: Thu Sep 07, 2006 4:42 pm
by 9337315
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!

Posted: Fri Sep 08, 2006 7:30 am
by narcis
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.

Posted: Fri Sep 15, 2006 8:30 am
by narcis
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.

Posted: Wed Sep 20, 2006 7:34 am
by narcis
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.

Posted: Wed Sep 20, 2006 12:24 pm
by 9337315
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

Posted: Wed Sep 20, 2006 12:52 pm
by narcis
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.

Posted: Wed Sep 20, 2006 1:15 pm
by 9337315
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;

Posted: Wed Sep 20, 2006 1:24 pm
by narcis
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.