home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "DataGrid Organization Example"
- ClientHeight = 7290
- ClientLeft = 1215
- ClientTop = 1545
- ClientWidth = 9435
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 7755
- Icon = "GridInfo.frx":0000
- Left = 1125
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 7290
- ScaleWidth = 9435
- Top = 1170
- Width = 9615
- Begin VB.ListBox lstChartType
- BackColor = &H00C0C0C0&
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 3390
- Left = 6480
- TabIndex = 0
- Top = 60
- Width = 2895
- End
- Begin Threed.SSPanel SSPanel2
- Height = 3675
- Left = 6480
- TabIndex = 2
- Top = 3540
- Width = 2895
- _Version = 65536
- _ExtentX = 5106
- _ExtentY = 6482
- _StockProps = 15
- Caption = "Chart Information"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 700
- size = 9.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelOuter = 1
- Alignment = 0
- Begin Threed.SSPanel pnlInfo
- Height = 255
- Index = 0
- Left = 1320
- TabIndex = 3
- Top = 300
- Width = 1455
- _Version = 65536
- _ExtentX = 2566
- _ExtentY = 450
- _StockProps = 15
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelOuter = 1
- Alignment = 1
- End
- Begin Threed.SSPanel pnlInfo
- Height = 255
- Index = 1
- Left = 1320
- TabIndex = 4
- Top = 600
- Width = 1455
- _Version = 65536
- _ExtentX = 2566
- _ExtentY = 450
- _StockProps = 15
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelOuter = 1
- Alignment = 1
- End
- Begin Threed.SSPanel pnlInfo
- Height = 255
- Index = 2
- Left = 1320
- TabIndex = 5
- Top = 900
- Width = 1455
- _Version = 65536
- _ExtentX = 2566
- _ExtentY = 450
- _StockProps = 15
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelOuter = 1
- Alignment = 1
- End
- Begin Threed.SSPanel pnlInfo
- Height = 255
- Index = 3
- Left = 1320
- TabIndex = 6
- Top = 1200
- Width = 1455
- _Version = 65536
- _ExtentX = 2566
- _ExtentY = 450
- _StockProps = 15
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelOuter = 1
- Alignment = 1
- End
- Begin Threed.SSPanel pnlInfo
- Height = 255
- Index = 4
- Left = 1320
- TabIndex = 8
- Top = 1500
- Width = 1455
- _Version = 65536
- _ExtentX = 2566
- _ExtentY = 450
- _StockProps = 15
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelOuter = 1
- Alignment = 1
- End
- Begin Threed.SSPanel pnlInfo
- Height = 255
- Index = 5
- Left = 1320
- TabIndex = 9
- Top = 1800
- Width = 1455
- _Version = 65536
- _ExtentX = 2566
- _ExtentY = 450
- _StockProps = 15
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelOuter = 1
- Alignment = 1
- End
- Begin Threed.SSPanel pnlInfo
- Height = 255
- Index = 6
- Left = 1320
- TabIndex = 10
- Top = 2100
- Width = 1455
- _Version = 65536
- _ExtentX = 2566
- _ExtentY = 450
- _StockProps = 15
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelOuter = 1
- Alignment = 1
- End
- Begin Threed.SSPanel pnlInfo
- Height = 255
- Index = 7
- Left = 1320
- TabIndex = 11
- Top = 2400
- Width = 1455
- _Version = 65536
- _ExtentX = 2566
- _ExtentY = 450
- _StockProps = 15
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelOuter = 1
- Alignment = 1
- End
- Begin Threed.SSPanel pnlInfo
- Height = 255
- Index = 8
- Left = 1320
- TabIndex = 12
- Top = 2700
- Width = 1455
- _Version = 65536
- _ExtentX = 2566
- _ExtentY = 450
- _StockProps = 15
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelOuter = 1
- Alignment = 1
- End
- Begin Threed.SSPanel pnlInfo
- Height = 255
- Index = 9
- Left = 1320
- TabIndex = 13
- Top = 3000
- Width = 1455
- _Version = 65536
- _ExtentX = 2566
- _ExtentY = 450
- _StockProps = 15
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelOuter = 1
- Alignment = 1
- End
- Begin Threed.SSPanel pnlInfo
- Height = 255
- Index = 10
- Left = 1320
- TabIndex = 14
- Top = 3300
- Width = 1455
- _Version = 65536
- _ExtentX = 2566
- _ExtentY = 450
- _StockProps = 15
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelOuter = 1
- Alignment = 1
- End
- Begin VB.Label Label2
- Caption = "Contents"
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 12
- Left = 120
- TabIndex = 27
- Top = 2100
- Width = 675
- End
- Begin VB.Label Label2
- Caption = "Col 5"
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 11
- Left = 840
- TabIndex = 26
- Top = 3300
- Width = 435
- End
- Begin VB.Label Label2
- Caption = "Col 4"
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 10
- Left = 840
- TabIndex = 25
- Top = 3000
- Width = 435
- End
- Begin VB.Label Label2
- Caption = "Col 3"
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 9
- Left = 840
- TabIndex = 24
- Top = 2700
- Width = 435
- End
- Begin VB.Label Label2
- Caption = "Col 2"
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 8
- Left = 840
- TabIndex = 23
- Top = 2400
- Width = 435
- End
- Begin VB.Label Label2
- Caption = "Col 1"
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 7
- Left = 840
- TabIndex = 22
- Top = 2100
- Width = 435
- End
- Begin VB.Label Label2
- Caption = "Cols per Series"
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 6
- Left = 120
- TabIndex = 21
- Top = 1800
- Width = 1155
- End
- Begin VB.Label Label2
- Caption = "Z"
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 5
- Left = 1080
- TabIndex = 20
- Top = 1500
- Width = 195
- End
- Begin VB.Label Label2
- Caption = "Y2"
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 4
- Left = 1080
- TabIndex = 19
- Top = 1200
- Width = 195
- End
- Begin VB.Label Label2
- Caption = "Y"
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 3
- Left = 1080
- TabIndex = 18
- Top = 900
- Width = 195
- End
- Begin VB.Label Label2
- Caption = "X"
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 2
- Left = 1080
- TabIndex = 17
- Top = 600
- Width = 195
- End
- Begin VB.Label Label2
- Caption = "Axis Type"
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 1
- Left = 120
- TabIndex = 16
- Top = 600
- Width = 795
- End
- Begin VB.Label Label2
- Caption = "VtChChartType"
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 0
- Left = 120
- TabIndex = 15
- Top = 300
- Width = 1155
- End
- End
- Begin MSGrid.Grid Grid1
- Height = 1755
- Left = 60
- TabIndex = 7
- Top = 5460
- Width = 6315
- _Version = 65536
- _ExtentX = 11139
- _ExtentY = 3096
- _StockProps = 77
- BackColor = 13827580
- Rows = 7
- Cols = 3
- End
- Begin VCIFiLib.VtChart VtChart1
- Height = 5295
- Left = 60
- TabIndex = 1
- Top = 60
- Width = 6315
- _version = 65536
- _extentx = 11139
- _extenty = 9340
- _stockprops = 96
- borderstyle = 1
- repaint = -1 'True
- row = 5
- filename = "GridInfo.frx":030A
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Sub ShowInfo(cType$, xType$, yType$, y2Type$, zType$, cps$, c1$, c2$, c3$, c4$, c5$)
- pnlInfo(0).Caption = cType
- pnlInfo(1).Caption = xType
- pnlInfo(2).Caption = yType
- pnlInfo(3).Caption = y2Type
- pnlInfo(4).Caption = zType
- pnlInfo(5).Caption = cps
- pnlInfo(6).Caption = c1
- pnlInfo(7).Caption = c2
- pnlInfo(8).Caption = c3
- pnlInfo(9).Caption = c4
- pnlInfo(10).Caption = c5
- End Sub
- Private Sub Form_Load()
- With lstChartType
- .AddItem "2D Bar"
- .AddItem "2D Line"
- .AddItem "2D Area"
- .AddItem "2D Step"
- .AddItem "2D Combination"
- .AddItem "2D Horizontal Bar"
- .AddItem "2D Gantt"
- .AddItem "2D Pie"
- .AddItem "2D XY (Scatter)"
- .AddItem "2D Radar - Line"
- .AddItem "2D Radar - Area"
- .AddItem "2D Polar"
- .AddItem "2D Bubble"
- .AddItem "2D HiLo"
- .AddItem "2D HiLoClose (Across)"
- .AddItem "2D HiLoClose (Right)"
- .AddItem "2D OpenHiLoClose "
- .AddItem "2D OpenHiLoClose Bar-Date"
- .AddItem "2D OpenHiLoClose Bar-Category"
- .AddItem "2D Contour"
- .AddItem "3D Bar"
- .AddItem "3D Line"
- .AddItem "3D Area"
- .AddItem "3D Step"
- .AddItem "3D Combination"
- .AddItem "3D Clustered Bar"
- .AddItem "3D Horizontal Bar"
- .AddItem "3D Gantt"
- .AddItem "3D Pie"
- .AddItem "3D Doughnut"
- .AddItem "3D Surface"
- .AddItem "3D XYZ"
- .AddItem "3D Scatter"
- End With
- vtchart1.Legend.Location.Visible = True
- vtchart1.Legend.Location.LocationType = VtChLocationTypeBottom
- 'set first chart type - 2D bar
- lstChartType.ListIndex = 0
- End Sub
- Private Sub lstChartType_Click()
- Dim ind%, colCount%, i%
- vtchart1.Plot.Axis(VtChAxisIdZ).AxisScale.Hide = False
- vtchart1.Plot.SeriesCollection.Item(1).SeriesMarker.Show = False
- Select Case lstChartType.ListIndex
- Case 0
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType2dBar
- ShowInfo "2dBar", "Category", "Value", "Value", "", 1, "", "", "", "", ""
-
- Case 1
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType2dLine
- ShowInfo "2dLine", "Category", "Value", "Value", "", 1, "", "", "", "", ""
-
- Case 2
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType2dArea
- ShowInfo "2dArea", "Category", "Value", "Value", "", 1, "", "", "", "", ""
-
- Case 3
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType2dStep
- ShowInfo "2dStep", "Category", "Value", "Value", "", 1, "", "", "", "", ""
-
- Case 4
- vtchart1.ColumnCount = 4
- vtchart1.ChartType = VtChChartType2dCombination
- With vtchart1.Plot.SeriesCollection
- .Item(1).SeriesType = VtChSeriesType2dLine
- .Item(2).SeriesType = VtChSeriesType2dBar
- .Item(3).SeriesType = VtChSeriesType2dArea
- .Item(4).SeriesType = VtChSeriesType2dStep
- End With
- ShowInfo "2dCombination", "Category", "Value", "Value", "", 1, "", "", "", "", ""
-
- Case 5
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType2dHorizontalBar
- ShowInfo "2dHorizontalBar", "Category", "Value", "", "", 1, "", "", "", "", ""
-
- Case 6
- vtchart1.ColumnCount = 2
- vtchart1.ChartType = VtChChartType2dGantt
- ShowInfo "2dGantt", "Category", "Date", "", "", 2, "Start Date", "Duration", "", "", ""
-
- Case 7
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType2dPie
- ShowInfo "2dPie", "Pie Labels", "", "", "", 1, "", "", "", "", ""
-
- Case 8
- vtchart1.ColumnCount = 2
- vtchart1.ChartType = VtChChartType2dXY
- ShowInfo "2dXY", "Value", "Value", "", "", 2, "X Value", "Y Value", "", "", ""
-
- Case 9
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType2dRadar
- For i = 1 To vtchart1.ColumnCount
- vtchart1.Column = i
- vtchart1.SeriesType = VtChSeriesType2dRadarLine
- Next i
- ShowInfo "2dRadar", "Radar", "Value", "", "", 1, "", "", "", "", ""
-
- Case 10
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType2dRadar
- For i = 1 To vtchart1.ColumnCount
- vtchart1.Column = i
- vtchart1.SeriesType = VtChSeriesType2dRadarArea
- Next i
- ShowInfo "2dRadar", "Radar", "Value", "", "", 1, "", "", "", "", ""
-
- Case 11
- vtchart1.ColumnCount = 2
- vtchart1.ChartType = VtChChartType2dPolar
- ShowInfo "2dPolar", "Angle", "Value", "", "", 2, "Angle", "Radius", "", "", ""
-
- Case 12
- vtchart1.ColumnCount = 3
- vtchart1.ChartType = VtChChartType2dBubble
- ShowInfo "2dBubble", "Value", "Value", "", "", 3, "X value", "Y Value", "Bubble Size", "", ""
-
- Case 13 'High - Low chart
- vtchart1.ColumnCount = 3
- vtchart1.ChartType = VtChChartType2dHiLo
- 'set column 1 series type to dates, rest of the columns to HiLo
- vtchart1.Column = 1
- vtchart1.SeriesType = VtChSeriesType2dDates
- For i = 2 To vtchart1.ColumnCount
- vtchart1.Column = i
- vtchart1.SeriesType = VtChSeriesType2dHiLo
- Next i
- ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "2", "Dates", "High", "Low", "", ""
-
- Case 14 'hiloclose across
- vtchart1.ColumnCount = 4
- vtchart1.ChartType = VtChChartType2dHiLo
- 'set column 1 series type to dates, rest of the columns to HiLo
- vtchart1.Column = 1
- vtchart1.SeriesType = VtChSeriesType2dDates
- For i = 2 To vtchart1.ColumnCount
- vtchart1.Column = i
- vtchart1.SeriesType = VtChSeriesType2dHLC
- Next i
- ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "3", "Dates", "High", "Low", "Close", ""
-
- Case 15 'hiloclose right
- vtchart1.ColumnCount = 4
- vtchart1.ChartType = VtChChartType2dHiLo
- 'set column 1 series type to dates, rest of the columns to HiLo
- vtchart1.Column = 1
- vtchart1.SeriesType = VtChSeriesType2dDates
- For i = 2 To vtchart1.ColumnCount
- vtchart1.Column = i
- vtchart1.SeriesType = VtChSeriesType2dHLCRight
- Next i
- ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "3", "Dates", "High", "Low", "Close", ""
-
- Case 16 'openhiloclose
- vtchart1.ColumnCount = 5
- vtchart1.ChartType = VtChChartType2dHiLo
- 'set column 1 series type to dates, rest of the columns to HiLo
- vtchart1.Column = 1
- vtchart1.SeriesType = VtChSeriesType2dDates
- For i = 2 To vtchart1.ColumnCount
- vtchart1.Column = i
- vtchart1.SeriesType = VtChSeriesType2dOHLC
- Next i
- ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "4", "Dates", "Open", "High", "Low", "Close"
-
- Case 17 'open hiloclose bar-date
- vtchart1.ColumnCount = 5
- vtchart1.ChartType = VtChChartType2dHiLo
- 'set column 1 series type to dates, rest of the columns to HiLo
- vtchart1.Column = 1
- vtchart1.SeriesType = VtChSeriesType2dDates
- For i = 2 To vtchart1.ColumnCount
- vtchart1.Column = i
- vtchart1.SeriesType = VtChSeriesType2dOHLCBar
- Next i
- ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "4", "Dates", "Open", "High", "Low", "Close"
-
- Case 18 'open hiloclose bar-category
- vtchart1.ColumnCount = 4
- vtchart1.ChartType = VtChChartType2dHiLo
- For i = 1 To vtchart1.ColumnCount
- vtchart1.Column = i
- vtchart1.SeriesType = VtChSeriesType2dOHLCBar
- Next i
- ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "4", "Open", "High", "Low", "Close", ""
-
- Case 19
- vtchart1.ColumnCount = 4
- vtchart1.ChartType = VtChChartType2dContour
- ShowInfo "2dContour", "Category", "", "", "Category", "1", "", "", "", "", ""
-
- Case 20
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType3dBar
- ShowInfo "3dBar", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
-
- Case 21
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType3dLine
- ShowInfo "3dLine", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
-
- Case 22
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType3dArea
- ShowInfo "3dArea", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
-
- Case 23
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType3dStep
- ShowInfo "3dStep", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
-
- Case 24
- vtchart1.ColumnCount = 4
- vtchart1.ChartType = VtChChartType3dCombination
- With vtchart1.Plot.SeriesCollection
- .Item(1).SeriesType = VtChSeriesType3dLine
- .Item(2).SeriesType = VtChSeriesType3dBar
- .Item(3).SeriesType = VtChSeriesType3dStep
- .Item(4).SeriesType = VtChSeriesType3dArea
- End With
- ShowInfo "3dCombination", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
-
- Case 25
- vtchart1.ColumnCount = 2
- vtchart1.ChartType = VtChChartType3dClusteredBar
- ShowInfo "3dClusteredBar", "Category", "Value", "Value", "", "1", "", "", "", "", ""
-
- Case 26
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType3dHorizontalBar
- vtchart1.Plot.Axis(VtChAxisIdZ).AxisScale.Hide = True
- ShowInfo "3dHorizontalBar", "Category", "Value", "", "", "1", "", "", "", "", ""
-
- Case 27
- vtchart1.ColumnCount = 2
- vtchart1.ChartType = VtChChartType3dGantt
- ShowInfo "3dGantt", "Category", "Date", "", "Category", "2", "Start Date", "Duration", "", "", ""
-
- Case 28
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType3dPie
- ShowInfo "3dPie", "Pie Labels", "", "", "", "1", "", "", "", "", ""
-
- Case 29
- vtchart1.ColumnCount = 1
- vtchart1.ChartType = VtChChartType3dDoughnut
- ShowInfo "3dDoughnut", "Doughnut Labels", "", "", "", "1", "", "", "", "", ""
-
- Case 30
- vtchart1.ColumnCount = 4
- vtchart1.ChartType = VtChChartType3dSurface
- ShowInfo "3dSurface", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
-
- Case 31
- vtchart1.ColumnCount = 3
- vtchart1.Plot.SeriesCollection.Item(1).SeriesMarker.Show = True
- vtchart1.ChartType = VtChChartType3dXYZ
- ShowInfo "3dXYZ", "Value", "Value", "Value", "Value", "3", "X Value", "Y Value", "Z Value", "", ""
-
- Case 32
- vtchart1.ColumnCount = 3
- vtchart1.Plot.SeriesCollection.Item(1).SeriesMarker.Show = True
- vtchart1.ChartType = VtChChartType3dScatter
- ShowInfo "3dScatter", "Value", "Value", "Value", "Value", "3", "X Value", "Y Value", "Z Value", "", ""
-
- End Select
- SetGridData
- End Sub
- Private Sub SetGridData()
- Dim i%, j%
- '' Clear the grid and set new size
- Grid1.Rows = 2
- Grid1.Cols = 2
- Grid1.Rows = vtchart1.RowCount + 2
- Grid1.Cols = vtchart1.ColumnCount + 2
- '' Make the Grid Columns wider
- For i = 1 To Grid1.Cols - 1
- Grid1.ColWidth(i) = 800
- Next i
- '' Set row labels in first column of grid
- Grid1.Col = 1
- For i = 2 To vtchart1.RowCount + 1
- Grid1.Row = i
- Grid1.Text = "Row " & (i - 1)
- Next i
- '' Set column labels - All charts contain one series except
- '' for combo and clustered bar
- Grid1.Row = 1
- Grid1.Col = 2
- Grid1.Text = "Series " & 1
- If (vtchart1.ChartType = VtChChartType2dCombination) Or _
- (vtchart1.ChartType = VtChChartType3dCombination) Or _
- (vtchart1.ChartType = VtChChartType3dClusteredBar) Or _
- (vtchart1.ChartType = VtChChartType3dSurface) Or _
- (vtchart1.ChartType = VtChChartType2dContour) Then
- For i = 2 To vtchart1.ColumnCount
- Grid1.Col = i + 1
- Grid1.Text = "Series " & i
- Next
- End If
- '' Set data in grid
- For i = vtchart1.RowCount + 1 To 2 Step -1
- Grid1.Row = i
- For j = vtchart1.ColumnCount + 1 To 2 Step -1
- Grid1.Col = j
- Grid1.Text = Str(i * j * 10)
- Next j
- Next i
- '' Set date data for HiLo chart in first column
- If (vtchart1.ChartType = VtChChartType2dHiLo) Then
- 'set date data for column 2 if column 2 is dates series
- Grid1.Col = 2
- 'set series name to dates if column 1 series type is dates, otherwise column 1 name is series1
- vtchart1.Column = 1
- If vtchart1.SeriesType = VtChSeriesType2dDates Then
- 'when HiLo chart type uses date X axis
- For i = 2 To vtchart1.RowCount + 1
- Grid1.Row = i
- Grid1.Text = Str(34988 + i * 4)
- Next i
- 'set label = dates for col2, series1 for col3, blank for rest of the columns
- Grid1.Row = 1
- Grid1.Col = 2
- Grid1.Text = "Dates"
- Grid1.Col = 3
- Grid1.Text = "Series 1"
- Else
- 'when HiLo chart type uses category X axis
- Grid1.Row = 1
- Grid1.Col = 2
- Grid1.Text = "Series 1"
- End If
- End If
- GridToDataGrid
- End Sub
- Private Sub GridToDataGrid()
- Dim i%, j%
- '' Set column labels
- Grid1.Row = 1
- For i = 1 To vtchart1.ColumnCount
- Grid1.Col = i + 1
- vtchart1.Column = i
- vtchart1.ColumnLabel = Grid1.Text
- Next i
- '' Set row labels
- Grid1.Col = 1
- For i = 1 To vtchart1.RowCount
- Grid1.Row = i + 1
- vtchart1.Row = i
- vtchart1.RowLabel = Grid1.Text
- Next i
- '' For these simple charts their is always one
- '' level of row and col labels
- For i = 1 To vtchart1.RowCount
- For j = 1 To vtchart1.ColumnCount
- Grid1.Row = i + 1
- Grid1.Col = j + 1
- vtchart1.DataGrid.SetData i, j, Val(Grid1.Text), False
- Next j
- Next i
- End Sub
-