Multiple Custom Axes

TeeChart for ActiveX, COM and ASP
Post Reply
AndrewK
Newbie
Newbie
Posts: 8
Joined: Fri Nov 15, 2002 12:00 am
Contact:

Multiple Custom Axes

Post by AndrewK » Mon Jan 12, 2004 7:56 pm

We're using v5 ( and testing v6) as a server side component for ASP.

I'm trying to create horizontal stacked bar chart with multiple vertical custom axes.
The problem is that the last bar in every vertical is always a line (in v5 ) or a bar 5 times more narrow than the other bars ( v6 ).

Also, it's impossible to correctly set the bar width in percents.

I have the jpg and the tee file if you want to reproduce it.

Is it a known bug ?
Any way around ?

Thanks

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

Post by Pep » Tue Jan 13, 2004 10:06 am

Hi,

>The problem is that the last bar in every vertical is always a line (in v5 ) >or a bar 5
This bug has been fixed in the TeeChart Pro v6

The following code works fine here using the latest TeeChart Pro v6.04. Could you test if it works for you ?

Code: Select all

Private Sub Form_Load()
With TChart1
    For i = 0 To 5
      .AddSeries scHorizBar
      .Series(i).FillSampleValues (6)
      .Series(i).asHorizBar.MultiBar = mbStacked
    Next i
    For i = 0 To 2
      .Series(i).asHorizBar.StackGroup = 1
      .Series(i).asHorizBar.BarWidthPercent = 120
    Next i
    .Axis.Left.StartPosition = 0
    .Axis.Left.EndPosition = 50
    vertaxis1 = .Axis.AddCustom(False)
    .Axis.Custom(vertaxis1).StartPosition = 52
    .Axis.Custom(vertaxis1).EndPosition = 100
    For i = 3 To 5
      .Series(i).VerticalAxisCustom = vertaxis1
      .Series(i).asHorizBar.StackGroup = 2
      .Series(i).asHorizBar.BarWidthPercent = 50
    Next i
End With
End Sub
Josep Lluis Jorge
http://support.steema.com

AndrewK
Newbie
Newbie
Posts: 8
Joined: Fri Nov 15, 2002 12:00 am
Contact:

Post by AndrewK » Tue Jan 13, 2004 11:21 pm

It still doesn't work properly.
It's getting better, though: the last bar ( well, actually the first, I'm sorry ) is visible, but its width definitely not 100%, rather 30-40%

Andrew

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

Post by Pep » Wed Jan 14, 2004 9:24 am

Hi Andrew,

if I comment the lines which modify the BarWidthPercent in my code I see the Chart as below :
[img]http://80.32.235.114/hola/StackedBar.png[/img]

The width is the same for all the bars.

AndrewK
Newbie
Newbie
Posts: 8
Joined: Fri Nov 15, 2002 12:00 am
Contact:

Post by AndrewK » Wed Jan 14, 2004 5:13 pm

Josep,

Yes, I see exactly the same picture as you do.
All bars have the same width, however it is not 100% ( as we need ), it feels like 25%.

You can go to the edit panel and look at the Series/Format/BarWidth, it shows 70% ( which is not true ).
Try to set "100%", all bars will reset the width to 100% except the first bar which remains with approx 50% width.

I can send you the screenshot if you give me your e-mail.

Thanks,
Andrew

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

Post by Pep » Thu Jan 15, 2004 10:07 am

Hi Andrew,

sorry, you're correct. I can see the problem now. I've added it on our defect list to be reviewed for the next maintenance release.

Post Reply