Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
120
Column Chart using List Of
posted

I trying use simple column chart for test. But i'm receiving an message error. "you must have at least one row and one numeric column"
What I doing wrong?

Public Class _Default
Inherits System.Web.UI.Page

   Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      Dim list As New List(Of MyReg)
      list.Add(New MyReg("fabio", 28, 15, Date.Parse("01/01/2016")))
      list.Add(New MyReg("Paula", 32, 3, Date.Parse("19/04/2016")))
      list.Add(New MyReg("Monica", 47, 90, Date.Parse("9/03/2016")))
      WebDataGrid1.DataSource = list

      Dim series As NumericSeries = New NumericSeries()

      series.Data.DataSource = list
      series.Data.LabelColumn = "Nome"
      series.Data.ValueColumn = "Valor"
      series.DataBind()
      UltraChart1.Series.Add(series)

      UltraChart1.Data.DataBind()

   End Sub

End Class

Public Class MyReg
   Property Nome As String
   Property Valor As Double
   Property Valor2 As Double
   Property Data As Date

   Sub New(ByVal Nome As String, ByVal Valor As Double, ByVal Valor2 As Double, ByVal Data As Date)
      _Nome = Nome
      _Valor = Valor
      _Valor2 = Valor2
      _Data = Data
   End Sub
End Class

Parents
No Data
Reply Children
No Data