Stacked Multibar 3D

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
HMArnold
Newbie
Newbie
Posts: 3
Joined: Wed May 05, 2010 12:00 am

Stacked Multibar 3D

Post by HMArnold » Thu Aug 26, 2010 12:59 pm

I have an application where I need to be able to show information stacked, like a multibar, but using the Z direction as well.

When I use multiple bars and select multiple stack groups, they all come out side by side on the front plane.

When I use a 3D tower, I get the ability to define values back into the Z direction, but I can't seem to get anything to stack.

What I'm after is something like 2 or more Tower series that stack on top of each other, but then I do that, I get a flat plane for the second series, as shown in the attached jpg.

In the attachment, the entry for the second series was at X=2, Z=2, Y=10, and what I'm looking for is a bar that stacks on top of the X=2, Z=2 value for the first series.

It would actually show at Y=14 because it would be 4 from the first series, then 10 for the second.

I imagine if there is a solution, it is something like multiple bar stack groups, then the ability to assign a Z depth to different groups.

Is there a way to assign a Z depth to specific series?

Suggestions appreciated

Is this something that would be better handled by purchasing a support agreement?

Thanks

Hank
Attachments
Graph Image.jpg
Graph Image.jpg (296.62 KiB) Viewed 2765 times

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

Re: Stacked Multibar 3D

Post by Narcís » Fri Aug 27, 2010 2:49 pm

Hi Hank,

You can achieve something similar to what you request using TBar3DSeries and ZOrder.

Code: Select all

uses Bar3D, Series;

procedure TForm1.FormCreate(Sender: TObject);
const NumRows=10;
      NumColumns=10;
      StackedSeries=2;
var i, j, k: Integer;
begin
  for i:=0 to NumRows-1 do
    for j:=0 to StackedSeries-1 do
      With TBar3DSeries.Create(Self) do
      begin
        Marks.Visible:=False;
        MultiBar:=mbNone;
        BarWidthPercent:=100;
        ZOrder:=i;

        for k:=0 to NumColumns-1 do
          if j=0 then
            AddBar(k, random, 0)
          else
            AddBar(k, random, Chart1[Chart1.SeriesCount-1].YValues[k]);

        ParentChart:=Chart1;
      end;
end;
With TBar3DSeries you need to the stacking manually. You may also be able to achieve something similar combining TBarSeries stacking options with ZOrder too. For example:

Code: Select all

uses Series;

procedure TForm1.FormCreate(Sender: TObject);
const NumRows=10;
      NumColumns=10;
      StackedSeries=2;
var i, j: Integer;
begin
  for i:=0 to NumRows-1 do
    for j:=0 to StackedSeries-1 do
    begin
      With TBarSeries.Create(Self) do
      begin
        BarWidthPercent:=100;
        MultiBar:=mbStacked;
        StackGroup:=i;
        Marks.Visible:=False;
        FillSampleValues(NumColumns);
        ParentChart:=Chart1;
        ZOrder:=i;
      end
    end;
end;
Is this something that would be better handled by purchasing a support agreement?
A Pro Support subscription would give you access to a priority support channel and direct e-mail support so you'd get quicker replies to your technical inquiries. For Pro Support information please have a look at http://www.steema.com/licensing/support ... ng_support.
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

HMArnold
Newbie
Newbie
Posts: 3
Joined: Wed May 05, 2010 12:00 am

Re: Stacked Multibar 3D

Post by HMArnold » Mon Aug 30, 2010 4:40 pm

Works perfectly.

Thank you very much.

Post Reply