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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSChart Display Row Text

Status
Not open for further replies.

norason

Programmer
Jan 28, 2009
139
US
This code won't display the text I want on the row - it shows a thick black line.

It also puts the Millisecond legend about 3 inches below the thick line as if there were another column.

What setting am I missing?

I copied this code to another progam (even copied the MSChart graphic in order to get the properties identical) and on that progrm I don't see the horizontal legend, no row text and no vertical legend.

norason


With MSChart1
.chartType = VtChChartType2dLine
.RowCount = 1250
.ColumnCount = 1
.TitleText = "Graph"
.ChartData = arr
With .DataGrid
.SetSize 26, 1, 1250, 1 '(rowLabelCount, columnLabelCount, dataRowCount, columnLabelCount)
MSChart1.RowCount = 1250
For rl = 1 To 1250
.RowLabel(rl, 1) = ""
Next
.RowLabel(50, 1) = "400"
.RowLabel(100, 1) = "800"
.RowLabel(150, 1) = "1200"
.RowLabel(200, 1) = "1600"
.RowLabel(250, 1) = "2000"
.RowLabel(300, 1) = "2400"
.RowLabel(350, 1) = "2800"
.RowLabel(400, 1) = "3200"
.RowLabel(450, 1) = "3600"
.RowLabel(500, 1) = "4000"
.RowLabel(550, 1) = "4400"
.RowLabel(600, 1) = "4800"
.RowLabel(650, 1) = "5200"
.RowLabel(700, 1) = "5600"
.RowLabel(750, 1) = "6000"
.RowLabel(800, 1) = "6400"
.RowLabel(850, 1) = "6800"
.RowLabel(900, 1) = "7200"
.RowLabel(950, 1) = "7600"
.RowLabel(1000, 1) = "8000"
.RowLabel(1050, 1) = "8400"
.RowLabel(1100, 1) = "8800"
.RowLabel(1150, 1) = "9200"
.RowLabel(1200, 1) = "9600"
.RowLabel(1250, 1) = "10000"
End With
With .Plot
With .Axis(VtChAxisIdY).ValueScale
.Auto = False
.Minimum = 0
.Maximum = 255
End With
With .Axis(VtChAxisIdX).AxisGrid
.MajorPen.VtColor.Set 204, 204, 204
.MajorPen.Width = 1
.MinorPen.VtColor.Set 204, 204, 204
.MinorPen.Width = 1
End With
With .Axis(VtChAxisIdY).AxisGrid
.MajorPen.VtColor.Set 204, 204, 204
.MajorPen.Width = 2
.MinorPen.VtColor.Set 204, 204, 204
.MinorPen.Width = 2
End With
With .SeriesCollection
.Item(1).LegendText = "Data"
With .Item(1).DataPoints(-1) 'controls text for flow line - grid too small - can't see the text
.Brush.FillColor.Set 255, 0, 0 '# red line
End With
End With '#seriescoll
End With '# plot
End With
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top