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: