Charting in VS 2005
Hello
I've been going thru Ged Mead's charting articles and they work in VS 2003 but not in VS 2005. The line chart in particular.
I am getting no errors but on the chart it has a solid blue horizontal line for the points instead of nice random points. I've tried to vary the data numbers since it seems they are simply maxed out but it didn't help.
Can someone take a look at this code?
As its rather long line of code I've attached a zipped file.
Steve
[519 byte] By [
codeUp] at [2007-11-20 11:42:44]

# 1 Re: Charting in VS 2005
The problem originates from DrawOutLine function. In this function you calculate the "VertLineLength" which is a variable in the Form class, but inside that function you declare a local "VertLineLength" variable in which you store the calculated value. When this function returns the Form's "VertLineLength is still 0.
So just remove this line from DrawOutLine function:
Dim VertLineLength As Integer = PBLineChart.Height - (BaseMargin + TopMargin)
The next line will store the value in Form's "VertLineLength" variable:
VertLineLength = PBLineChart.Height - (BaseMargin + TopMargin)
Laitinen