Hi all! I am totally new to the Chart object found in Windows.Forms.Datavisualization. I have found some tutorials around on the net, but none of them seem instructive regarding the issue I am having.
I am using VB.NET, querying from a database, and the result is always a single row with 7 columns, each having an integer value. I want the values returned in the row displayed in vertical bars with height matching the value returned, with each column's value spaced out along the X axis.
Every tutorial I've come across has been set up to have the values retrieved from successive rows in a dataset. I have tried using the Series.Points.AddXY() function to manually map the values, but that isn't quite working right either.
Code:
Dim row As DataRow = ds.Tables(0).Rows(0)
chtForecast.Series(0).Points.AddXY(1, row.Item("Tomorrow"))
chtForecast.Series(0).Points.AddXY(2, row.Item("Day2"))
chtForecast.Series(0).Points.AddXY(3, row.Item("Day3"))
chtForecast.Series(0).Points.AddXY(4, row.Item("Day4"))
chtForecast.Series(0).Points.AddXY(5, row.Item("Day5"))
chtForecast.Series(0).Points.AddXY(6, row.Item("Day6"))
chtForecast.Series(0).Points.AddXY(7, row.Item("Day7"))
For some reason the above code causes only one bar (column) to be drawn, and I have confirmed that it is the height of the largest value returned in the row.
If someone could help out with this, or even point me toward a more comprehensive review of the functionality of this Chart object, that would be much appreciated.