Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/EPPlus/Drawing/Chart/ChartEx/ExcelChartExTitle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace OfficeOpenXml.Drawing.Chart.ChartEx
/// </summary>
public class ExcelChartExTitle : ExcelChartTitle
{
internal ExcelChartExTitle(ExcelChart chart, XmlNamespaceManager nsm, XmlNode node) : base(chart, nsm, node, "cx", 0)
internal ExcelChartExTitle(ExcelChart chart, XmlNamespaceManager nsm, XmlNode node) : base(chart, nsm, node, "cx", "title", 0)
{

}
Expand Down
39 changes: 29 additions & 10 deletions src/EPPlus/Drawing/Chart/ExcelChartAxisStandard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,15 @@ Date Author Change
*************************************************************************************************
04/22/2020 EPPlus Software AB Added this class
*************************************************************************************************/
using OfficeOpenXml.ExternalReferences;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Finance;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
using OfficeOpenXml.FormulaParsing.Excel.Functions.MathFunctions;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup.Sorting;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using OfficeOpenXml.FormulaParsing.Utilities;
using OfficeOpenXml.Style.XmlAccess;
using OfficeOpenXml.Utils.EnumUtils;
using OfficeOpenXml.Utils.TypeConversion;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection.Emit;
using System.Xml;
using static OfficeOpenXml.Style.XmlAccess.ExcelNumberFormatXml;
namespace OfficeOpenXml.Drawing.Chart
Expand Down Expand Up @@ -358,7 +350,7 @@ internal override ExcelChartTitle GetTitle()
if (_title == null)
{
AddTitleNode();
_title = new ExcelChartTitleStandard(_chart, NameSpaceManager, TopNode, "c", 0);
_title = new ExcelChartTitleStandard(_chart, NameSpaceManager, TopNode, "c", "title", IsVertical ? 270 : 0);
}
return _title;
}
Expand Down Expand Up @@ -691,6 +683,23 @@ public override double DisplayUnit
}
}
}
const string _dispUnitLblPath = "dispUnits/c:dispUnitsLbl";
private ExcelChartTitle _displayUnitTitle = null;
/// <summary>
/// A title associated with the display units.
/// </summary>
public ExcelChartTitle DisplayUnitTitle
{
get
{
if (_displayUnitTitle==null)
{
_displayUnitTitle = new ExcelChartTitleStandard(_chart, NameSpaceManager, TopNode, "c", _dispUnitLblPath, IsVertical ? 270 : 0);
}
return _displayUnitTitle;
}
}

const string _majorUnitPath = "c:majorUnit/@val";
const string _majorUnitCatPath = "c:tickLblSkip/@val";
/// <summary>
Expand Down Expand Up @@ -1089,7 +1098,6 @@ internal void GetSeriesValues(out bool isCount, out bool isMultiLevel, out List<
foreach (var serie in ct.Series)
{
var l = new List<object>();
values.Add(l);
if (AxisType == eAxisType.Cat)
{
if (string.IsNullOrEmpty(serie.XSeries) && (serie.NumberLiteralsX == null || serie.NumberLiteralsX.Length == 0) && (serie.StringLiteralsX == null || serie.StringLiteralsX?.Length == 0))
Expand All @@ -1103,6 +1111,11 @@ internal void GetSeriesValues(out bool isCount, out bool isMultiLevel, out List<
{
serie.AddFromSerie(l, true, true, new string[] { serie.HeaderAddress?.Address, serie.GetHeaderText(ix) }, out isMultiLevel);
}
else
{
ix++;
continue;
}
}
}
else
Expand All @@ -1116,7 +1129,13 @@ internal void GetSeriesValues(out bool isCount, out bool isMultiLevel, out List<
{
serie.AddFromSerie(l, true, false, null, out isMultiLevel);
}
else
{
ix++;
continue;
}
}
values.Add(l);
pl = l;
ix++;
}
Expand Down
2 changes: 1 addition & 1 deletion src/EPPlus/Drawing/Chart/ExcelChartStandard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ internal void RemoveSecondaryAxis()
}
internal override ExcelChartTitle GetTitle()
{
return new ExcelChartTitleStandard(this, NameSpaceManager, ChartXml.SelectSingleNode("c:chartSpace/c:chart", NameSpaceManager), "c", 0);
return new ExcelChartTitleStandard(this, NameSpaceManager, ChartXml.SelectSingleNode("c:chartSpace/c:chart", NameSpaceManager), "c", "title", 0);
}
/// <summary>
/// True if the chart has a title
Expand Down
Loading
Loading