Code Example vb.net

Apr 9, 2010 at 12:48 PM

Is there an example code in vb.net available. Can't get it work by my onw.

kind regards,

Martijn Goedings

Apr 9, 2010 at 4:07 PM

sorry i have not this, i am just c#.net programmer

Aug 18, 2010 at 9:49 PM

Hi there!

I'm using this code en VB and it works fine!. Good luck!.

Carlos (Chile)

Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports GoogleVisualizationAPI

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 dt4 As New DataTable
        dt4.AddDataColumn(New DataColumn With {.DataType = DataType.Date, .Name = "Fecha"})
        dt4.AddDataColumn(New DataColumn With {.DataType = DataType.Number, .Name = "Curva 1"})
        dt4.AddDataColumn(New DataColumn With {.DataType = DataType.Number, .Name = "Curva 2"})
        dt4.AddDataColumn(New DataColumn With {.DataType = DataType.Number, .Name = "Curva 3"})

        dt4.AddDataCell(New DataCell With {.Caption = "01/03/2009", .Value = New List(Of String)({"300", "406", "250"})})
        dt4.AddDataCell(New DataCell With {.Caption = "01/06/2009", .Value = New List(Of String)({"140", "203", "180"})})
        dt4.AddDataCell(New DataCell With {.Caption = "01/09/2009", .Value = New List(Of String)({"550", "507", "430"})})
        dt4.AddDataCell(New DataCell With {.Caption = "01/12/2009", .Value = New List(Of String)({"752", "143", "220"})})
        dt4.AddDataCell(New DataCell With {.Caption = "01/03/2010", .Value = New List(Of String)({"300", "406", "250"})})
        dt4.AddDataCell(New DataCell With {.Caption = "01/06/2010", .Value = New List(Of String)({"140", "203", "180"})})
        dt4.AddDataCell(New DataCell With {.Caption = "01/09/2010", .Value = New List(Of String)({"550", "507", "430"})})
        dt4.AddDataCell(New DataCell With {.Caption = "01/12/2010", .Value = New List(Of String)({"752", "143", "220"})})

        GVAPI.Visualization.Add(New Visualization With {.Package = VisualizationPackage.AnnotatedTimeLine, .DataTable = dt4, .DestObjectName = visAnnotatedTimeLine.ID})

    End Sub

End Class