1

Resolved

Help With Line Chart

description

Hi, Please Help!!!
 
I'm Using this code to show a line chart in asp.net - vb.net, framework 3.5
 
        Dim Dt As New DataTable()
        Dt.AddDataColumn(New DataColumn())
        Dt.ListOfDataColumn(0).DataType = DataType.String
        Dt.ListOfDataColumn(0).Name = "Year/Month"
        Dt.AddDataColumn(New DataColumn())
        Dt.ListOfDataColumn(1).DataType = DataType.Number
        Dt.ListOfDataColumn(1).Name = "Banco Popular"
        Dt.AddDataColumn(New DataColumn())
        Dt.ListOfDataColumn(2).DataType = DataType.Number
        Dt.ListOfDataColumn(2).Name = "Scotia"
        '-------------------------------------------------------------------
        Dt.AddDataCell(New DataCell())
        Dt.ListOfDataCell(0).Caption = "01/01/2008"
        Dt.ListOfDataCell(0).Value = 1200
        Dt.AddDataCell(New DataCell())
        Dt.ListOfDataCell(1).Caption = "02/01/2008"
        Dt.ListOfDataCell(1).Value = 1110
        Dt.AddDataCell(New DataCell())
        Dt.ListOfDataCell(2).Caption = "03/01/2008"
        Dt.ListOfDataCell(2).Value = 1230
        '----------------------------------------------------------------------
        GVAPI.Visualization.Add(New Visualization())
        Me.GVAPI.Visualization.Item(0).Package = VisualizationPackage.LineChart
        Me.GVAPI.Visualization.Item(0).DataTable = Dt
        Me.GVAPI.Visualization.Item(0).DestObjectName = "visLineChart"
 
How Can I do to show other line for DataColumn "Scotia", actually only shows "Banco Popular" (See Attachment)

file attachments

comments

bykinag wrote Nov 22, 2009 at 11:58 AM

fixed, look at Release Page.

wrote Nov 22, 2009 at 12:00 PM

oswacots wrote Nov 23, 2009 at 12:07 PM

Thanks Bykinag, Works Very Well!!!

The new code in vb.net will be:
 Dim Dt As New DataTable()
        Dt.AddDataColumn(New DataColumn() With {.DataType = DataType.String, .Name = "Date"})
        Dt.AddDataColumn(New DataColumn() With {.DataType = DataType.Number, .Name = "B. Popular"})
        Dt.AddDataColumn(New DataColumn() With {.DataType = DataType.Number, .Name = "B. Scotia"})
        '----------------------------------------------------------------------
        Dt.AddDataCell(New DataCell With {.Caption = "01/01/2009", .Value = New List(Of String)(New String() {"120", "130"})})
        Dt.AddDataCell(New DataCell With {.Caption = "02/01/2009", .Value = New List(Of String)(New String() {"10", "20"})})
        Dt.AddDataCell(New DataCell With {.Caption = "02/01/2009", .Value = New List(Of String)(New String() {"10", "200"})})
        '----------------------------------------------------------------------
        GVAPI.Visualization.Add(New Visualization() With {.Package = VisualizationPackage.LineChart, .DataTable = Dt, .DestObjectName = "visLineChart"})
All comunity can use and modify this code with out problem!!


bykinag, I have another issue, when i try to show a VisualizationPackage.AnnotatedTimeLine, app show me: "First column must contain date, or date and time."... this happen because datatype "date" or "date and time" is missed in binary file GoogleVisualizationAPI.dll?

The Solution Would Be, Add This DataType?

Thank You Very Much For Your Help, From Colombia

bykinag wrote Nov 24, 2009 at 9:52 AM

DataType.Date is added.
look at Download page and source.

thanks oswacots.

wrote Feb 13, 2013 at 10:47 PM

wrote May 16, 2013 at 5:34 AM

wrote May 16, 2013 at 5:34 AM

wrote Jun 14, 2013 at 7:33 AM