-
Notifications
You must be signed in to change notification settings - Fork 294
Styling Charts
Mats Alm edited this page Nov 6, 2023
·
9 revisions
EPPlus 5 and up supports over 100 new chart styles introduced in Excel 2016. These styles can be easily set by the new StyleManager
and its method SetChartStyle
- either using the ePresetChartStyle
enum or Excel's internal chart style number (supplied to the method as an int
).
var chart = ws.Drawings.AddBarChart("column3dChart", eBarChartType.ColumnClustered3D);
var serie = chart.Series.Add(ws.Cells[2, 7, 26, 7], ws.Cells[2, 6, 26, 6]);
serie.Header = "Order Value";
chart.SetPosition(0, 0, 8, 0);
chart.SetSize(1000, 300);
chart.Title.Text = "Column Chart 3D";
//Set style 9 and Colorful Palette 3
chart.StyleManager.SetChartStyle(ePresetChartStyle.Bar3dChartStyle9, ePresetChartColors.ColorfulPalette3);
EPPlus Software AB - https://epplussoftware.com
- What is new in EPPlus 5+
- Breaking Changes in EPPlus 5
- Breaking Changes in EPPlus 6
- Breaking Changes in EPPlus 7
- Breaking Changes in EPPlus 8
- Addressing a worksheet
- Dimension/Used range
- Copying ranges/sheets
- Insert/Delete
- Filling ranges
- Sorting ranges
- Taking and skipping columns/rows
- Data validation
- Comments
- Freeze and Split Panes
- Header and Footer
- Hyperlinks
- Autofit columns
- Grouping and Ungrouping Rows and Columns
- Formatting and styling
- The ExcelRange.Text property
- Conditional formatting
- Using Themes
- Working with custom named table- or slicer- styles