Here is my 'plot chart in webform.aspx.vb the graph should be a circle.
How do you convert Double to System.Collections.IEnumerable
x&y are double
DatabindXY is of IEnumerable
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim x, y
For t = 0 To 2 * 3.1459 Step 0.1
x = Math.Cos(t)
y = Math.Sin(t)
Chart1.Series("Series1").Points.DataBindXY(x,y)
Chart1.Series("Series1").IsVisibleInLegend = true
Chart1.Series("Series1").IsValueShownAsLabel = true;
Chart1.Series("Series1").Color = System.Drawing.Color.Red;
Next t
End Sub
I think this is what you want… (pardon my typos/compile errors, I haven’t done VB for a while)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim x As List(Of Double) = new List(Of Double), y As List(Of Double) = new List(Of Double)
For t = 0 To 2 * 3.1459 Step 0.1
x.Add(Math.Cos(t))
y.Add(Math.Sin(t))
Next t
Chart1.Series("Series1").Points.DataBindXY(x,y)
Chart1.Series("Series1").IsVisibleInLegend = true
Chart1.Series("Series1").IsValueShownAsLabel = true;
Chart1.Series("Series1").Color = System.Drawing.Color.Red;
End Sub