Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

The Syncfusion .NET Excel (XlsIO) Library supports creating charts from Excel data, empowering users to generate visual representations of their data effortlessly. With XlsIO, users can create and customize charts using over 80+ Excel chart types, including Excel 2016 charts.

Chart Code Example

This example code shows how to create a chart in Excel using the Syncfusion .NET Excel Library with just a few lines of code in C#.

// Initialize Excel engine and application
using ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
// Open the existing workbook
using FileStream inputStream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorksheet worksheet = workbook.Worksheets[0];
// Create a Chart
IChartShape chart = worksheet.Charts.Add();
// Set the Chart Type
chart.ChartType = ExcelChartType.Column_Clustered;
// Set data range in the worksheet
chart.DataRange = worksheet.Range["A1:C6"];
chart.IsSeriesInRows = false;
// Set Datalabels
IChartSerie serie1 = chart.Series[0];
IChartSerie serie2 = chart.Series[1];
serie1.DataPoints.DefaultDataPoint.DataLabels.IsValue = true;
serie2.DataPoints.DefaultDataPoint.DataLabels.IsValue = true;
serie1.DataPoints.DefaultDataPoint.DataLabels.Position = ExcelDataLabelPosition.Outside;
serie2.DataPoints.DefaultDataPoint.DataLabels.Position = ExcelDataLabelPosition.Outside;
// Set Legend
chart.HasLegend = true;
chart.Legend.Position = ExcelLegendPosition.Bottom;
// Positioning the chart in the worksheet
chart.TopRow = 8;
chart.LeftColumn = 1;
chart.BottomRow = 23;
chart.RightColumn = 8;
// Save the Excel document
using FileStream outputStream = new FileStream("Chart.xlsx", FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);

Key features of charts

Discover how the charting capabilities in the Excel Library enable the easy creation, customization, and integration of charts within Excel worksheets.

Creating a Chart from Directly Entered Values

Generate charts using data directly entered into Excel cells, allowing for quick visualization without pre-existing datasets.

Creating a Chart by Adding Series

Create charts by adding data series, enabling greater flexibility and customization for comparing multiple datasets.

Excel 2016 Charts

Includes the new chart types introduced in Excel 2016, emphasizing advanced data visualization options like funnel, box and whisker, waterfall, histogram, Pareto, Treemap, and sunburst charts and treemaps. This is relevant for users looking to leverage modern chart types.

Chart Element Customization

Configure key chart components (plot area, chart area, axis, legends, data labels, and series) for clear and effective data representation.

Explore chart references

Discover valuable resources in our blog and knowledge base to enhance your skills in using Excel charts.

Create Excel 2016 Chart Types in C#

Blog

Create Excel 2016 Chart Types in C#

How to add chart titles with formulas in C# and VB.NET

Knowledge base

How to add chart titles with formulas in C#, VB.NET

How to position and re-size a plot area of a chart using WinForms XlsIO

Knowledge base

How to position and re-size a plot area of a chart using WinForms XlsIO

Show or hide an Excel chart legend in C# and VB.NET

Knowledge base

Show or hide an Excel chart legend in C#, VB.NET

How to change Excel chart series’ colors in C# and VB.NET

Knowledge base

How to change Excel chart series’ colors in C#, VB.NET

How to set trendlines for Excel chart series in C# and VB.NET

Knowledge base

How to set trendlines for Excel chart series in C#, VB.NET

Syncfusion .NET Excel Library Resources

Explore these resources for comprehensive guides, knowledge base articles, insightful blogs, and ebooks.

Frequently Asked Questions

Yes. Syncfusion Excel Library provides extensive formatting options for charts, enabling users to customize chart elements such as axis, chart area, plot area, data labels, data series, titles, and legends.

Yes, the Syncfusion Excel Library supports 3D settings like rotation, side wall, back wall, and floor settings for charts in Excel.

Yes, you can export charts as images in formats like PNG, JPG, and BMP.

Yes, the Syncfusion Excel Library allows users to fill the plot area and chart area with images, enhancing visual representation in Excel.

Yes, the Syncfusion Excel Library supports the addition of a data table to a chart in Excel. The data table, which is located beneath the chart, presents the chart content in table format.

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion® reduces customers’ development time.
Here are some of their experiences.

Rated by users across the globe

Want to create, View, and edit Excel files in C# or VB.NET?

Start a free 30-day evaluation today!
DOWNLOAD FREE TRIAL

No credit card required.

Mobile Free Evaluation Section

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion® is proud to hold the following industry awards.

Scroll up icon