Articles in this section
Category / Section

How to change the chart type?

1 min read

There are many types of charts. You can change the type of chart by using the following code snippets.


// Embed chart to work sheet.
IChartShape chart = sheet.Charts.Add();
// Setting chart type.
chart.ChartType = ExcelChartType.Line;



' Embed chart to work sheet.
Dim chart As IChartShape = sheet.Charts.Add()
' Setting chart type.
chart.ChartType = ExcelChartType.Line


Here is the sample for your reference:


Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment