Is it possble to create this type of graph

TeeChart for ActiveX, COM and ASP
Post Reply
daryl
Newbie
Newbie
Posts: 91
Joined: Thu Sep 09, 2004 4:00 am
Location: UK
Contact:

Is it possble to create this type of graph

Post by daryl » Fri Jul 20, 2007 9:34 am

Is it possble to create this type of graph ?

jpg posted @newsgroup?

pls respond asap

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

Post by Pep » Mon Jul 23, 2007 7:30 am

Hi,

yes, this can be accomplished by using a custom horiz. axis and using stack group property for bar Series. I've post a .tee and jpg example to the attachments newsgroup.

daryl
Newbie
Newbie
Posts: 91
Joined: Thu Sep 09, 2004 4:00 am
Location: UK
Contact:

Post by daryl » Mon Jul 23, 2007 9:32 am

Need a sample code to create custom horizontal axis ...
and also i would like to know whether this kind of creation/grouping can be done for bar graphs ?

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

Post by Pep » Mon Jul 23, 2007 2:49 pm

Hi daryl,

here the code of the example :

Code: Select all

Private Sub Form_Load()
With TChart1
    .Aspect.View3D = False
    For i = 0 To 3
        .AddSeries scBar
        .Series(i).FillSampleValues (5)
        .Series(i).asBar.MultiBar = mbStacked
        .Series(i).Marks.Visible = False
    Next i
    .Series(2).asBar.StackGroup = 1
    .Series(3).asBar.StackGroup = 1
    
    .Series(0).asBar.OffsetPercent = 50
    .Series(1).asBar.OffsetPercent = 50
    .Series(2).asBar.OffsetPercent = -50
    .Series(3).asBar.OffsetPercent = -50
    
    .Axis.Bottom.StartPosition = 0
    .Axis.Bottom.EndPosition = 50
    
    X = .Axis.AddCustom(True)
    .Axis.Custom(X).StartPosition = 50
    .Axis.Custom(X).EndPosition = 100
    
    .Series(2).HorizontalAxisCustom = X
    .Series(3).HorizontalAxisCustom = X
End With
End Sub
The grouping can be assigned for staked bars.

daryl
Newbie
Newbie
Posts: 91
Joined: Thu Sep 09, 2004 4:00 am
Location: UK
Contact:

Post by daryl » Tue Jul 24, 2007 11:23 am

thanks for the information ,it was really great help

i was able to split the bottom axis , but the datatable is not been splitted ...

posted jpg will show wat i meant with respect to data table ...

is there anyway to split the data table too .. or add data table below the splitted bottom axis ..

pls respond asap , as i need to integrate in my app

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

Post by Pep » Tue Jul 24, 2007 12:22 pm

Hi daryl,

the DataTable tool is not prepared to do this. The best way would be to use two DataTable tools, one with custom position (to be placed on the right of the Chart), iwth OtherSide to True. The problem is that you the tool cannot hide some of the Series (I've added this on our wish list to be considered for further releases).

I've posted the .tee and .jpg file at newsgroups of restulted Chart.

Post Reply