Changing origin for sidestacked bars

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Andrew S
Newbie
Newbie
Posts: 42
Joined: Wed Jul 28, 2004 4:00 am

Changing origin for sidestacked bars

Post by Andrew S » Mon Jul 31, 2006 9:04 pm

I am using TeeChart Pro 7.06. I can't figure out how to change the origin of a chart containing horizontal stacked bars.

Using non-stacked bars it's simply a matter of setting Series.UseYOrigin := true and Series.YOrigin := -100 (for example). But when I introduce a stack, the origin seems to have little to no effect. Any suggestions as to why? I would like to have two stacked horizontal bar series, and have the lower bar's origin somewhere around -95.

Thanks,

-A

stark
Newbie
Newbie
Posts: 10
Joined: Wed Jul 26, 2006 12:00 am
Location: Girona / Catalunya

Post by stark » Tue Aug 01, 2006 8:29 am

Hello Andrew S,

I tried to reproduce your problem. For me this works fine:

Code: Select all

Series2.UseYOrigin := true;
Series2.YOrigin := -100    ;
Series1.UseYOrigin := true  ;
Series1.YOrigin := -100    ;
Series1.FillSampleValues(2);
Series2.FillSampleValues(2);
Maybe I miss understood your question. Let use know if there is any further information helping use to help you.

Alex

Steema Crew

Andrew S
Newbie
Newbie
Posts: 42
Joined: Wed Jul 28, 2004 4:00 am

Post by Andrew S » Tue Aug 01, 2006 1:30 pm

A slight modification to your code shows exactly what I'm asking...

Code: Select all

  Series2.UseYOrigin := true;
  Series2.YOrigin := -100;
  Series2.StackGroup := 1;
  Series2.MultiBar := mbStacked;
  Series1.UseYOrigin := true;
  Series1.YOrigin := -100;
  Series1.Stackgroup := 1;
  Series1.MultiBar := mbStacked;
  Series1.FillSampleValues(2);
  Series2.FillSampleValues(2);
Notice that, even though the bottomaxis' minimum has been modified, the stack still originates at 0?

-A

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Aug 01, 2006 2:11 pm

Hi Alex,

yes, you're correct, it still not prepared to be used with Stack and negative YOrigin, I've adde this on our defect/wish list to be considered for the next maintenance releases.

Andrew S
Newbie
Newbie
Posts: 42
Joined: Wed Jul 28, 2004 4:00 am

Post by Andrew S » Tue Aug 01, 2006 2:18 pm

I notice in the release notes for 7.07 that it mentions improvements to the way stacked bars are drawn. Does this include my issue, or is that going to be a future release?

-A

Post Reply