Bar Chart

Coordinator
Oct 2, 2013 at 7:47 AM
Sub DhtmlxCharts1()
        ' bar chart
        Dim dhtmlxChart2 As New dhtmlxChart2
        dhtmlxChart2.Title = "dhtmlxChart: Bar Chart"
        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.Color = dhtmlxChart2.HTMLColorTranslate("#66cc33")
        dhtmlxChart2.BarChart.width = 30
        dhtmlxChart2.BarChart.tooltip = "sales"
        dhtmlxChart2.BarChart.xAxis.title = "Sales per year"
        dhtmlxChart2.BarChart.xAxis.template = "year"
        dhtmlxChart2.BarChart.yAxis.scale_start = 3
        dhtmlxChart2.BarChart.yAxis.scale_end = 9
        dhtmlxChart2.BarChart.yAxis.scale_step = 3
        dhtmlxChart2.BarChart.yAxis.SetScales = True
        dhtmlxChart2.BarChart.yAxis.template = dhtmlxChart2.InQuotes("{obj}")
        dhtmlxChart2.BarChart.yAxis.title = "Sales, Millions"
        ' the first column name should alwways be the x axis column name
        dhtmlxChart2.AddColumns("year", "sales")
        dhtmlxChart2.AddXY("2001", "3.8")
        dhtmlxChart2.AddXY("2002", "3.4")
        dhtmlxChart2.AddXY("2003", "3.1")
        dhtmlxChart2.AddXY("2004", "4.4")
        dhtmlxChart2.AddXY("2005", "4.7")
        dhtmlxChart2.AddXY("2009", "4.8")
        WebSite.File_Write("~/dhtmlxChart.html", dhtmlxChart2.Render)
        regLeft.IFrameUrl = "dhtmlxChart.html"
    End Sub