Enum ChartType

ChartType enumeration

Enumerates all chart types used in Excel.

public enum ChartType

Values

NameValueDescription
Area0Represents Area Chart.
AreaStacked1Represents Stacked Area Chart.
Area100PercentStacked2Represents 100% Stacked Area Chart.
Area3D3Represents 3D Area Chart.
Area3DStacked4Represents 3D Stacked Area Chart.
Area3D100PercentStacked5Represents 3D 100% Stacked Area Chart.
Bar6Represents Bar Chart: Clustered Bar Chart.
BarStacked7Represents Stacked Bar Chart.
Bar100PercentStacked8Represents 100% Stacked Bar Chart.
Bar3DClustered9Represents 3D Clustered Bar Chart.
Bar3DStacked10Represents 3D Stacked Bar Chart.
Bar3D100PercentStacked11Represents 3D 100% Stacked Bar Chart.
Bubble12Represents Bubble Chart.
Bubble3D13Represents 3D Bubble Chart.
Column14Represents Column Chart: Clustered Column Chart.
ColumnStacked15Represents Stacked Column Chart.
Column100PercentStacked16Represents 100% Stacked Column Chart.
Column3D17Represents 3D Column Chart.
Column3DClustered18Represents 3D Clustered Column Chart.
Column3DStacked19Represents 3D Stacked Column Chart.
Column3D100PercentStacked20Represents 3D 100% Stacked Column Chart.
Cone21Represents Cone Chart.
ConeStacked22Represents Stacked Cone Chart.
Cone100PercentStacked23Represents 100% Stacked Cone Chart.
ConicalBar24Represents Conical Bar Chart.
ConicalBarStacked25Represents Stacked Conical Bar Chart.
ConicalBar100PercentStacked26Represents 100% Stacked Conical Bar Chart.
ConicalColumn3D27Represents 3D Conical Column Chart.
Cylinder28Represents Cylinder Chart.
CylinderStacked29Represents Stacked Cylinder Chart.
Cylinder100PercentStacked30Represents 100% Stacked Cylinder Chart.
CylindricalBar31Represents Cylindrical Bar Chart.
CylindricalBarStacked32Represents Stacked Cylindrical Bar Chart.
CylindricalBar100PercentStacked33Represents 100% Stacked Cylindrical Bar Chart.
CylindricalColumn3D34Represents 3D Cylindrical Column Chart.
Doughnut35Represents Doughnut Chart.
DoughnutExploded36Represents Exploded Doughnut Chart.
Line37Represents Line Chart.
LineStacked38Represents Stacked Line Chart.
Line100PercentStacked39Represents 100% Stacked Line Chart.
LineWithDataMarkers40Represents Line Chart with data markers.
LineStackedWithDataMarkers41Represents Stacked Line Chart with data markers.
Line100PercentStackedWithDataMarkers42Represents 100% Stacked Line Chart with data markers.
Line3D43Represents 3D Line Chart.
Pie44Represents Pie Chart.
Pie3D45Represents 3D Pie Chart.
PiePie46Represents Pie of Pie Chart.
PieExploded47Represents Exploded Pie Chart.
Pie3DExploded48Represents 3D Exploded Pie Chart.
PieBar49Represents Bar of Pie Chart.
Pyramid50Represents Pyramid Chart.
PyramidStacked51Represents Stacked Pyramid Chart.
Pyramid100PercentStacked52Represents 100% Stacked Pyramid Chart.
PyramidBar53Represents Pyramid Bar Chart.
PyramidBarStacked54Represents Stacked Pyramid Bar Chart.
PyramidBar100PercentStacked55Represents 100% Stacked Pyramid Bar Chart.
PyramidColumn3D56Represents 3D Pyramid Column Chart.
Radar57Represents Radar Chart.
RadarWithDataMarkers58Represents Radar Chart with data markers.
RadarFilled59Represents Filled Radar Chart.
Scatter60Represents Scatter Chart.
ScatterConnectedByCurvesWithDataMarker61Represents Scatter Chart connected by curves, with data markers.
ScatterConnectedByCurvesWithoutDataMarker62Represents Scatter Chart connected by curves, without data markers.
ScatterConnectedByLinesWithDataMarker63Represents Scatter Chart connected by lines, with data markers.
ScatterConnectedByLinesWithoutDataMarker64Represents Scatter Chart connected by lines, without data markers.
StockHighLowClose65Represents High-Low-Close Stock Chart.
StockOpenHighLowClose66Represents Open-High-Low-Close Stock Chart.
StockVolumeHighLowClose67Represents Volume-High-Low-Close Stock Chart.
StockVolumeOpenHighLowClose68Represents Volume-Open-High-Low-Close Stock Chart.
Surface3D69Represents Surface Chart: 3D Surface Chart.
SurfaceWireframe3D70Represents Wireframe 3D Surface Chart.
SurfaceContour71Represents Contour Chart.
SurfaceContourWireframe72Represents Wireframe Contour Chart.
BoxWhisker73The series is laid out as box and whisker.
Funnel74The series is laid out as a funnel.
ParetoLine75The series is laid out as pareto lines.
Sunburst76The series is laid out as a sunburst.
Treemap77The series is laid out as a treemap.
Waterfall78The series is laid out as a waterfall.
Histogram79The series is laid out as a histogram.
Map80The series is laid out as a region map.
RadialHistogram81The series is laid out as a radial historgram. It is used only for rendering

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using Aspose.Cells.Charts;
    using System;

    public class ChartTypeDemo
    {
        public static void ChartTypeExample()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            // Get the first worksheet
            Worksheet worksheet = workbook.Worksheets[0];

            // Add some sample data
            worksheet.Cells[0, 0].PutValue("Category");
            worksheet.Cells[0, 1].PutValue("Value");
            worksheet.Cells[1, 0].PutValue("A");
            worksheet.Cells[1, 1].PutValue(10);
            worksheet.Cells[2, 0].PutValue("B");
            worksheet.Cells[2, 1].PutValue(20);
            worksheet.Cells[3, 0].PutValue("C");
            worksheet.Cells[3, 1].PutValue(30);

            // Add a chart to the worksheet
            int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5);
            Chart chart = worksheet.Charts[chartIndex];

            // Set the data range for the chart
            chart.SetChartDataRange("A1:B4", true);

            // Set chart title
            chart.Title.Text = "Sample Chart";

            // Customize the chart type
            chart.Type = ChartType.Column3DClustered;

            // Save the workbook
            workbook.Save("ChartTypeExample.xlsx");
            workbook.Save("ChartTypeExample.pdf");
        }
    }
}

See Also