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.

C#

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

 

VB

' 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:

ChangeChartType.zip

 

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