home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 128 - Disc 1 / dpcs1098a.iso / Ocx / VCFIMP / VCIMPRES.Z / GridInfo.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-11-01  |  34.5 KB  |  973 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H00C0C0C0&
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "DataGrid Organization Example"
  7.    ClientHeight    =   7290
  8.    ClientLeft      =   1215
  9.    ClientTop       =   1545
  10.    ClientWidth     =   9435
  11.    BeginProperty Font 
  12.       name            =   "MS Sans Serif"
  13.       charset         =   0
  14.       weight          =   700
  15.       size            =   8.25
  16.       underline       =   0   'False
  17.       italic          =   0   'False
  18.       strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H80000008&
  21.    Height          =   7755
  22.    Icon            =   "GridInfo.frx":0000
  23.    Left            =   1125
  24.    LinkTopic       =   "Form1"
  25.    MaxButton       =   0   'False
  26.    MinButton       =   0   'False
  27.    ScaleHeight     =   7290
  28.    ScaleWidth      =   9435
  29.    Top             =   1170
  30.    Width           =   9615
  31.    Begin VB.ListBox lstChartType 
  32.       BackColor       =   &H00C0C0C0&
  33.       BeginProperty Font 
  34.          name            =   "Arial"
  35.          charset         =   0
  36.          weight          =   400
  37.          size            =   8.25
  38.          underline       =   0   'False
  39.          italic          =   0   'False
  40.          strikethrough   =   0   'False
  41.       EndProperty
  42.       Height          =   3390
  43.       Left            =   6480
  44.       TabIndex        =   0
  45.       Top             =   60
  46.       Width           =   2895
  47.    End
  48.    Begin Threed.SSPanel SSPanel2 
  49.       Height          =   3675
  50.       Left            =   6480
  51.       TabIndex        =   2
  52.       Top             =   3540
  53.       Width           =   2895
  54.       _Version        =   65536
  55.       _ExtentX        =   5106
  56.       _ExtentY        =   6482
  57.       _StockProps     =   15
  58.       Caption         =   "Chart Information"
  59.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  60.          name            =   "Arial"
  61.          charset         =   0
  62.          weight          =   700
  63.          size            =   9.75
  64.          underline       =   0   'False
  65.          italic          =   0   'False
  66.          strikethrough   =   0   'False
  67.       EndProperty
  68.       BevelOuter      =   1
  69.       Alignment       =   0
  70.       Begin Threed.SSPanel pnlInfo 
  71.          Height          =   255
  72.          Index           =   0
  73.          Left            =   1320
  74.          TabIndex        =   3
  75.          Top             =   300
  76.          Width           =   1455
  77.          _Version        =   65536
  78.          _ExtentX        =   2566
  79.          _ExtentY        =   450
  80.          _StockProps     =   15
  81.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  82.             name            =   "Arial"
  83.             charset         =   0
  84.             weight          =   400
  85.             size            =   8.25
  86.             underline       =   0   'False
  87.             italic          =   0   'False
  88.             strikethrough   =   0   'False
  89.          EndProperty
  90.          BevelOuter      =   1
  91.          Alignment       =   1
  92.       End
  93.       Begin Threed.SSPanel pnlInfo 
  94.          Height          =   255
  95.          Index           =   1
  96.          Left            =   1320
  97.          TabIndex        =   4
  98.          Top             =   600
  99.          Width           =   1455
  100.          _Version        =   65536
  101.          _ExtentX        =   2566
  102.          _ExtentY        =   450
  103.          _StockProps     =   15
  104.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  105.             name            =   "Arial"
  106.             charset         =   0
  107.             weight          =   400
  108.             size            =   8.25
  109.             underline       =   0   'False
  110.             italic          =   0   'False
  111.             strikethrough   =   0   'False
  112.          EndProperty
  113.          BevelOuter      =   1
  114.          Alignment       =   1
  115.       End
  116.       Begin Threed.SSPanel pnlInfo 
  117.          Height          =   255
  118.          Index           =   2
  119.          Left            =   1320
  120.          TabIndex        =   5
  121.          Top             =   900
  122.          Width           =   1455
  123.          _Version        =   65536
  124.          _ExtentX        =   2566
  125.          _ExtentY        =   450
  126.          _StockProps     =   15
  127.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  128.             name            =   "Arial"
  129.             charset         =   0
  130.             weight          =   400
  131.             size            =   8.25
  132.             underline       =   0   'False
  133.             italic          =   0   'False
  134.             strikethrough   =   0   'False
  135.          EndProperty
  136.          BevelOuter      =   1
  137.          Alignment       =   1
  138.       End
  139.       Begin Threed.SSPanel pnlInfo 
  140.          Height          =   255
  141.          Index           =   3
  142.          Left            =   1320
  143.          TabIndex        =   6
  144.          Top             =   1200
  145.          Width           =   1455
  146.          _Version        =   65536
  147.          _ExtentX        =   2566
  148.          _ExtentY        =   450
  149.          _StockProps     =   15
  150.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  151.             name            =   "Arial"
  152.             charset         =   0
  153.             weight          =   400
  154.             size            =   8.25
  155.             underline       =   0   'False
  156.             italic          =   0   'False
  157.             strikethrough   =   0   'False
  158.          EndProperty
  159.          BevelOuter      =   1
  160.          Alignment       =   1
  161.       End
  162.       Begin Threed.SSPanel pnlInfo 
  163.          Height          =   255
  164.          Index           =   4
  165.          Left            =   1320
  166.          TabIndex        =   8
  167.          Top             =   1500
  168.          Width           =   1455
  169.          _Version        =   65536
  170.          _ExtentX        =   2566
  171.          _ExtentY        =   450
  172.          _StockProps     =   15
  173.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  174.             name            =   "Arial"
  175.             charset         =   0
  176.             weight          =   400
  177.             size            =   8.25
  178.             underline       =   0   'False
  179.             italic          =   0   'False
  180.             strikethrough   =   0   'False
  181.          EndProperty
  182.          BevelOuter      =   1
  183.          Alignment       =   1
  184.       End
  185.       Begin Threed.SSPanel pnlInfo 
  186.          Height          =   255
  187.          Index           =   5
  188.          Left            =   1320
  189.          TabIndex        =   9
  190.          Top             =   1800
  191.          Width           =   1455
  192.          _Version        =   65536
  193.          _ExtentX        =   2566
  194.          _ExtentY        =   450
  195.          _StockProps     =   15
  196.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  197.             name            =   "Arial"
  198.             charset         =   0
  199.             weight          =   400
  200.             size            =   8.25
  201.             underline       =   0   'False
  202.             italic          =   0   'False
  203.             strikethrough   =   0   'False
  204.          EndProperty
  205.          BevelOuter      =   1
  206.          Alignment       =   1
  207.       End
  208.       Begin Threed.SSPanel pnlInfo 
  209.          Height          =   255
  210.          Index           =   6
  211.          Left            =   1320
  212.          TabIndex        =   10
  213.          Top             =   2100
  214.          Width           =   1455
  215.          _Version        =   65536
  216.          _ExtentX        =   2566
  217.          _ExtentY        =   450
  218.          _StockProps     =   15
  219.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  220.             name            =   "Arial"
  221.             charset         =   0
  222.             weight          =   400
  223.             size            =   8.25
  224.             underline       =   0   'False
  225.             italic          =   0   'False
  226.             strikethrough   =   0   'False
  227.          EndProperty
  228.          BevelOuter      =   1
  229.          Alignment       =   1
  230.       End
  231.       Begin Threed.SSPanel pnlInfo 
  232.          Height          =   255
  233.          Index           =   7
  234.          Left            =   1320
  235.          TabIndex        =   11
  236.          Top             =   2400
  237.          Width           =   1455
  238.          _Version        =   65536
  239.          _ExtentX        =   2566
  240.          _ExtentY        =   450
  241.          _StockProps     =   15
  242.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  243.             name            =   "Arial"
  244.             charset         =   0
  245.             weight          =   400
  246.             size            =   8.25
  247.             underline       =   0   'False
  248.             italic          =   0   'False
  249.             strikethrough   =   0   'False
  250.          EndProperty
  251.          BevelOuter      =   1
  252.          Alignment       =   1
  253.       End
  254.       Begin Threed.SSPanel pnlInfo 
  255.          Height          =   255
  256.          Index           =   8
  257.          Left            =   1320
  258.          TabIndex        =   12
  259.          Top             =   2700
  260.          Width           =   1455
  261.          _Version        =   65536
  262.          _ExtentX        =   2566
  263.          _ExtentY        =   450
  264.          _StockProps     =   15
  265.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  266.             name            =   "Arial"
  267.             charset         =   0
  268.             weight          =   400
  269.             size            =   8.25
  270.             underline       =   0   'False
  271.             italic          =   0   'False
  272.             strikethrough   =   0   'False
  273.          EndProperty
  274.          BevelOuter      =   1
  275.          Alignment       =   1
  276.       End
  277.       Begin Threed.SSPanel pnlInfo 
  278.          Height          =   255
  279.          Index           =   9
  280.          Left            =   1320
  281.          TabIndex        =   13
  282.          Top             =   3000
  283.          Width           =   1455
  284.          _Version        =   65536
  285.          _ExtentX        =   2566
  286.          _ExtentY        =   450
  287.          _StockProps     =   15
  288.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  289.             name            =   "Arial"
  290.             charset         =   0
  291.             weight          =   400
  292.             size            =   8.25
  293.             underline       =   0   'False
  294.             italic          =   0   'False
  295.             strikethrough   =   0   'False
  296.          EndProperty
  297.          BevelOuter      =   1
  298.          Alignment       =   1
  299.       End
  300.       Begin Threed.SSPanel pnlInfo 
  301.          Height          =   255
  302.          Index           =   10
  303.          Left            =   1320
  304.          TabIndex        =   14
  305.          Top             =   3300
  306.          Width           =   1455
  307.          _Version        =   65536
  308.          _ExtentX        =   2566
  309.          _ExtentY        =   450
  310.          _StockProps     =   15
  311.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  312.             name            =   "Arial"
  313.             charset         =   0
  314.             weight          =   400
  315.             size            =   8.25
  316.             underline       =   0   'False
  317.             italic          =   0   'False
  318.             strikethrough   =   0   'False
  319.          EndProperty
  320.          BevelOuter      =   1
  321.          Alignment       =   1
  322.       End
  323.       Begin VB.Label Label2 
  324.          Caption         =   "Contents"
  325.          BeginProperty Font 
  326.             name            =   "Arial"
  327.             charset         =   0
  328.             weight          =   400
  329.             size            =   8.25
  330.             underline       =   0   'False
  331.             italic          =   0   'False
  332.             strikethrough   =   0   'False
  333.          EndProperty
  334.          Height          =   195
  335.          Index           =   12
  336.          Left            =   120
  337.          TabIndex        =   27
  338.          Top             =   2100
  339.          Width           =   675
  340.       End
  341.       Begin VB.Label Label2 
  342.          Caption         =   "Col 5"
  343.          BeginProperty Font 
  344.             name            =   "Arial"
  345.             charset         =   0
  346.             weight          =   400
  347.             size            =   8.25
  348.             underline       =   0   'False
  349.             italic          =   0   'False
  350.             strikethrough   =   0   'False
  351.          EndProperty
  352.          Height          =   195
  353.          Index           =   11
  354.          Left            =   840
  355.          TabIndex        =   26
  356.          Top             =   3300
  357.          Width           =   435
  358.       End
  359.       Begin VB.Label Label2 
  360.          Caption         =   "Col 4"
  361.          BeginProperty Font 
  362.             name            =   "Arial"
  363.             charset         =   0
  364.             weight          =   400
  365.             size            =   8.25
  366.             underline       =   0   'False
  367.             italic          =   0   'False
  368.             strikethrough   =   0   'False
  369.          EndProperty
  370.          Height          =   195
  371.          Index           =   10
  372.          Left            =   840
  373.          TabIndex        =   25
  374.          Top             =   3000
  375.          Width           =   435
  376.       End
  377.       Begin VB.Label Label2 
  378.          Caption         =   "Col 3"
  379.          BeginProperty Font 
  380.             name            =   "Arial"
  381.             charset         =   0
  382.             weight          =   400
  383.             size            =   8.25
  384.             underline       =   0   'False
  385.             italic          =   0   'False
  386.             strikethrough   =   0   'False
  387.          EndProperty
  388.          Height          =   195
  389.          Index           =   9
  390.          Left            =   840
  391.          TabIndex        =   24
  392.          Top             =   2700
  393.          Width           =   435
  394.       End
  395.       Begin VB.Label Label2 
  396.          Caption         =   "Col 2"
  397.          BeginProperty Font 
  398.             name            =   "Arial"
  399.             charset         =   0
  400.             weight          =   400
  401.             size            =   8.25
  402.             underline       =   0   'False
  403.             italic          =   0   'False
  404.             strikethrough   =   0   'False
  405.          EndProperty
  406.          Height          =   195
  407.          Index           =   8
  408.          Left            =   840
  409.          TabIndex        =   23
  410.          Top             =   2400
  411.          Width           =   435
  412.       End
  413.       Begin VB.Label Label2 
  414.          Caption         =   "Col 1"
  415.          BeginProperty Font 
  416.             name            =   "Arial"
  417.             charset         =   0
  418.             weight          =   400
  419.             size            =   8.25
  420.             underline       =   0   'False
  421.             italic          =   0   'False
  422.             strikethrough   =   0   'False
  423.          EndProperty
  424.          Height          =   195
  425.          Index           =   7
  426.          Left            =   840
  427.          TabIndex        =   22
  428.          Top             =   2100
  429.          Width           =   435
  430.       End
  431.       Begin VB.Label Label2 
  432.          Caption         =   "Cols per Series"
  433.          BeginProperty Font 
  434.             name            =   "Arial"
  435.             charset         =   0
  436.             weight          =   400
  437.             size            =   8.25
  438.             underline       =   0   'False
  439.             italic          =   0   'False
  440.             strikethrough   =   0   'False
  441.          EndProperty
  442.          Height          =   195
  443.          Index           =   6
  444.          Left            =   120
  445.          TabIndex        =   21
  446.          Top             =   1800
  447.          Width           =   1155
  448.       End
  449.       Begin VB.Label Label2 
  450.          Caption         =   "Z"
  451.          BeginProperty Font 
  452.             name            =   "Arial"
  453.             charset         =   0
  454.             weight          =   400
  455.             size            =   8.25
  456.             underline       =   0   'False
  457.             italic          =   0   'False
  458.             strikethrough   =   0   'False
  459.          EndProperty
  460.          Height          =   195
  461.          Index           =   5
  462.          Left            =   1080
  463.          TabIndex        =   20
  464.          Top             =   1500
  465.          Width           =   195
  466.       End
  467.       Begin VB.Label Label2 
  468.          Caption         =   "Y2"
  469.          BeginProperty Font 
  470.             name            =   "Arial"
  471.             charset         =   0
  472.             weight          =   400
  473.             size            =   8.25
  474.             underline       =   0   'False
  475.             italic          =   0   'False
  476.             strikethrough   =   0   'False
  477.          EndProperty
  478.          Height          =   195
  479.          Index           =   4
  480.          Left            =   1080
  481.          TabIndex        =   19
  482.          Top             =   1200
  483.          Width           =   195
  484.       End
  485.       Begin VB.Label Label2 
  486.          Caption         =   "Y"
  487.          BeginProperty Font 
  488.             name            =   "Arial"
  489.             charset         =   0
  490.             weight          =   400
  491.             size            =   8.25
  492.             underline       =   0   'False
  493.             italic          =   0   'False
  494.             strikethrough   =   0   'False
  495.          EndProperty
  496.          Height          =   195
  497.          Index           =   3
  498.          Left            =   1080
  499.          TabIndex        =   18
  500.          Top             =   900
  501.          Width           =   195
  502.       End
  503.       Begin VB.Label Label2 
  504.          Caption         =   "X"
  505.          BeginProperty Font 
  506.             name            =   "Arial"
  507.             charset         =   0
  508.             weight          =   400
  509.             size            =   8.25
  510.             underline       =   0   'False
  511.             italic          =   0   'False
  512.             strikethrough   =   0   'False
  513.          EndProperty
  514.          Height          =   195
  515.          Index           =   2
  516.          Left            =   1080
  517.          TabIndex        =   17
  518.          Top             =   600
  519.          Width           =   195
  520.       End
  521.       Begin VB.Label Label2 
  522.          Caption         =   "Axis Type"
  523.          BeginProperty Font 
  524.             name            =   "Arial"
  525.             charset         =   0
  526.             weight          =   400
  527.             size            =   8.25
  528.             underline       =   0   'False
  529.             italic          =   0   'False
  530.             strikethrough   =   0   'False
  531.          EndProperty
  532.          Height          =   195
  533.          Index           =   1
  534.          Left            =   120
  535.          TabIndex        =   16
  536.          Top             =   600
  537.          Width           =   795
  538.       End
  539.       Begin VB.Label Label2 
  540.          Caption         =   "VtChChartType"
  541.          BeginProperty Font 
  542.             name            =   "Arial"
  543.             charset         =   0
  544.             weight          =   400
  545.             size            =   8.25
  546.             underline       =   0   'False
  547.             italic          =   0   'False
  548.             strikethrough   =   0   'False
  549.          EndProperty
  550.          Height          =   195
  551.          Index           =   0
  552.          Left            =   120
  553.          TabIndex        =   15
  554.          Top             =   300
  555.          Width           =   1155
  556.       End
  557.    End
  558.    Begin MSGrid.Grid Grid1 
  559.       Height          =   1755
  560.       Left            =   60
  561.       TabIndex        =   7
  562.       Top             =   5460
  563.       Width           =   6315
  564.       _Version        =   65536
  565.       _ExtentX        =   11139
  566.       _ExtentY        =   3096
  567.       _StockProps     =   77
  568.       BackColor       =   13827580
  569.       Rows            =   7
  570.       Cols            =   3
  571.    End
  572.    Begin VCIFiLib.VtChart VtChart1 
  573.       Height          =   5295
  574.       Left            =   60
  575.       TabIndex        =   1
  576.       Top             =   60
  577.       Width           =   6315
  578.       _version        =   65536
  579.       _extentx        =   11139
  580.       _extenty        =   9340
  581.       _stockprops     =   96
  582.       borderstyle     =   1
  583.       repaint         =   -1  'True
  584.       row             =   5
  585.       filename        =   "GridInfo.frx":030A
  586.    End
  587. Attribute VB_Name = "Form1"
  588. Attribute VB_Creatable = False
  589. Attribute VB_Exposed = False
  590. Option Explicit
  591. Sub ShowInfo(cType$, xType$, yType$, y2Type$, zType$, cps$, c1$, c2$, c3$, c4$, c5$)
  592.    pnlInfo(0).Caption = cType
  593.    pnlInfo(1).Caption = xType
  594.    pnlInfo(2).Caption = yType
  595.    pnlInfo(3).Caption = y2Type
  596.    pnlInfo(4).Caption = zType
  597.    pnlInfo(5).Caption = cps
  598.    pnlInfo(6).Caption = c1
  599.    pnlInfo(7).Caption = c2
  600.    pnlInfo(8).Caption = c3
  601.    pnlInfo(9).Caption = c4
  602.    pnlInfo(10).Caption = c5
  603. End Sub
  604. Private Sub Form_Load()
  605.    With lstChartType
  606.       .AddItem "2D Bar"
  607.       .AddItem "2D Line"
  608.       .AddItem "2D Area"
  609.       .AddItem "2D Step"
  610.       .AddItem "2D Combination"
  611.       .AddItem "2D Horizontal Bar"
  612.       .AddItem "2D Gantt"
  613.       .AddItem "2D Pie"
  614.       .AddItem "2D XY (Scatter)"
  615.       .AddItem "2D Radar - Line"
  616.       .AddItem "2D Radar - Area"
  617.       .AddItem "2D Polar"
  618.       .AddItem "2D Bubble"
  619.       .AddItem "2D HiLo"
  620.       .AddItem "2D HiLoClose (Across)"
  621.       .AddItem "2D HiLoClose (Right)"
  622.       .AddItem "2D OpenHiLoClose "
  623.       .AddItem "2D OpenHiLoClose Bar-Date"
  624.       .AddItem "2D OpenHiLoClose Bar-Category"
  625.       .AddItem "2D Contour"
  626.       .AddItem "3D Bar"
  627.       .AddItem "3D Line"
  628.       .AddItem "3D Area"
  629.       .AddItem "3D Step"
  630.       .AddItem "3D Combination"
  631.       .AddItem "3D Clustered Bar"
  632.       .AddItem "3D Horizontal Bar"
  633.       .AddItem "3D Gantt"
  634.       .AddItem "3D Pie"
  635.       .AddItem "3D Doughnut"
  636.       .AddItem "3D Surface"
  637.       .AddItem "3D XYZ"
  638.       .AddItem "3D Scatter"
  639.    End With
  640.    vtchart1.Legend.Location.Visible = True
  641.    vtchart1.Legend.Location.LocationType = VtChLocationTypeBottom
  642.    'set first chart type - 2D bar
  643.    lstChartType.ListIndex = 0
  644. End Sub
  645. Private Sub lstChartType_Click()
  646.    Dim ind%, colCount%, i%
  647.    vtchart1.Plot.Axis(VtChAxisIdZ).AxisScale.Hide = False
  648.    vtchart1.Plot.SeriesCollection.Item(1).SeriesMarker.Show = False
  649.    Select Case lstChartType.ListIndex
  650.       Case 0
  651.          vtchart1.ColumnCount = 1
  652.          vtchart1.ChartType = VtChChartType2dBar
  653.          ShowInfo "2dBar", "Category", "Value", "Value", "", 1, "", "", "", "", ""
  654.          
  655.       Case 1
  656.          vtchart1.ColumnCount = 1
  657.          vtchart1.ChartType = VtChChartType2dLine
  658.          ShowInfo "2dLine", "Category", "Value", "Value", "", 1, "", "", "", "", ""
  659.          
  660.       Case 2
  661.          vtchart1.ColumnCount = 1
  662.          vtchart1.ChartType = VtChChartType2dArea
  663.          ShowInfo "2dArea", "Category", "Value", "Value", "", 1, "", "", "", "", ""
  664.          
  665.       Case 3
  666.          vtchart1.ColumnCount = 1
  667.          vtchart1.ChartType = VtChChartType2dStep
  668.          ShowInfo "2dStep", "Category", "Value", "Value", "", 1, "", "", "", "", ""
  669.          
  670.       Case 4
  671.          vtchart1.ColumnCount = 4
  672.          vtchart1.ChartType = VtChChartType2dCombination
  673.          With vtchart1.Plot.SeriesCollection
  674.             .Item(1).SeriesType = VtChSeriesType2dLine
  675.             .Item(2).SeriesType = VtChSeriesType2dBar
  676.             .Item(3).SeriesType = VtChSeriesType2dArea
  677.             .Item(4).SeriesType = VtChSeriesType2dStep
  678.          End With
  679.          ShowInfo "2dCombination", "Category", "Value", "Value", "", 1, "", "", "", "", ""
  680.          
  681.       Case 5
  682.          vtchart1.ColumnCount = 1
  683.          vtchart1.ChartType = VtChChartType2dHorizontalBar
  684.          ShowInfo "2dHorizontalBar", "Category", "Value", "", "", 1, "", "", "", "", ""
  685.          
  686.       Case 6
  687.          vtchart1.ColumnCount = 2
  688.          vtchart1.ChartType = VtChChartType2dGantt
  689.          ShowInfo "2dGantt", "Category", "Date", "", "", 2, "Start Date", "Duration", "", "", ""
  690.          
  691.       Case 7
  692.          vtchart1.ColumnCount = 1
  693.          vtchart1.ChartType = VtChChartType2dPie
  694.          ShowInfo "2dPie", "Pie Labels", "", "", "", 1, "", "", "", "", ""
  695.          
  696.       Case 8
  697.          vtchart1.ColumnCount = 2
  698.          vtchart1.ChartType = VtChChartType2dXY
  699.          ShowInfo "2dXY", "Value", "Value", "", "", 2, "X Value", "Y Value", "", "", ""
  700.          
  701.       Case 9
  702.          vtchart1.ColumnCount = 1
  703.          vtchart1.ChartType = VtChChartType2dRadar
  704.          For i = 1 To vtchart1.ColumnCount
  705.             vtchart1.Column = i
  706.             vtchart1.SeriesType = VtChSeriesType2dRadarLine
  707.          Next i
  708.          ShowInfo "2dRadar", "Radar", "Value", "", "", 1, "", "", "", "", ""
  709.          
  710.       Case 10
  711.          vtchart1.ColumnCount = 1
  712.          vtchart1.ChartType = VtChChartType2dRadar
  713.          For i = 1 To vtchart1.ColumnCount
  714.             vtchart1.Column = i
  715.             vtchart1.SeriesType = VtChSeriesType2dRadarArea
  716.          Next i
  717.          ShowInfo "2dRadar", "Radar", "Value", "", "", 1, "", "", "", "", ""
  718.          
  719.       Case 11
  720.          vtchart1.ColumnCount = 2
  721.          vtchart1.ChartType = VtChChartType2dPolar
  722.          ShowInfo "2dPolar", "Angle", "Value", "", "", 2, "Angle", "Radius", "", "", ""
  723.          
  724.       Case 12
  725.          vtchart1.ColumnCount = 3
  726.          vtchart1.ChartType = VtChChartType2dBubble
  727.          ShowInfo "2dBubble", "Value", "Value", "", "", 3, "X value", "Y Value", "Bubble Size", "", ""
  728.          
  729.       Case 13 'High - Low chart
  730.          vtchart1.ColumnCount = 3
  731.          vtchart1.ChartType = VtChChartType2dHiLo
  732.          'set column 1 series type to dates, rest of the columns to HiLo
  733.          vtchart1.Column = 1
  734.          vtchart1.SeriesType = VtChSeriesType2dDates
  735.          For i = 2 To vtchart1.ColumnCount
  736.             vtchart1.Column = i
  737.             vtchart1.SeriesType = VtChSeriesType2dHiLo
  738.          Next i
  739.          ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "2", "Dates", "High", "Low", "", ""
  740.          
  741.       Case 14 'hiloclose across
  742.          vtchart1.ColumnCount = 4
  743.          vtchart1.ChartType = VtChChartType2dHiLo
  744.          'set column 1 series type to dates, rest of the columns to HiLo
  745.          vtchart1.Column = 1
  746.          vtchart1.SeriesType = VtChSeriesType2dDates
  747.          For i = 2 To vtchart1.ColumnCount
  748.             vtchart1.Column = i
  749.             vtchart1.SeriesType = VtChSeriesType2dHLC
  750.          Next i
  751.          ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "3", "Dates", "High", "Low", "Close", ""
  752.          
  753.       Case 15 'hiloclose right
  754.          vtchart1.ColumnCount = 4
  755.          vtchart1.ChartType = VtChChartType2dHiLo
  756.          'set column 1 series type to dates, rest of the columns to HiLo
  757.          vtchart1.Column = 1
  758.          vtchart1.SeriesType = VtChSeriesType2dDates
  759.          For i = 2 To vtchart1.ColumnCount
  760.             vtchart1.Column = i
  761.             vtchart1.SeriesType = VtChSeriesType2dHLCRight
  762.          Next i
  763.          ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "3", "Dates", "High", "Low", "Close", ""
  764.          
  765.       Case 16 'openhiloclose
  766.          vtchart1.ColumnCount = 5
  767.          vtchart1.ChartType = VtChChartType2dHiLo
  768.          'set column 1 series type to dates, rest of the columns to HiLo
  769.          vtchart1.Column = 1
  770.          vtchart1.SeriesType = VtChSeriesType2dDates
  771.          For i = 2 To vtchart1.ColumnCount
  772.             vtchart1.Column = i
  773.             vtchart1.SeriesType = VtChSeriesType2dOHLC
  774.          Next i
  775.          ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "4", "Dates", "Open", "High", "Low", "Close"
  776.          
  777.       Case 17 'open hiloclose bar-date
  778.          vtchart1.ColumnCount = 5
  779.          vtchart1.ChartType = VtChChartType2dHiLo
  780.          'set column 1 series type to dates, rest of the columns to HiLo
  781.          vtchart1.Column = 1
  782.          vtchart1.SeriesType = VtChSeriesType2dDates
  783.          For i = 2 To vtchart1.ColumnCount
  784.             vtchart1.Column = i
  785.             vtchart1.SeriesType = VtChSeriesType2dOHLCBar
  786.          Next i
  787.          ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "4", "Dates", "Open", "High", "Low", "Close"
  788.          
  789.       Case 18 'open hiloclose bar-category
  790.          vtchart1.ColumnCount = 4
  791.          vtchart1.ChartType = VtChChartType2dHiLo
  792.          For i = 1 To vtchart1.ColumnCount
  793.             vtchart1.Column = i
  794.             vtchart1.SeriesType = VtChSeriesType2dOHLCBar
  795.          Next i
  796.          ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "4", "Open", "High", "Low", "Close", ""
  797.          
  798.       Case 19
  799.          vtchart1.ColumnCount = 4
  800.          vtchart1.ChartType = VtChChartType2dContour
  801.          ShowInfo "2dContour", "Category", "", "", "Category", "1", "", "", "", "", ""
  802.          
  803.       Case 20
  804.          vtchart1.ColumnCount = 1
  805.          vtchart1.ChartType = VtChChartType3dBar
  806.          ShowInfo "3dBar", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
  807.          
  808.       Case 21
  809.          vtchart1.ColumnCount = 1
  810.          vtchart1.ChartType = VtChChartType3dLine
  811.          ShowInfo "3dLine", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
  812.          
  813.       Case 22
  814.          vtchart1.ColumnCount = 1
  815.          vtchart1.ChartType = VtChChartType3dArea
  816.          ShowInfo "3dArea", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
  817.          
  818.       Case 23
  819.          vtchart1.ColumnCount = 1
  820.          vtchart1.ChartType = VtChChartType3dStep
  821.          ShowInfo "3dStep", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
  822.          
  823.       Case 24
  824.          vtchart1.ColumnCount = 4
  825.          vtchart1.ChartType = VtChChartType3dCombination
  826.          With vtchart1.Plot.SeriesCollection
  827.             .Item(1).SeriesType = VtChSeriesType3dLine
  828.             .Item(2).SeriesType = VtChSeriesType3dBar
  829.             .Item(3).SeriesType = VtChSeriesType3dStep
  830.             .Item(4).SeriesType = VtChSeriesType3dArea
  831.          End With
  832.          ShowInfo "3dCombination", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
  833.          
  834.       Case 25
  835.          vtchart1.ColumnCount = 2
  836.          vtchart1.ChartType = VtChChartType3dClusteredBar
  837.          ShowInfo "3dClusteredBar", "Category", "Value", "Value", "", "1", "", "", "", "", ""
  838.          
  839.       Case 26
  840.          vtchart1.ColumnCount = 1
  841.          vtchart1.ChartType = VtChChartType3dHorizontalBar
  842.          vtchart1.Plot.Axis(VtChAxisIdZ).AxisScale.Hide = True
  843.          ShowInfo "3dHorizontalBar", "Category", "Value", "", "", "1", "", "", "", "", ""
  844.          
  845.       Case 27
  846.          vtchart1.ColumnCount = 2
  847.          vtchart1.ChartType = VtChChartType3dGantt
  848.          ShowInfo "3dGantt", "Category", "Date", "", "Category", "2", "Start Date", "Duration", "", "", ""
  849.          
  850.       Case 28
  851.          vtchart1.ColumnCount = 1
  852.          vtchart1.ChartType = VtChChartType3dPie
  853.          ShowInfo "3dPie", "Pie Labels", "", "", "", "1", "", "", "", "", ""
  854.          
  855.       Case 29
  856.          vtchart1.ColumnCount = 1
  857.          vtchart1.ChartType = VtChChartType3dDoughnut
  858.          ShowInfo "3dDoughnut", "Doughnut Labels", "", "", "", "1", "", "", "", "", ""
  859.          
  860.       Case 30
  861.          vtchart1.ColumnCount = 4
  862.          vtchart1.ChartType = VtChChartType3dSurface
  863.          ShowInfo "3dSurface", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
  864.          
  865.       Case 31
  866.          vtchart1.ColumnCount = 3
  867.          vtchart1.Plot.SeriesCollection.Item(1).SeriesMarker.Show = True
  868.          vtchart1.ChartType = VtChChartType3dXYZ
  869.          ShowInfo "3dXYZ", "Value", "Value", "Value", "Value", "3", "X Value", "Y Value", "Z Value", "", ""
  870.       
  871.       Case 32
  872.          vtchart1.ColumnCount = 3
  873.          vtchart1.Plot.SeriesCollection.Item(1).SeriesMarker.Show = True
  874.          vtchart1.ChartType = VtChChartType3dScatter
  875.          ShowInfo "3dScatter", "Value", "Value", "Value", "Value", "3", "X Value", "Y Value", "Z Value", "", ""
  876.          
  877.    End Select
  878.    SetGridData
  879. End Sub
  880. Private Sub SetGridData()
  881.    Dim i%, j%
  882.    '' Clear the grid and set new size
  883.    Grid1.Rows = 2
  884.    Grid1.Cols = 2
  885.    Grid1.Rows = vtchart1.RowCount + 2
  886.    Grid1.Cols = vtchart1.ColumnCount + 2
  887.    '' Make the Grid Columns wider
  888.    For i = 1 To Grid1.Cols - 1
  889.       Grid1.ColWidth(i) = 800
  890.    Next i
  891.    '' Set row labels in first column of grid
  892.    Grid1.Col = 1
  893.    For i = 2 To vtchart1.RowCount + 1
  894.       Grid1.Row = i
  895.       Grid1.Text = "Row " & (i - 1)
  896.    Next i
  897.    '' Set column labels - All charts contain one series except
  898.    '' for combo and clustered bar
  899.    Grid1.Row = 1
  900.    Grid1.Col = 2
  901.    Grid1.Text = "Series " & 1
  902.    If (vtchart1.ChartType = VtChChartType2dCombination) Or _
  903.       (vtchart1.ChartType = VtChChartType3dCombination) Or _
  904.       (vtchart1.ChartType = VtChChartType3dClusteredBar) Or _
  905.       (vtchart1.ChartType = VtChChartType3dSurface) Or _
  906.       (vtchart1.ChartType = VtChChartType2dContour) Then
  907.       For i = 2 To vtchart1.ColumnCount
  908.          Grid1.Col = i + 1
  909.          Grid1.Text = "Series " & i
  910.       Next
  911.    End If
  912.    '' Set data in grid
  913.    For i = vtchart1.RowCount + 1 To 2 Step -1
  914.       Grid1.Row = i
  915.       For j = vtchart1.ColumnCount + 1 To 2 Step -1
  916.          Grid1.Col = j
  917.          Grid1.Text = Str(i * j * 10)
  918.       Next j
  919.    Next i
  920.    '' Set date data for HiLo chart in first column
  921.    If (vtchart1.ChartType = VtChChartType2dHiLo) Then
  922.       'set date data for column 2 if column 2 is dates series
  923.       Grid1.Col = 2
  924.       'set series name to dates if column 1 series type is dates, otherwise column 1 name is series1
  925.       vtchart1.Column = 1
  926.       If vtchart1.SeriesType = VtChSeriesType2dDates Then
  927.          'when HiLo chart type uses date X axis
  928.          For i = 2 To vtchart1.RowCount + 1
  929.             Grid1.Row = i
  930.             Grid1.Text = Str(34988 + i * 4)
  931.          Next i
  932.          'set label = dates for col2, series1 for col3, blank for rest of the columns
  933.          Grid1.Row = 1
  934.          Grid1.Col = 2
  935.          Grid1.Text = "Dates"
  936.          Grid1.Col = 3
  937.          Grid1.Text = "Series 1"
  938.       Else
  939.          'when HiLo chart type uses category X axis
  940.          Grid1.Row = 1
  941.          Grid1.Col = 2
  942.          Grid1.Text = "Series 1"
  943.       End If
  944.    End If
  945.    GridToDataGrid
  946. End Sub
  947. Private Sub GridToDataGrid()
  948.    Dim i%, j%
  949.    '' Set column labels
  950.    Grid1.Row = 1
  951.    For i = 1 To vtchart1.ColumnCount
  952.       Grid1.Col = i + 1
  953.       vtchart1.Column = i
  954.       vtchart1.ColumnLabel = Grid1.Text
  955.    Next i
  956.    '' Set row labels
  957.    Grid1.Col = 1
  958.    For i = 1 To vtchart1.RowCount
  959.       Grid1.Row = i + 1
  960.       vtchart1.Row = i
  961.       vtchart1.RowLabel = Grid1.Text
  962.    Next i
  963.    '' For these simple charts their is always one
  964.    '' level of row and col labels
  965.    For i = 1 To vtchart1.RowCount
  966.       For j = 1 To vtchart1.ColumnCount
  967.          Grid1.Row = i + 1
  968.          Grid1.Col = j + 1
  969.          vtchart1.DataGrid.SetData i, j, Val(Grid1.Text), False
  970.       Next j
  971.    Next i
  972. End Sub
  973.