When the diagram is a composite chart, use
var chart = sht.Drawings[0] as ExcelChart;
recognize only a single type of chart such as BarChart, the type that first appears on chart.xml
var chart2 = sht.Drawings[0].As.Chart.ScatterChart;
If I use code like this to reference the second type, the result is null
Our issue tracker is not intended for support related questions.
Please use Stack Overflow, if you represent a non-commercial organization or use our support portal if you have a commercial license.
EPPlus usage
Noncommercial use
Environment
Windows
Epplus version
7.4.2.1079
Spreadsheet application
Excel365
Description
When the diagram is a composite chart, use var chart = sht.Drawings[0] as ExcelChart; recognize only a single type of chart such as BarChart, the type that first appears on chart.xml
var chart2 = sht.Drawings[0].As.Chart.ScatterChart; If I use code like this to reference the second type, the result is null
composite chart.xlsx