I have read posts about having to swap the X axis and the Y axis when adding data to the Horizontal Bar chart. But everything that I have tried has not worked. When I try to swap the values I get a "Type Mismatch" error.
Is there some type of setting that I need to initiate in order to allow a numeric value to be added to the vertical axis and a text string to be added to the horizontal axis? I have tried both .Add and .AddXY. Any specific examples would be great!
Thanks,
Vince King
Horizontal Bar does not show values
-
- Newbie
- Posts: 1
- Joined: Wed Dec 10, 2003 5:00 am
Re: Horizontal Bar does not show values
Hi Vince King,
The difference is that, as horizontal bars are horizontal, the *length* of the bars are stored in the XValues array, while in the standard Bar series, these are stored in the YValues array.
But when you add your values with the Add method, it woks in the same way in both series. So this works fine:
The difference is that, as horizontal bars are horizontal, the *length* of the bars are stored in the XValues array, while in the standard Bar series, these are stored in the YValues array.
But when you add your values with the Add method, it woks in the same way in both series. So this works fine:
Code: Select all
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scHorizBar
Dim i As Integer
For i = 0 To 4
TChart1.Series(0).Add Rnd * 100, "value nº " + Str$(i), clTeeColor
Next i
End Sub
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |