Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 10th, 2003, 05:21 PM
Registered User
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 3 dimensional array with MSChart

I want to use a 3 dimensional array with MSChart to add multiple lines the chart. My project worked fine until I added the 3rd dimension to the array.

Here is part of the code. I hope it is enough.


ReDim chrtArray(1 To 2, 1 To lGreatestValue, 1 To 2)
MSChart1.ShowLegend = True
MSChart1.chartType = VtChChartType2dLine
'
'Chart X and Y axis titles
'
MSChart1.Plot.Axis(VtChAxisIdX).AxisTitle.Text = cboDateType.Text
MSChart1.Plot.Axis(VtChAxisIdY).AxisTitle.Text = ""
'
'Load the array with 0s with correct # of rows
'
For X = 1 To lGreatestValue
  chrtArray(1, X, 1) = 0
  chrtArray(1, X, 2) = X
Next X
'
'Load the array with data
'
For X = 1 To rstCategories.RecordCount
  chrtArray(1, rstCategories!datetype, 1) = rstCategories!Calls
  rstCategories.MoveNext
Next X
'
'Attach the array of data to MS-CHART
'
With MSChart1
    .ChartData = chrtArray :(:(:( I think the problem is here :(:(:(
    .ColumnCount = 1
    .ColumnLabelCount = 1
    .Column = 1
    .ColumnLabel = "Call Volume"

 
Old July 11th, 2003, 03:47 PM
Registered User
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm SO STUPID!

Nevermind:D






Similar Threads
Thread Thread Starter Forum Replies Last Post
using 2 dimensional array Abraham EJB 0 July 17th, 2007 09:27 AM
two-dimensional array Lizane Java Basics 4 May 23rd, 2007 09:35 AM
2 dimensional array trangd Beginning PHP 0 August 18th, 2005 12:37 AM
2 dimensional array venterjo General .NET 2 January 23rd, 2005 09:04 AM
Searching a two dimensional array Dinesh22 VB.NET 2002/2003 Basics 1 January 13th, 2004 03:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.