Jump to content
Software FX Community

Series problem

User (Legacy)

Recommended Posts


I try to use ChatFx Client(trial version) for VB and I have problem wich the


When I try load two series only one is loaded but I don't know why.

Show the pic's if you have any doubt.

Thank's in advance.

This is my code:


Private m_ac As DDActiveCube ' Cube

Public Sub ShowChart(ac As DDActiveCube)

Dim iRow As Long, iCol As Long

If ac Is Nothing Then Exit Sub

Set m_ac = ac

If m_ac.SelectionGrid Is Nothing Then Exit Sub

cht.Axis(AXIS_Y).Max = 0 ' Ini for Dinamic

cht.Axis(AXIS_Y2).Max = 0

cht.OpenDataEx COD_VALUES, m_ac.SelectionGrid.ColumnCount, COD_UNKNOWN

cht.OpenDataEx COD_XVALUES, m_ac.SelectionGrid.ColumnCount,


For iCol = 0 To m_ac.SelectionGrid.ColumnCount - 1

For iRow = 0 To m_ac.SelectionGrid.RowCount - 1

If m_ac.SelectionGrid.cell(iRow, iCol).Selected Then

AddCellPoint m_ac.SelectionGrid.cell(iRow, iCol), iRow, iCol

' Draw Function

End If



cht.SerLegBox = True

cht.CloseData COD_VALUES

cht.CloseData COD_XVALUES



End Sub

Private Sub AddCellPoint(cell As ACCell, iRow, iCol)

Dim mbr As ACMember

Dim iLevel As Integer

Dim sRowCaption As String, sColCaption As String

For iLevel = 0 To m_ac.RowAxis.VisibleDepth - 1

Set mbr = cell.RowAxisVector.MemberValue(iLevel)

If Not mbr Is Nothing Then

sRowCaption = sRowCaption & IIf(iLevel > 0, ", ", "") &


End If


For iLevel = 0 To m_ac.ColumnAxis.VisibleDepth - 1

Set mbr = cell.ColumnAxisVector.MemberValue(iLevel)

If Not mbr Is Nothing Then

sColCaption = sColCaption & IIf(iLevel > 0, ", ", "") &


End If


If sColCaption <> "Porcentaje" Then

cht.Axis(AXIS_Y).Format = AF_NUMBER

cht.Axis(AXIS_Y).Decimals = 0

If (cht.Axis(AXIS_Y).Max < cell.Value) Then

cht.Axis(AXIS_Y).Max = cell.Value

End If


If iCol = 0 Then

cht.Axis(AXIS_Y).Format = AF_PERCENTAGE

cht.Axis(AXIS_Y).Decimals = 2

If (cht.Axis(AXIS_Y).Max < cell.Value) Then

cht.Axis(AXIS_Y).Max = cell.Value

End If


If (cht.Axis(AXIS_Y2).Max < cell.Value) Then

cht.Axis(AXIS_Y2).Max = cell.Value

End If

End If

End If

cht.Axis(AXIS_Y2).Format = AF_PERCENTAGE

Debug.Print sRowCaption, sColCaption, cell.Value, iRow, iCol

cht.Legend(iRow) = sRowCaption

If sColCaption <> "Porcentaje" Then

cht.Series(iCol).Legend = "Matriculaciones"

cht.ValueEx(iCol, iRow) = IIf(IsNull(cell.Value), 0, cell.Value)


cht.Series(iCol).Visible = True

cht.Series(iCol).Legend = "Porcentaje"

cht.Series(iCol).Yvalue(iRow) = IIf(IsNull(cell.Value), 0,


End If

Debug.Print "Serie: " & iCol

End Sub

Private Sub Form_Load()

' Chart Type Settings

cht.Gallery = BAR

cht.Chart3D = False


' Color Settings

cht.Border = False

' Layout Settings

cht.LegendBox = False

cht.SerLegBox = False

cht.ToolBar = False

cht.Title(CHART_TOPTIT) = ""

End Sub

Private Sub Form_Resize()

cht.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight

End Sub

Link to comment
Share on other sites

You need to debug your code and figure out what you are passing as the

indexes for the ValueEx property as well as the value itself. There is

nothing wrong with the "structure" of this code but if you are not getting

what you expect there must be something wrong with the data you are passing.



Software FX, Inc.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...