VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This function generates 2D Bar graphs ,3D Bar Graphs, Pie Charts or any type of Chart in VB Applica

by Shadab Azeem Rahil (8 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 20th June 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This function generates 2D Bar graphs ,3D Bar Graphs, Pie Charts or any type of Chart in VB Applications. You can specify the Legend, X-axis,

API Declarations


''[email protected]
''http://www.akaaz.cjb.net

Rate This function generates 2D Bar graphs ,3D Bar Graphs, Pie Charts or any type of Chart in VB Applica




MSChart1.title.Location.LocationType = VtChLocationTypeTop
MSChart1.TitleText = title
MSChart1.Plot.Axis(VtChAxisIdX).AxisTitle = Xaxis
MSChart1.Plot.Axis(VtChAxisIdY).AxisTitle = Yaxis
If legend Then
    MSChart1.ShowLegend = True
Else
    MSChart1.ShowLegend = True
End If
If ty = 1 Then
        MSChart1.ChartType = VtChChartType2dArea
ElseIf ty = 2 Then
        MSChart1.ChartType = VtChChartType2dBar
ElseIf ty = 3 Then
        MSChart1.ChartType = VtChChartType2dCombination
ElseIf ty = 4 Then
        MSChart1.ChartType = VtChChartType2dLine
ElseIf ty = 5 Then
        MSChart1.ChartType = VtChChartType2dPie
ElseIf ty = 6 Then
        MSChart1.ChartType = VtChChartType2dStep
ElseIf ty = 7 Then
        MSChart1.ChartType = VtChChartType2dXY
ElseIf ty = 8 Then
        MSChart1.ChartType = VtChChartType3dArea
ElseIf ty = 9 Then
        MSChart1.ChartType = VtChChartType3dBar
ElseIf ty = 10 Then
        MSChart1.ChartType = VtChChartType3dCombination
ElseIf ty = 11 Then
        MSChart1.ChartType = VtChChartType3dLine
ElseIf ty = 12 Then
        MSChart1.ChartType = VtChChartType3dStep
Else
        MsgBox ("No such type available")
End If
       
MSChart1.Visible = True
With MSChart1
         
            .RowCount = 1
            .ColumnCount = NumCols
         
            For Row = 1 To 1
            For Column = 1 To NumCols
           
           .Column = Column
           .Row = Row
        
           .data = VALUE(Column)
           .ColumnLabel = strColumns(Column)
                       
            Next Column
            Next Row
        
        
 
 
        End With
        With MSChart1.Plot
               
    End With
End Function


Download this snippet    Add to My Saved Code

This function generates 2D Bar graphs ,3D Bar Graphs, Pie Charts or any type of Chart in VB Applica Comments

No comments have been posted about This function generates 2D Bar graphs ,3D Bar Graphs, Pie Charts or any type of Chart in VB Applica. Why not be the first to post a comment about This function generates 2D Bar graphs ,3D Bar Graphs, Pie Charts or any type of Chart in VB Applica.

Post your comment

Subject:
Message:
0/1000 characters