Skip to content

Commit

Permalink
Fixes issue 1664 (#1665)
Browse files Browse the repository at this point in the history
* Fixes issue #1664

* Removed commented-out code
  • Loading branch information
JanKallman authored Nov 7, 2024
1 parent 46a4ace commit 007c7ec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/EPPlus/Drawing/Chart/ExcelChartStandard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,9 @@ internal ExcelChartStandard(ExcelDrawings drawings, XmlNode node, Uri uriChart,
Part = part;
ChartXml = chartXml;
_chartNode = chartNode;
InitSeries(this, drawings.NameSpaceManager, _chartNode, PivotTableSource != null);
InitChartLoad(drawings, chartNode);
InitChartLoad(drawings, chartNode, PivotTableSource != null);
ChartType = GetChartType(chartNode.LocalName);
}
}
internal ExcelChartStandard(ExcelChart topChart, XmlNode chartNode, ExcelGroupShape parent, string drawingPath = "xdr:graphicFrame", string nvPrPath = "xdr:nvGraphicFramePr/xdr:cNvPr") :
base(topChart, chartNode, parent, drawingPath, nvPrPath)
{
Expand All @@ -113,12 +112,10 @@ internal ExcelChartStandard(ExcelChart topChart, XmlNode chartNode, ExcelGroupSh
ChartXml = topChart.ChartXml;
_plotArea = topChart.PlotArea;
_chartNode = chartNode;
InitSeries(this, topChart._drawings.NameSpaceManager, _chartNode, false);
InitChartLoad(topChart._drawings, chartNode);
InitChartLoad(topChart._drawings, chartNode, false);
}
private void InitChartLoad(ExcelDrawings drawings, XmlNode chartNode)
private void InitChartLoad(ExcelDrawings drawings, XmlNode chartNode, bool isPivot)
{
bool isPivot = false;
Init(drawings, chartNode);
InitSeries(this, drawings.NameSpaceManager, _chartNode, isPivot);
LoadAxis();
Expand Down
9 changes: 9 additions & 0 deletions src/EPPlusTest/Issues/ChartIssues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,5 +359,14 @@ public void s694_3()
SaveAndCleanup(package);
}
}
[TestMethod]
public void s754()
{
using (var package = OpenTemplatePackage("s754.xlsx"))
{
var workbook = package.Workbook;
SaveAndCleanup(package);
}
}
}
}

0 comments on commit 007c7ec

Please sign in to comment.