Chart Object in Visual Basic 2010
Hello,
I have an application that loads and runs through some financial records and records a balance and the number of transactions. It then charts the data to the chart object. It works fine and when the program runs to completion I can view the chart data.
However if I close the chart and then re-open it, the chart shows no data and I have no idea why.
I am not sure of the number of transactions so I have defined an array to hold these which increments by one each time the procedure is called. Code is below; the first procedure adds the balance after each transaction to the array, along with the transaction
number (x,y coordinates). The second procedure displays the chart data when the "graph" button is clicked once the application has run.
It works once, but only once, if the I close the chart and re-open it, there is no data to display??
Any help greatly appreciated
Matt
Private Sub Track_Balance()
Array.Resize(current_balance, current_balance.Length + incBalanceArray) ' add some elements during runtime
current_balance(incBalanceArray) = totalBalance
Graph.Chart1.Series("Balance").Points.AddXY(totalTransactions, current_balance(incBalanceArray))
incBalanceArray = incBalanceArray + 1
End Sub
Private Sub GraphToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GraphToolStripMenuItem.Click
Graph.Visible = True
Graph.Chart1.Series("Balance").ChartType = DataVisualization.Charting.SeriesChartType.Line
Graph.Chart1.Series("Balance").Color = Color.DarkOrange
Graph.Chart1.Visible = True
End Sub
June 6th, 2012 12:15am
Hello,
I suggest you post your query in concerning scripting forum for early responses.
forum link is:http://social.technet.microsoft.com/Forums/en/ITCG/threadsRegards, Ravikumar P
Free Windows Admin Tool Kit Click here and download it now
June 6th, 2012 12:54am
Hello,
I suggest you post your query in concerning scripting forum for early responses.
forum link is:http://social.technet.microsoft.com/Forums/en/ITCG/threadsRegards, Ravikumar P
June 6th, 2012 1:01am


