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

Chart Empty Values = Previous Value?

Status
Not open for further replies.

tqeonline

MIS
Oct 5, 2009
304
US
I have a line chart and i'm setting its interval to 1 and it is referencing days.

So if i feed it 10/1 and 10/3 it fills in 10/2

Is there anyway to make the y-axis of 10/2 = 10/1?

The reason is that it is currently showing the line trending up... when in reality it isn't.

Any ideas?

- Matt

"If I must boast, I will boast of the things that show my weakness"

- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008
 
This is what i have so far... it messes up the numbers some

Code:
        'Creates the Running Total for Active Defects
        Dim Sum As Integer
        Sum = 0
        For x = 0 To chtConvergence.Series(2).Points.Count - 1
            Sum = Sum + chtConvergence.Series(2).Points(x).YValues.Sum
            chtConvergence.Series(2).Points(x).SetValueY(Sum)

            If x + 1 <= chtConvergence.Series(2).Points.Count - 1 Then
                Dim d1 As Date = DateAdd(DateInterval.Day, 1, Date.FromOADate(chtConvergence.Series(2).Points(x).XValue))
                Dim d2 As Date = Date.FromOADate(chtConvergence.Series(2).Points(x + 1).XValue)
                Dim y As Integer = 0
                If d1 < d2 Then
                    For y = 1 To DateDiff(DateInterval.Day, d1, d2)
                        d1 = DateAdd(DateInterval.Day, y, Date.FromOADate(chtConvergence.Series(2).Points(x).XValue))
                        'd2 = Date.FromOADate(chtConvergence.Series(2).Points(x + 1).XValue)
                        If d1 < d2 Then
                            chtConvergence.Series(2).Points.InsertXY(x + y, DateAdd(DateInterval.Day, y, Date.FromOADate(chtConvergence.Series(2).Points(x).XValue)), Sum)

                            'x = x + 1
                        End If

                    Next y
                    x = x + y
                End If
            End If
        Next x

- Matt

"If I must boast, I will boast of the things that show my weakness"

- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top