Stacked Area Chart

Coordinator
Oct 2, 2013 at 7:49 AM
Sub DhtmlxCharts3()
        ' stacked area chart
        Dim dhtmlxChart2 As New dhtmlxChart2
        dhtmlxChart2.Title = "dhtmlxChart: Stacked Area Chart"
        dhtmlxChart2.Heading = dhtmlxChart2.Title
        dhtmlxChart2.ChartType = dhtmlxChart2.ChartTypeEnum.stackedarea
        dhtmlxChart2.Width = "500px"
        dhtmlxChart2.Height = "500px"
        dhtmlxChart2.border = "border:1px solid #A4BED4"
        dhtmlxChart2.Value = "sales"
        dhtmlxChart2.AreaChart.alpha = "0.6"
        'dhtmlxChart2.AreaChart.color = dhtmlxChart2.HTMLColorTranslate("#66cc33")
        dhtmlxChart2.AreaChart.xAxis.title = "Year"
        dhtmlxChart2.AreaChart.xAxis.template = "year"
        dhtmlxChart2.AreaChart.yAxis.title = "Sales per Year"
        ' the first column name should alwways be the x axis column name
        dhtmlxChart2.AddColumns("year", "sales", "sales1", "sales2")
        dhtmlxChart2.AddXY("2000", "5.0", "3.4", "2.1")
        dhtmlxChart2.AddXY("2001", "2.8", "4.8", "1.3")
        dhtmlxChart2.AddXY("2002", "1.1", "4.4", "2.9")
        dhtmlxChart2.AddXY("2003", "4.4", "5.5", "2.6")
        dhtmlxChart2.AddXY("2004", "2.6", "6.0", "1.4")
        dhtmlxChart2.AddXY("2005", "4.1", "5.7", "1.1")
        dhtmlxChart2.AddSeries("sales", System.Drawing.Color.Red, "sales")
        dhtmlxChart2.AddSeries("sales1", System.Drawing.Color.Orange, "sales1")
        dhtmlxChart2.AddSeries("sales2", System.Drawing.Color.Green, "sales2")
        WebSite.File_Write("~/dhtmlxChart.html", dhtmlxChart2.Render)
        regLeft.IFrameUrl = "dhtmlxChart.html"
    End Sub