Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSChart won't show 2dline

Status
Not open for further replies.

norason

Programmer
Jan 28, 2009
139
US
This is my first try at MSChart and I'm starting with a simple chart that should show a connected line. When I try to use the:
.ChartType=VtChChartType2dLine

instead of the:
.ChartType = VtChChartType2dBar
line, it just shows an empty grid.

What am I missing?

My next step is to feed the chart pairs of data, but I am not ready for that yet.

It also looks like the columns and rows are backward to what I normally think of a row and a column. I'm I just confused?

I've spent the last 6 hours looking all over the web, but I couldn't find any sample code that looks like it does what I want.

Thanks,

Gary

Private Sub cmdDrawGraph_Click()

With MSChart1
.ChartType = VtChChartType2dBar
'.ChartType=VtChChartType2dLine
.ColumnCount = 10
.RowCount = 20
Dim arrPrices(1 To 10)
Dim I As Integer
For I = 1 To 10
arrPrices(I) = I '* 2
Next I
MSChart1.ChartData = arrPrices
End With
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top