Contact Sales

Call center available M-F 9:00 - 4:00 US Eastern Time.

Case Studies

Morpheus

Morpheus Software selected Xtreme Toolkit Professional with Visual C++ over...

Stacked Area Chart

A Stacked Area chart is very similar to an area chart. Data is displayed using different colors in the "area" below the line. Each series of points is represented with a different color. Area charts are commonly used to display accumulated values over a period of time.

// Sample Code
    'This sample shows how to add a stacked area chart

    ChartControl.Content.Legend.Visible = True
    ChartControl.Content.Legend.HorizontalAlignment = xtpChartLegendFar
    ChartControl.Content.EnableMarkup = True
    
    If ChartControl.Content.Series.Count > 0 Then
        ChartControl.Content.Series.DeleteAll
    End If
    
    ChartControl.Content.Legend.Visible = True
    ChartControl.Content.Legend.HorizontalAlignment = xtpChartLegendNearOutside
    
    Dim Series As ChartSeries
            
    Set Series = ChartControl.Content.Series.Add("North America")

    Series.Points.Add "Silver", 18
    Series.Points.Add "White", 17
    Series.Points.Add "Gray", 15
    Series.Points.Add "Blue", 12
    Series.Points.Add "Black", 11
    Series.Points.Add "Red", 11
    Series.Points.Add "Brown", 9
    Series.Points.Add "Other", 7
    
    Set Series = ChartControl.Content.Series.Add("Europe")

    Series.Points.Add "Silver", 29
    Series.Points.Add "White", 6
    Series.Points.Add "Gray", 16
    Series.Points.Add "Blue", 15
    Series.Points.Add "Black", 21
    Series.Points.Add "Red", 5
    Series.Points.Add "Brown", 3
    Series.Points.Add "Other", 5
    
    Set Series = ChartControl.Content.Series.Add("Asia")

    Series.Points.Add "Silver", 30
    Series.Points.Add "White", 24
    Series.Points.Add "Gray", 12
    Series.Points.Add "Blue", 9
    Series.Points.Add "Black", 13
    Series.Points.Add "Red", 4
    Series.Points.Add "Brown", 1
    Series.Points.Add "Other", 7
        
    Set Series = ChartControl.Content.Series.Add("South America")

    Series.Points.Add "Silver", 25
    Series.Points.Add "White", 13
    Series.Points.Add "Gray", 13
    Series.Points.Add "Blue", 8
    Series.Points.Add "Black", 21
    Series.Points.Add "Red", 11
    Series.Points.Add "Brown", 5
    Series.Points.Add "Other", 4
    
    ChartControl.Content.Titles.Add "Worlds Most Popular Vehicle Colors"
    ChartControl.Content.Legend.Visible = True
    
    Set ChartControl.Content.Series(3).Style = New ChartStackedAreaSeriesStyle
    ChartControl.Content.Series(3).Style.Label.Format = "%g !UNRECOGNISED ELEMENT TYPE '"
    Set ChartControl.Content.Series(2).Style = New ChartStackedAreaSeriesStyle
    ChartControl.Content.Series(2).Style.Label.Format = "%g '!"
    Set ChartControl.Content.Series(1).Style = New ChartStackedAreaSeriesStyle
    ChartControl.Content.Series(1).Style.Label.Format = "%g !UNRECOGNISED ELEMENT TYPE '"
    Set ChartControl.Content.Series(0).Style = New ChartStackedAreaSeriesStyle
    ChartControl.Content.Series(0).Style.Label.Format = "%g '!"
        
    Dim Diagram As ChartDiagram2D
    Set Diagram = ChartControl.Content.Series(0).Diagram
    Diagram.AxisY.Title = "% of Color Sold"
    Diagram.AxisY.Title.Visible = True
    Diagram.AxisX.Title = "Vehicle Color"
    Diagram.AxisX.Title.Visible = True
// Sample C# Code