Page 1 of 1

Bar chart question

Posted: Thu Apr 12, 2007 7:19 pm
by 6919810
I have a 4 group of 6 series in a bar chart. Each series represent a status.
I need to change the group label on the axis to Q1, Q2, Q3 and Q4 instead of 0, 1, 2 and 3.

How can i code this in VB6.

Thanks

Posted: Fri Apr 13, 2007 9:31 am
by yeray
Hi amadeus,

The code bellow shows you an example of how you can change the labeltext using OnGetAxisLabel event:

Code: Select all

Private Sub TChart1_OnGetAxisLabel(ByVal Axis As Long, ByVal SeriesIndex As Long, ByVal ValueIndex As Long, LabelText As String)
    If Axis = 3 Then
        LabelText = "Q" & CStr(CInt(LabelText) + 1)
    End If
End Sub
If you still have problems with it, tell us how you want your chart with more detail:

- 4 groups with 6 barseries in EACH group?
- You want to show the group names in the BOTTOM axis?
- You want to show the group name for each serie?

Posted: Fri Apr 13, 2007 12:23 pm
by 6919810
Thank's Yeray, that's work fine in VB.

Now i try to execute the same thing in an ASP page.
The chart is export in JPEG with this command.

Set Chart1 = CreateObject("TeeChart.TChart")
-----
-----
Response.BinaryWrite Chart1.Export.asJPEG.SaveToStream

The HTML page who call my asp page work fine and the chart is OK but not the Group name. I need to change the grouping name in ASP.

I'm a newbie in ASP and i don't know how to call ActiveX event in ASP.

Thank's

Posted: Fri Apr 13, 2007 1:45 pm
by narcis
Hi amadeus,

Then, it's most likely that your problem is similar to what's told here.

If this doesn't help please let us know.