Page 1 of 1

Changing origin for sidestacked bars

Posted: Mon Jul 31, 2006 9:04 pm
by 9233315
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

Posted: Tue Aug 01, 2006 8:29 am
by 9531990
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

Posted: Tue Aug 01, 2006 1:30 pm
by 9233315
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

Posted: Tue Aug 01, 2006 2:11 pm
by Pep
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.

Posted: Tue Aug 01, 2006 2:18 pm
by 9233315
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