Bar Sorting

Coordinator
Oct 2, 2013 at 7:53 AM
Sub DhtmlxCharts12()
        Dim dhtmlxChart2 As New dhtmlxChart2
        dhtmlxChart2.Title = "dhtmlxChart: Bar Sorting"
        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.label = "sales"
        ' the first column name should alwways be the x axis column name
        dhtmlxChart2.AddColumns("year", "sales")
        dhtmlxChart2.AddXY("2000", "5.0")
        dhtmlxChart2.AddXY("2001", "2.8")
        dhtmlxChart2.AddXY("2002", "1.1")
        dhtmlxChart2.AddXY("2003", "4.4")
        dhtmlxChart2.AddXY("2004", "2.6")
        dhtmlxChart2.AddXY("2005", "4.1")
        dhtmlxChart2.XAxisSet(dhtmlxChart2.BarChart.xAxis, "Year", "year", True)
        dhtmlxChart2.BarChart.yAxis.title = "Sales per Year"
        dhtmlxChart2.Sort("sales", dhtmlxChart2.SortDirectionEnum.dsc, dhtmlxChart2.SortMethodEnum.int)
        WebSite.File_Write("~/dhtmlxChart.html", dhtmlxChart2.Render)
        regLeft.IFrameUrl = "dhtmlxChart.html"
    End Sub