multibar side to side grouping

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Stephan
Newbie
Newbie
Posts: 10
Joined: Mon Jan 19, 2004 5:00 am

multibar side to side grouping

Post by Stephan » Thu Oct 25, 2007 3:04 pm

Please have a look on the following example:

Code: Select all

object TChart
  Left = 0
  Top = 42
  Width = 1302
  Height = 598
  Legend.LegendStyle = lsSeries
  Chart3DPercent = 85
  DepthAxis.Title.Angle = 270
  DepthAxis.TitleSize = 19
  DepthAxis.Visible = True
  CustomAxes = <
    item
      Automatic = False
      AutomaticMaximum = False
      AutomaticMinimum = False
      Horizontal = False
      OtherSide = False
      Maximum = 581.164340549829000000
      Title.Visible = False
    end
    item
      Automatic = False
      AutomaticMaximum = False
      AutomaticMinimum = False
      Horizontal = False
      OtherSide = False
      Maximum = 581.164340549829000000
      Title.Visible = False
      ZPosition = 50.000000000000000000
    end>
  LeftAxis.Grid.Visible = False
  LeftAxis.Title.Caption = 'Param 1'
  LeftAxis.Title.Visible = False
  View3DOptions.OrthoAngle = 50
  Zoom.Pen.Mode = pmNotXor
  OnAfterDraw = ch_MaaAfterDraw
  Align = alClient
  BevelOuter = bvNone
  TabOrder = 1
  PrintMargins = (
    15
    28
    15
    28)
  object TBarSeries
    Depth = 3
    Marks.Callout.Brush.Color = clBlack
    Marks.Visible = False
    SeriesColor = clLime
    Title = 'Tier 1 zone "Zone 1"'
    VertAxis = aCustomVertAxis
    Gradient.Direction = gdTopBottom
    MultiBar = mbNone
    XValues.Name = 'X'
    XValues.Order = loAscending
    YValues.Name = 'Bar'
    YValues.Order = loNone
    CustomBarWidth = 40
    CustomVertAxis = 0
    Data = {
      04040000006137C791502982400A496E74657276616C20316137C79150297240
      0A496E74657276616C2032D749B417163768400A496E74657276616C20336137
      C791502962400A496E74657276616C2034}
  end
  object TBarSeries
    Depth = 3
    Marks.Callout.Brush.Color = clBlack
    Marks.Visible = False
    SeriesColor = clLime
    Title = 'Tier 1 zone "Zone 2"'
    VertAxis = aCustomVertAxis
    Gradient.Direction = gdTopBottom
    MultiBar = mbNone
    XValues.Name = 'X'
    XValues.Order = loAscending
    YValues.Name = 'Bar'
    YValues.Order = loNone
    CustomBarWidth = 40
    CustomVertAxis = 0
    Data = {
      040400000000000000000000000A496E74657276616C20310000000000000000
      0A496E74657276616C203200000000000000000A496E74657276616C2033A2C7
      55790FAD64400A496E74657276616C2034}
  end
  object TBarSeries
    Depth = 3
    Marks.Callout.Brush.Color = clBlack
    Marks.Visible = False
    SeriesColor = clBlue
    Title = 'Tier 2 zone "Zone 1"'
    VertAxis = aCustomVertAxis
    Gradient.Direction = gdTopBottom
    MultiBar = mbNone
    XValues.Name = 'X'
    XValues.Order = loAscending
    YValues.Name = 'Bar'
    YValues.Order = loNone
    CustomBarWidth = 40
    CustomVertAxis = 1
    Data = {
      0404000000C3A133B51B496B400A496E74657276616C2031C65AD6CE78236040
      0A496E74657276616C2032C0D61F11624B5B400A496E74657276616C2033E21A
      355580F554400A496E74657276616C2034}
  end
  object TBarSeries
    Depth = 3
    Marks.Callout.Brush.Color = clBlack
    Marks.Visible = False
    SeriesColor = clBlue
    Title = 'Tier 2 zone "Zone 2"'
    VertAxis = aCustomVertAxis
    Gradient.Direction = gdTopBottom
    MultiBar = mbNone
    XValues.Name = 'X'
    XValues.Order = loAscending
    YValues.Name = 'Bar'
    YValues.Order = loNone
    CustomBarWidth = 40
    CustomVertAxis = 1
    Data = {
      040400000011814171B9A22C400A496E74657276616C203111814171B9A21C40
      0A496E74657276616C2032B600814B261713400A496E74657276616C2033933D
      7620611553400A496E74657276616C2034}
  end
end
As You can see, there are two axes with two bar series assigned to each axis. Is it possible to align all series with the same axis side to side? If I set Multibar to mbSide all series are aligned in the same Z-Depth, but each series should remain in the Z-Depth of its axis.

Thanks

Stephan

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

Post by Pep » Wed Oct 31, 2007 1:01 pm

Hi Stephan,

I misunderstood your problem. There's a way to place all the Series at the same zposition , by using the code below :

Chart1.ApplyZOrder := False;
Chart1.Invalidate;

But as, all the Bar series have the same XValues it will show all the Series overlapped.

Stephan
Newbie
Newbie
Posts: 10
Joined: Mon Jan 19, 2004 5:00 am

No overlapping but side to side with different Z-Depths

Post by Stephan » Wed Oct 31, 2007 10:28 pm

Hi Pep!

I dont want the Series to be overlapped.

The bars of the two Series "Tier 2 ..." should be aligned side to side. The bars of the two Series "Tier 1 ..." should be aligned side to side too, but they should remain in the back of the graph with a different Z-Depth, which is set to the axis of these Series.


Stephan

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

Post by Pep » Wed Nov 07, 2007 12:39 pm

Hi Stephan,

I'm afraid this is not going to be possible to do with the latest TeeChart Pro version, there's not a way to specify a zposition for specific groups of Series.

Post Reply