Combination Chart: Bar & Line

Coordinator
Oct 2, 2013 at 7:48 AM
Sub DhtmlxCharts13()
        ' bar chart
        Dim dhtmlxChart2 As New dhtmlxChart2
        dhtmlxChart2.Title = "dhtmlxChart: Combination Chart (Bar & Line)"
        dhtmlxChart2.Heading = dhtmlxChart2.Title
        dhtmlxChart2.ChartType = dhtmlxChart2.ChartTypeEnum.bar
        dhtmlxChart2.Width = "500px"
        dhtmlxChart2.Height = "500px"
        dhtmlxChart2.border = "border:1px solid #A4BED4"
        dhtmlxChart2.value = "sales"
        dhtmlxChart2.BarChart.color = System.Drawing.Color.LightGreen
        dhtmlxChart2.BarChart.xAxis.template = "year"
        ' the first column name should alwways be the x axis column name
        dhtmlxChart2.AddColumns("year", "sales", "sales1")
        dhtmlxChart2.AddXY("2001", "3.8", "3.0")
        dhtmlxChart2.AddXY("2002", "3.4", "2.0")
        dhtmlxChart2.AddXY("2003", "3.1", "1.5")
        dhtmlxChart2.AddXY("2004", "4.4", "2.5")
        dhtmlxChart2.AddXY("2005", "4.7", "4.8")
        dhtmlxChart2.AddXY("2009", "4.8", "5.0")
        ' add line series
        Dim nColumn As New dhtmlxChart2.Column
        With nColumn
            .value = "sales1"
            .view = dhtmlxChart2.ChartTypeEnum.line
            .line.color = System.Drawing.Color.Blue
            .line.visible = True
            .item.radius = 0
            .item.visible = True
        End With
        dhtmlxChart2.AddSeries(nColumn)
        WebSite.File_Write("~/dhtmlxChart.html", dhtmlxChart2.Render)
        regLeft.IFrameUrl = "dhtmlxChart.html"
    End Sub