[]
        
(Showing Draft Content)

Column Chart

Column charts are vertical versions of bar charts and use x-axis as a category axis. Column charts are preferred where number of values is too large to be used on an x-axis, while bar charts are preferred where long category titles are difficult to fit on an x-axis. For example, population share of different countries across the globe can be represented using a column chart.

DsExcel supports the following types of column charts.

Chart Type

Chart Snapshot

Use Case

Column3D

DsExcel chart output displaying the column3dchart result created with ChartType.Column3DChart for developers visualizing worksheet data in the corresponding chart format.

Column3D chart is used to display the chart demonstration in 3Dwhich is a modification of 2DColumn chart. It does not have a third dimension, it only looks volumetric in appearance.

ColumnClustered

DsExcel chart output displaying the columnclusteredchart result created with ChartType.ColumnClusteredChart for developers visualizing worksheet data in the corresponding chart format.

Column clustered chart is used to compare different values across different categories and show them in two-dimensional or three-dimensional vertical rectangles. This chart can be stacked normally in a regular way just like any other chart.

ColumnClustered3D

DsExcel chart output displaying the columnclustered3dchart result created with ChartType.ColumnClustered3DChart for developers visualizing worksheet data in the corresponding chart format.

Column clustered chart to represent the ColumnClustered chart demonstration in 3D, which looks volumetric in appearance.

ColumnStacked

DsExcel chart output displaying the columnstacked chart result created with ChartType.ColumnStacked for developers visualizing worksheet data in the corresponding chart format.

ColumnStacked chart is used to display the relationship of specific items to the whole across different categories and plot values in two-dimensional or three-dimensional vertical rectangles. This chart stacks the data series vertically (in a vertical direction).

ColumnStacked100

DsExcel chart output displaying the columnstacked100 chart result created with ChartType.ColumnStacked100 for developers visualizing worksheet data in the corresponding chart format.

ColumnStacked100 chart is used to perform comparisons of percentages that each of the values are contributing to the total, across all your categories in the spreadsheet. This chart stacks the data series vertically and also equalizes the plotted values to meet 100%. The plotted values are displayed in two-dimensional and three-dimensional rectangles.

ColumnStacked1003D

DsExcel chart output displaying the columnstacked1003d chart result created with ChartType.ColumnStacked1003D for developers visualizing worksheet data in the corresponding chart format.

ColumnStacked1003D is used to represent the ColumnStacked100 chart demonstration in 3D, which is a modification of 2D chart in appearance.

ColumnStacked3D

DsExcel chart output displaying the columnstacked3d chart result created with ChartType.ColumnStacked3D for developers visualizing worksheet data in the corresponding chart format.

ColumnStacked3D chart is used to represent the ColumnStacked chart demonstration in 3D, which looks volumetric in appearance.

Using Code

Refer to the following example code to add Column Stacked 3D Chart:

public void ColumnCharts()
  {
      // Initialize workbook
      Workbook workbook = new Workbook();
      // Fetch default worksheet 
      IWorksheet worksheet = workbook.Worksheets[0];
      // Prepare data for chart
      worksheet.Range["A1:D4"].Value = new object[,]
      {
           {null, "Q1", "Q2", "Q3"},
           {"Mobile Phones", 1330, 2345, 3493},
           {"Laptops", 2032, 3632, 2197},
           {"Tablets", 6233, 3270, 2030}
      };
      worksheet.Range["A:D"].Columns.AutoFit();
      // Add Column Chart
      IShape columnChartshape = worksheet.Shapes.AddChart(ChartType.ColumnStacked3D, 250, 20, 360, 230);

      // Adding series to SeriesCollection
      columnChartshape.Chart.SeriesCollection.Add(worksheet.Range["A1:D4"], RowCol.Columns, true, true);

      // Configure Chart Title 
      columnChartshape.Chart.ChartTitle.TextFrame.TextRange.Paragraphs.Add("Annual Sales Record");

      // Saving workbook to Xlsx
      workbook.Save(@"20-ColumnChart.xlsx", SaveFileFormat.Xlsx);
  }