October 15th, 2012, 07:04 PM
Problem binding data row to chart
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.
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.
Dim row As DataRow = ds.Tables(0).Rows(0)
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.
October 19th, 2012, 06:23 PM
Problem is now gone
I'm not sure why this solved the problem, but I removed some dummy data from the chart that I'd entered in the designer interface in VS2010. Once I did that, everything came up correctly. I suppose the issue was that I was adding points whose values were the same as points already in the series.
December 20th, 2012, 12:45 AM
I am From Outsource . net And SharePoint Development Company. We Provide Custom Word Wide SharePoint Development And .Net Development service as per client requirement.
All your comment for SharePoint Development And . net Development are welcome.