[]
        
(Showing Draft Content)

Combination Charts

Combo charts are the combination of two or more chart types in a single plot area. For instance, a bar and line chart in a single plot. Combination charts are best used to compare the different data sets that are related to each other, such as actual and target values, total revenue and profit, temperature and precipitation, etc. Note that these charts may require multiple axes to provide different scales for different values.

Sample Image

Description


Combo chart can be used to interpret and understand mixed types of data. This image has a combination of three chart types: ColumnClustered, Line and Area

Refer to the following example code to add a combo chart.

C#

// Enable enhanced shape and chart engines.
fpSpread1.Features.EnhancedShapeEngine = true;
fpSpread1.Features.EnhancedChartEngine = true;
// Add combo chart.
object[,] values = new object[,]
{
    {"Laptops",1, 3, 4,7, 8,12 },
    {"Tablets",2, 4, 5,12, 2,9 },
    {"Mobile Phones",0, 8, 2,1, 12,2 },
};
fpSpread1.AsWorkbook().ActiveSheet.SetValue(0, 0, values, false);
fpSpread1.AsWorkbook().ActiveSheet.Cells["A1:F3"].Select();
fpSpread1.AsWorkbook().ActiveSheet.Shapes.AddChart(GrapeCity.Spreadsheet.Charts.ChartType.ColumnClustered, 200, 150, 400, 400);
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects[0].Chart.Series[0].ChartType = ChartType.Line;
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects[0].Chart.Series[0].ChartType = ChartType.Area;
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects[0].Select();

VB

' Enable enhanced shape and chart engines.
fpSpread1.Features.EnhancedShapeEngine = True
fpSpread1.Features.EnhancedChartEngine = True
' Add combo chart.
Dim values As Object(,) = New Object(2, 6) {
    {"Laptops", 1, 3, 4, 7, 8, 12},
    {"Tablets", 2, 4, 5, 12, 2, 9},
    {"Mobile Phones", 0, 8, 2, 1, 12, 2}
}
fpSpread1.AsWorkbook().ActiveSheet.SetValue(0, 0, values, False)
fpSpread1.AsWorkbook().ActiveSheet.Cells("A1:F3").Select()
fpSpread1.AsWorkbook().ActiveSheet.Shapes.AddChart(GrapeCity.Spreadsheet.Charts.ChartType.ColumnClustered, 200, 150, 400, 400)
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects(0).Chart.Series(0).ChartType = ChartType.Line
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects(0).Chart.Series(0).ChartType = ChartType.Area
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects(0).Select()