Browse our Products

Aspose.Slides for .NET 18.4 Release Notes

KeySummaryCategory
SLIDESNET-38623Insert video in presentation from Azure storage accountInvestigation
SLIDESNET-36069Make Aspose.Slides library interruptibleFeature
SLIDESNET-39935Support for Picture Organization Chart SmartArt LayoutFeature
SLIDESNET-33471Support for loading and using MS office theme file (*.thmx)Feature
SLIDESNET-38433The support of new PowerPoint 2016 chart typesFeature
SLIDESNET-38466Tree map chart in PP 2016Feature
SLIDESNET-39410Export shape to SVGFeature
SLIDESNET-39527Support for managing Header/Footer in handout and notes slidesFeature
SLIDESNET-39760Support for Box and Whisker chartFeature
SLIDESNET-39902Performance and Memory IssuesFeature
SLIDESNET-39941Support for rendering emoji charactersFeature
SLIDESNET-39933The vertical axis labels are improperly wrapped in the image outputBug
SLIDESNET-39954SVG to PPTX - wrong font substitutionBug
SLIDESNET-39955SVG to PPTX or EMF - missing nested SVGBug
SLIDESNET-39674Legend is shifted and incorrect formatting when saving PPTX as HTMLBug
SLIDESNET-39687Fonts in PowerPoint document and resulting HTML are differentBug
SLIDESNET-39947Unable to Save presentation after loading external fontsBug
SLIDESNET-39948Duplicated evaluation watermarks when saving as imageBug
SLIDESNET-39981Bug with using “GetCoordinates” method from portionBug
SLIDESNET-39982Incorrect coordinates of portion in which text compressed to vertical lineBug
SLIDESNET-39983Incorrect Y coordinates for portion from “GetCoordinates” methodBug
SLIDESNET-39984Incorrect Y coordinates for paragraph from “GetRect” methodBug
SLIDESNET-39985Incorrect relative for Y coordinate of portionBug
SLIDESNET-39986Enumerator of formats in SaveFormat has the same valuesBug
SLIDESNET-39869High memory consumption while converting PPTX to PDFBug
SLIDESNET-33546PPT to PPTX conversion results in multiple issuesBug
SLIDESNET-33561Slide Text rendered in black color instead of whiteBug
SLIDESNET-33562Slide Text rendered in black color instead of whiteBug
SLIDESNET-33563Slide Text improperly rendered and overflows some slidesBug
SLIDESNET-33565The footer text over flowed slide in converted PPTX and exported PDFBug
SLIDESNET-33567Table is improperly rendered in converted PPTX and exported PDFBug
SLIDESNET-35487Footer changing on saving the PPT filesBug
SLIDESNET-36229OutOfMemory Exception on loading big presentation with videosBug
SLIDESNET-36370Picture not rendering correctly when PPTX converted to PDFBug
SLIDESNET-39487Background color change after saving PPTBug
SLIDESNET-39570Radar chart is improperly rendered in exported PDFBug
SLIDESNET-39625Text overflowing from slideBug
SLIDESNET-39626Presentation repair message in cloned presentationBug
SLIDESNET-39627PPTX to PDF not properly convertedBug
SLIDESNET-39628Chart not properly converted to PDFBug
SLIDESNET-39641Exception on converting presentation to HTMLBug
SLIDESNET-39642Exception on converting presentation to HTMLBug
SLIDESNET-39704Symbols are not converted properly when convert PPTX to PDFBug
SLIDESNET-39709Animation Changed after saving PPTBug
SLIDESNET-39798Exception on loading PPTX presentationBug
SLIDESNET-39890PPTX notes issue while converting to PDFBug
SLIDESNET-39901Exception on loading presentationBug
SLIDESNET-39906Application hangs on savingBug
SLIDESNET-39907Process hangs when trying to save the presentationBug
SLIDESNET-39922InvalidOperation exception on saving PPTBug
SLIDESNET-39936Adding image for SmartArt node is not appearing in nodeBug
SLIDESNET-39952Slide content movedBug

Public API Changes

ApplyExternalThemeToDependingSlides method has been added to MasterSlide and IMasterSlide

ApplyExternalThemeToDependingSlides method has been added to MasterSlide class and IMasterSlide interface.

It creates a new master slide based on specified master slide, applies an external theme represented by Open XML Theme (THMX) to it and applies a new created master slide to all slides which are depending on specified master slide.

IMasterSlide ApplyExternalThemeToDependingSlides(string fname);

Code snippet below shows how to apply Open XML Theme “Theme1Word.thmx” to all slides which are depending on the specified master slide.

string pptxFileName = Path.Combine(baseDir, "SimplePresentation2.pptx");
string thmxFileName = Path.Combine(baseDir, "Theme1Word.thmx");
string outPptxFileName = Path.Combine(TestSettings.TestOutPath, "SimplePresentation2_out.pptx");

using (Presentation pres = new Presentation(pptxFileName))
{
  pres.Masters[0].ApplyExternalThemeToDependingSlides(thmxFileName);
  pres.Save(outPptxFileName, SaveFormat.Pptx);
}

BestImagesCompressionRatio property has been added to PdfOptions

BestImagesCompressionRatio property has been added to PdfOptions class.

It provides a possibility to find the best compression ratio for every image in the presentation to minimize the size of resulting PDF document. It is false by default (because the algorithm is computationally expensive and takes an additional amount of RAM).

Code snippet below shows how to set best compression ratio for PDF document images:

PdfOptions options = new PdfOptions
{
  BestImagesCompressionRatio = true
};
using (Presentation pres = new Presentation("pres.pptx"))
{
  pres.Save("pres.pdf", SaveFormat.Pdf, options);
}

HeaderFooterManager class marked as Obsolete and will be removed after release of version 18.6

HeaderFooterManager class has been marked as Obsolete and will be removed after release of version 18.6.

Use PresentationHeaderFooterManager class or one of corresponding MasterSlideHeaderFooterManager, LayoutSlideHeaderFooterManager, SlideHeaderFooterManager classes instead.

HeaderFooterManagers for MasterHandoutSlide, MasterNotesSlide and NotesSlide have been added

IBaseHandoutNotesSlideHeaderFooterManag, IMasterHandoutSlideHeaderFooterManager, IMasterNotesSlideHeaderFooterManager, INotesSlideHeaderFooterManager interfaces and BaseHandoutNotesSlideHeaderFooterManager, MasterHandoutSlideHeaderFooterManager, MasterNotesSlideHeaderFooterManager, NotesSlideHeaderFooterManager classes have been added.

These types allow to manage Header and Footer settings of master handout slide, master notes slide and notes slides.

New properties have been added to access the added types.

IMasterHandoutSlideHeaderFooterManager IMasterHandoutSlide.HeaderFooterManager { get; }
IMasterNotesSlideHeaderFooterManager IMasterNotesSlide.HeaderFooterManager { get; }
INotesSlideHeaderFooterManager INotesSlide.HeaderFooterManager { get; }

The IBaseHandoutNotesSlideHeaderFooterManag interface in addition to IBaseSlideHeaderFooterManager methods has following properties and methods.

This property allows to get the value indicating that header placeholder is present:

bool IsHeaderVisible { get; }

This method allows to change header placeholder visibility:

void SetHeaderVisibility(bool isVisible);

This method allows to set header placeholder text:

void SetHeaderText(string text);

IMasterNotesSlideHeaderFooterManager has following properties and methods.

These methods allow to change master notes slide and notes slides header, footer, slide number, date-time placeholders visibility:

void SetHeaderAndChildHeadersVisibility(bool isVisible);
void SetFooterAndChildFootersVisibility(bool isVisible);
void SetSlideNumberAndChildSlideNumbersVisibility(bool isVisible);
void SetDateTimeAndChildDateTimesVisibility(bool isVisible);

These methods allow to set text to master notes slide and notes slides header, footer and date-time placeholders:

void SetHeaderAndChildHeadersText(string text);
void SetFooterAndChildFootersText(string text);
void SetDateTimeAndChildDateTimesText(string text);

New methods have been added to IPresentationHeaderFooterManager and PresentationHeaderFooterManager.

This method allows to change master handout, master notes slide and all notes slides header placeholders visibility:

void SetAllHeadersVisibility(bool isVisible);

This method allows to set text to master handout, master notes slide and all notes slides header placeholders:

void SetAllHeadersText(string text);

Code snippet below shows how to manage the Header and Footer settings for Handout Master:

using (Presentation presentation = new Presentation(path + "presentation.pptx"))
{
  IMasterHandoutSlide masterHandoutSlide = presentation.MasterHandoutSlideManager.MasterHandoutSlide;
  if (masterHandoutSlide != null)
  {
    IBaseHandoutNotesSlideHeaderFooterManag headerFooterManager = masterHandoutSlide.HeaderFooterManager;
    if (!headerFooterManager.IsHeaderVisible)
      headerFooterManager.SetHeaderVisibility(true); // make the master handout slide Header placeholder visible
    
	if (!headerFooterManager.IsFooterVisible)
      headerFooterManager.SetFooterVisibility(true); // make the master handout slide Footer placeholder visible
	  
	if (!headerFooterManager.IsSlideNumberVisible)
	  headerFooterManager.SetSlideNumberVisibility(true); // make the master handout slide SlideNumber placeholder visible

    if (!headerFooterManager.IsDateTimeVisible)
	  headerFooterManager.SetDateTimeVisibility(true); // make the master handout slide Date-time placeholder visible

    headerFooterManager.SetHeaderText("New header text"); // set text to master handout slide Header placeholder
    headerFooterManager.SetFooterText("New footer text"); // set text to master handout slide Footer placeholder
	headerFooterManager.SetDateTimeText("New date and time text"); // set master handout to notes slide Date-time placeholder
  }
}

Code snippet below shows how to manage the Header and Footer settings for Notes Master and Notes slides:

using (Presentation presentation = new Presentation(path + "presentation.pptx"))
{
  // Change Header and Footer settings for notes master and all notes slides
  IMasterNotesSlide masterNotesSlide = presentation.MasterNotesSlideManager.MasterNotesSlide;
  if (masterNotesSlide != null)
  {
    IMasterNotesSlideHeaderFooterManager headerFooterManager = masterNotesSlide.HeaderFooterManager;
	
	headerFooterManager.SetHeaderAndChildHeadersVisibility(true); // make the master notes slide and all child Footer placeholders visible
	headerFooterManager.SetFooterAndChildFootersVisibility(true); // make the master notes slide and all child Header placeholders visible
	headerFooterManager.SetSlideNumberAndChildSlideNumbersVisibility(true); // make the master notes slide and all child SlideNumber placeholders visible
	headerFooterManager.SetDateTimeAndChildDateTimesVisibility(true); // make the master notes slide and all child Date and time placeholders visible
	
	headerFooterManager.SetHeaderAndChildHeadersText("Header text"); // set text to master notes slide and all child Header placeholders
	headerFooterManager.SetFooterAndChildFootersText("Footer text"); // set text to master notes slide and all child Footer placeholders
	headerFooterManager.SetDateTimeAndChildDateTimesText("Date and time text"); // set text to master notes slide and all child Date and time placeholders
  }
  // Change Header and Footer settings for first notes slide only
  INotesSlide notesSlide = presentation.Slides[0].NotesSlideManager.NotesSlide;
  if (notesSlide != null)
  {
    INotesSlideHeaderFooterManager headerFooterManager = notesSlide.HeaderFooterManager;
	if (!headerFooterManager.IsHeaderVisible)
	  headerFooterManager.SetHeaderVisibility(true); // make this notes slide Header placeholder visible
	  
	if (!headerFooterManager.IsFooterVisible)
	  headerFooterManager.SetFooterVisibility(true); // make this notes slide Footer placeholder visible

    if (!headerFooterManager.IsSlideNumberVisible)
      headerFooterManager.SetSlideNumberVisibility(true); // make this notes slide SlideNumber placeholder visible

    if (!headerFooterManager.IsDateTimeVisible)
      headerFooterManager.SetDateTimeVisibility(true); // make this notes slide Date-time placeholder visible

	headerFooterManager.SetHeaderText("New header text"); // set text to notes slide Header placeholder
    headerFooterManager.SetFooterText("New footer text"); // set text to notes slide Footer placeholder
    headerFooterManager.SetDateTimeText("New date and time text"); // set text to notes slide Date-time placeholder
  }
}

InterruptionToken struct and InterruptionTokenSource class have been added

InterruptionToken struct and InterruptionTokenSource class have been added.

These types support interruption of long-running tasks, such as deserialization, serialization or rendering. InterruptionTokenSource represents the source of the token or multiple tokens passed to ILoadOptions.InterruptionToken. When ILoadOptions.InterruptionToken is set and this LoadOptions instance passed to the Presentation constructor, any long-running task related to this Presentation will be interrupted when InterruptionTokenSource.Interrupt method will be invoked.

Code snippet below demonstrates interruption of running task.

static void Run(Action<InterruptionToken> action, InterruptionToken token)
{
  Task.Run(() => { action(token); });
}

static void Main()
{
  Action<InterruptionToken> action = (InterruptionToken token) =>
  {
    using (Presentation pres = new Presentation("pres.pptx", new LoadOptions { InterruptionToken = token }))
    {
      pres.Slides[0].GetThumbnail(new Size(960, 720));
      pres.Save("pres.ppt", SaveFormat.Ppt);
    }
  };
  
  InterruptionTokenSource tokenSource = new InterruptionTokenSource();
  Run(action, tokenSource.Token); // run action in a separate thread from the pool

  Thread.Sleep(5000); // some work

  tokenSource.Interrupt(); // we don't need the result of an interruptable action
}

Obsolete IHeaderFooterManager interface and HeaderFooterManager methods have been deleted

Obsolete IHeaderFooterManager interface has been deleted. Use IPresentationHeaderFooterManager interface or one of corresponding IMasterSlideHeaderFooterManager, ILayoutSlideHeaderFooterManager, ISlideHeaderFooterManager interfaces instead.

Obsolete HeaderFooterManager properties have been deleted:

public bool IsFooterVisible
public bool IsSlideNumberVisible
public bool IsDateTimeVisible

Use folowing methods of PresentationHeaderFooterManager class instead:

public void SetAllFootersVisibility(bool isVisible)
public void SetAllSlideNumbersVisibility(bool isVisible)
public void SetAllDateTimesVisibility(bool isVisible)

Obsolete HeaderFooterManager methods have been deleted:

public void SetFooterText(string text)
public void SetDateTimeText(string date)
public void SetVisibilityOnTitleSlide(bool isPlaceholdersVisible)

Use folowing methods of PresentationHeaderFooterManager class instead:

public void SetAllFootersText(string text)
public void SetAllDateTimesText(string text)
public void SetVisibilityOnAllTitleSlides(bool isVisible)

OLEActionVerbs value has been added to EffectPresetClassType

OLEActionVerbs value has been added to EffectPresetClassType enum.

It represents OLE Action Verb animation effects preset class.

Code snippet below shows how to check whether the shape animation effect is OLE Action Verb.

using (Presentation pres = new Presentation(path + "presentation.pptx"))
{
  IOleObjectFrame ole = (IOleObjectFrame)pres.Slides[0].Shapes[0];
  IEffect effect = pres.Slides[0].Timeline.MainSequence.AddEffect(ole, EffectType.OLEObjectOpen, EffectSubtype.None, EffectTriggerType.OnClick);
  
  pres.Save(path + "presentation-out.pptx", SaveFormat.Pptx);
}
using (Presentation pres = new Presentation(path + "presentation-out.pptx"))
{
  IShape shape = pres.Slides[0].Shapes[0];
  IEffect[] effects = pres.Slides[0].Timeline.MainSequence.GetEffectsByShape(shape);
  
  if (effects.Length > 0 && effects[0].PresetClassType == EffectPresetClassType.OLEActionVerbs)
    Console.WriteLine("This shape has the OLE Action Verb effect");
}

OLEObjectShow, OLEObjectEdit and OLEObjectOpen values have been added to Aspose.Slides.Animation.EffectType

OLEObjectShow, OLEObjectEdit and OLEObjectOpen values have been added to Aspose.Slides.Animation.EffectType enum.

These values are used for adding OLE Action Verbs effects to OleObjectFrames.

Code snippet below shows how to add OLEObject Open effect.

using (Presentation pres = new Presentation("presentation.pptx"))
{
  IOleObjectFrame ole = (IOleObjectFrame)pres.Slides[0].Shapes[0];
  IEffect effect = pres.Slides[0].Timeline.MainSequence.AddEffect(ole, EffectType.OLEObjectOpen, EffectSubtype.None, EffectTriggerType.OnClick);
}

PictureOrganizationChart value has been added to SmartArtLayoutType

PictureOrganizationChart value has been added to SmartArtLayoutType enum.

It represents Picture Organization Chart layout.

Code snippet below shows how to add new SmartArt object with Picture Organization Chart layout:

using (Presentation pres = new Presentation())
{
  ISmartArt smartArt = pres.Slides[0].Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.PictureOrganizationChart);
}

Public enum SaveFormat has been changed

The value of the Pps element of the SaveFormat enum was changed to 19:

/// <summary>
/// Save presentation in PPS format.
/// </summary>
Pps = 19

Support for BoxAndWhisker chart type has been added

Support for BoxAndWhisker chart type has been added. It includes new properties, methods and enumerators. AddDataPointForBoxAndWhiskerSeries method has been added to IChartDataPointCollection and descendants.

It creates the new data point and adds it to the end of collection. Applicable for series which chart type is BoxAndWhisker only.

IChartDataPoint AddDataPointForBoxAndWhiskerSeries(IChartDataCell value);

Public enum QuartileMethodType has been added.

It represents type of quartile method. Used with BoxAndWhisker series type. Possible values are:

  • Exclusive - Represents exclusive quartile method
  • Inclusive - Represents inclusive quartile method

QuartileMethod property has been added to IChartSeries and descendants.

It represents quartile method of BoxAndWhisker series.

QuartileMethodType QuartileMethod { get; set; }

ShowInnerPoints property has been added to IChartSeries and descendants.

It represents inner points. True if inner points are shown on the BoxAndWhisker chart.

bool ShowInnerPoints { get; set; }

ShowMeanLine property has been added to IChartSeries and descendants.

It represents mean line. True if mean line are shown on the BoxAndWhisker chart.

bool ShowMeanLine { get; set; }

ShowMeanMarkers property has been added to IChartSeries and descendants.

It represents mean markers. True if mean markers are shown on the BoxAndWhisker chart.

bool ShowMeanMarkers { get; set; }

ShowOutlierPoints property has been added to IChartSeries and descendants.

It represents outlier points. True if outlier points are shown on the BoxAndWhisker chart.

bool ShowOutlierPoints { get; set; }

Code snippet below shows how to create BoxAndWhisker chart from scratch and apply properties listed above. :

using (Presentation pres = new Presentation())
{
  IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.BoxAndWhisker, 50, 50, 500, 400);
  chart.ChartData.Categories.Clear();
  chart.ChartData.Series.Clear();
  
  IChartDataWorkbook wb = chart.ChartData.ChartDataWorkbook;
  
  wb.Clear(0);
  
  chart.ChartData.Categories.Add(wb.GetCell(0, "A1", "Category 1"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A2", "Category 1"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A3", "Category 1"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A4", "Category 1"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A5", "Category 1"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A6", "Category 1"));
  
  IChartSeries series = chart.ChartData.Series.Add(ChartType.BoxAndWhisker);
  
  series.QuartileMethod = QuartileMethodType.Exclusive;
  series.ShowMeanLine = true;
  series.ShowMeanMarkers = true;
  series.ShowInnerPoints = true;
  series.ShowOutlierPoints = true;
  
  series.DataPoints.AddDataPointForBoxAndWhiskerSeries(wb.GetCell(0, "B1", 15));
  series.DataPoints.AddDataPointForBoxAndWhiskerSeries(wb.GetCell(0, "B2", 41));
  series.DataPoints.AddDataPointForBoxAndWhiskerSeries(wb.GetCell(0, "B3", 16));
  series.DataPoints.AddDataPointForBoxAndWhiskerSeries(wb.GetCell(0, "B4", 10));
  series.DataPoints.AddDataPointForBoxAndWhiskerSeries(wb.GetCell(0, "B5", 23));
  series.DataPoints.AddDataPointForBoxAndWhiskerSeries(wb.GetCell(0, "B6", 16));
  
  pres.Save("BoxAndWhisker.pptx", SaveFormat.Pptx);
}

Support for Funnel chart type has been added

Support for Funnel chart type has been added. AddDataPointForFunnelSeries method has been added to IChartDataPointCollection and descendants.

It creates the new data point and adds it to the end of collection. Applicable for series which chart type is Funnel.

using (Presentation pres = new Presentation())
{
  IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.Funnel, 50, 50, 500, 400);
  chart.ChartData.Categories.Clear();
  chart.ChartData.Series.Clear();

  IChartDataWorkbook wb = chart.ChartData.ChartDataWorkbook;

  wb.Clear(0);

  chart.ChartData.Categories.Add(wb.GetCell(0, "A1", "Category 1"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A2", "Category 2"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A3", "Category 3"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A4", "Category 4"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A5", "Category 5"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A6", "Category 6"));

  IChartSeries series = chart.ChartData.Series.Add(ChartType.Funnel);

  series.DataPoints.AddDataPointForFunnelSeries(wb.GetCell(0, "B1", 50));
  series.DataPoints.AddDataPointForFunnelSeries(wb.GetCell(0, "B2", 100));
  series.DataPoints.AddDataPointForFunnelSeries(wb.GetCell(0, "B3", 200));
  series.DataPoints.AddDataPointForFunnelSeries(wb.GetCell(0, "B4", 300));
  series.DataPoints.AddDataPointForFunnelSeries(wb.GetCell(0, "B5", 400));
  series.DataPoints.AddDataPointForFunnelSeries(wb.GetCell(0, "B6", 500));

  pres.Save("Funnel.pptx", SaveFormat.Pptx)
}

Support for Histogram and Histogram Pareto chart types has been added

Support for Histogram and Histogram Pareto chart types has been added. It includes new properties, methods and enumerators. Public enum AxisAggregationType has been added

It represents aggregation type of category axis. Used with Histogram or HistogramPareto series only.

  • ByCategory - Aggregate by categories
  • Automatic - Aggregate categories automatically
  • ByBinWidth - Aggregate categories by bin width. Property IAxis.BinWidth must be setted
  • ByNumberOfBins - Aggregate categories by number of bins. Property IAxis.NumberOfBins must be setted.

AggregationType property has been added to IAxis and descendants.

It represents aggregation type of category axis (binning). Applied to category. Used with Histogram or HistogramPareto series only.

AxisAggregationType AggregationType { get; set; }

BinWidth property has been added to IAxis and descendants.

It specifies bin width when AggregationType property value setted to AxisAggregationType.ByBinWidth. Applied to category axes. Used with Histogram or HistogramPareto series only.

double BinWidth { get; set; }

IsAutomaticOverflowBin property has been added to IAxis and descendants.

It specifies automatic overflow bin value. If false: use OverflowBin property.

bool IsAutomaticOverflowBin { get; set; }

IsAutomaticUnderflowBin property has been added to IAxis and descendants.

It specifies automatic underflow bin value. If false: use UnderflowBin property.

bool IsAutomaticUnderflowBin { get; set; }

IsOverflowBin property has been added to IAxis and descendants.

It specifies if overflow bin applied. Use IsAutomaticOverflowBin and OverflowBin to adjust overflow bin value.

bool IsOverflowBin { get; set; }

IsUnderflowBin property has been added to IAxis and descendants.

It specifies if underflow bin applied. Use IsAutomaticUnderflowBin and UnderflowBin to adjust underflow bin value.

bool IsUnderflowBin { get; set; }

NumberOfBins property has been added to IAxis and descendants.

It specifies number of bins when AggregationType property value setted to AxisAggregationType.ByNumberOfBins. Applied to category axes.

uint NumberOfBins { get; set; }

OverflowBin property has been added to IAxis and descendants.

It specifies overflow bin custom value. Applied when IsAutomaticOverflowBin property setted to false and IsOverflowBin property equals true.

double OverflowBin { get; set; }

UnderflowBin property has been added to IAxis and descendants.

It specifies underflow bin custom value. Applied when IsAutomaticUnderflowBin property setted to false and IsUnderflowBin property equals true.

double UnderflowBin { get; set; }

AddDataPointForHistogramSeries method has been added to IChartDataPointCollection and descendants.

It creates the new data point and adds it to the end of collection. Applicable for series which chart type is Histogram.

IChartDataPoint AddDataPointForHistogramSeries(IChartDataCell value);

Code snippet below shows how to create Histogram chart from scratch and apply properties listed above:

using (Presentation pres = new Presentation())
{
  IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.Histogram, 50, 50, 500, 400);
  chart.ChartData.Categories.Clear();
  chart.ChartData.Series.Clear();

  IChartDataWorkbook wb = chart.ChartData.ChartDataWorkbook;

  wb.Clear(0);

  IChartSeries series = chart.ChartData.Series.Add(ChartType.Histogram);
  series.DataPoints.AddDataPointForHistogramSeries(wb.GetCell(0, "A1", 15));
  series.DataPoints.AddDataPointForHistogramSeries(wb.GetCell(0, "A2", -41));
  series.DataPoints.AddDataPointForHistogramSeries(wb.GetCell(0, "A3", 16));
  series.DataPoints.AddDataPointForHistogramSeries(wb.GetCell(0, "A4", 10));
  series.DataPoints.AddDataPointForHistogramSeries(wb.GetCell(0, "A5", -23));
  series.DataPoints.AddDataPointForHistogramSeries(wb.GetCell(0, "A6", 16));

  chart.Axes.HorizontalAxis.AggregationType = AxisAggregationType.Automatic;

  pres.Save("Histogram.pptx", SaveFormat.Pptx);
}

Code snippet below shows how to create HistogramPareto chart from scratch:

using (Presentation pres = new Presentation())
{
  IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.Histogram, 50, 50, 500, 400);
  
  chart.ChartData.Series.Add(ChartType.ParetoLine);
  
  chart.Axes.SecondaryVerticalAxis.NumberFormat = "0%";
  chart.Axes.SecondaryVerticalAxis.MaxValue = 1;
  chart.Axes.SecondaryVerticalAxis.IsAutomaticMaxValue = false;

  pres.Save("HistogramPareto.pptx", SaveFormat.Pptx);
}

Support for Sunburst chart type has been added

Support for Sunburst chart type has been added. It includes new properties and methods . SizeValue property has been added to IChartDataPoint and descendants.

It returns the size value of chart data point.

IDoubleChartValue SizeValue { get; }

AddDataPointForSunburstSeries method has been added to IChartDataPointCollection and descendants.

It creates the new data point and adds it to the end of collection. Applicable for series which chart type is Sunburst.

IChartDataPoint AddDataPointForSunburstSeries(IChartDataCell sizeValue);

Code snippet below shows how to create Sunburst chart from scratch and apply properties listed above:

using (Presentation pres = new Presentation())
{
  IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.Sunburst, 50, 50, 500, 400);
  chart.ChartData.Categories.Clear();
  chart.ChartData.Series.Clear();

  IChartDataWorkbook wb = chart.ChartData.ChartDataWorkbook;

  wb.Clear(0);

  //branch 1
  IChartCategory leaf = chart.ChartData.Categories.Add(wb.GetCell(0, "C1", "Leaf1"));
  leaf.GroupingLevels.SetGroupingItem(1, "Stem1");
  leaf.GroupingLevels.SetGroupingItem(2, "Branch1");

  chart.ChartData.Categories.Add(wb.GetCell(0, "C2", "Leaf2"));
  
  leaf = chart.ChartData.Categories.Add(wb.GetCell(0, "C3", "Leaf3"));
  leaf.GroupingLevels.SetGroupingItem(1, "Stem2");

  chart.ChartData.Categories.Add(wb.GetCell(0, "C4", "Leaf4"));

  //branch 2
  leaf = chart.ChartData.Categories.Add(wb.GetCell(0, "C5", "Leaf5"));
  leaf.GroupingLevels.SetGroupingItem(1, "Stem3");
  leaf.GroupingLevels.SetGroupingItem(2, "Branch2");

  chart.ChartData.Categories.Add(wb.GetCell(0, "C6", "Leaf6"));

  leaf = chart.ChartData.Categories.Add(wb.GetCell(0, "C7", "Leaf7"));
  leaf.GroupingLevels.SetGroupingItem(1, "Stem4");

  chart.ChartData.Categories.Add(wb.GetCell(0, "C8", "Leaf8"));

  IChartSeries series = chart.ChartData.Series.Add(ChartType.Sunburst);
  series.Labels.DefaultDataLabelFormat.ShowCategoryName = true;
  series.DataPoints.AddDataPointForSunburstSeries(wb.GetCell(0, "D1", 4));
  series.DataPoints.AddDataPointForSunburstSeries(wb.GetCell(0, "D2", 5));
  series.DataPoints.AddDataPointForSunburstSeries(wb.GetCell(0, "D3", 3));
  series.DataPoints.AddDataPointForSunburstSeries(wb.GetCell(0, "D4", 6));
  series.DataPoints.AddDataPointForSunburstSeries(wb.GetCell(0, "D5", 9));
  series.DataPoints.AddDataPointForSunburstSeries(wb.GetCell(0, "D6", 9));
  series.DataPoints.AddDataPointForSunburstSeries(wb.GetCell(0, "D7", 4));
  series.DataPoints.AddDataPointForSunburstSeries(wb.GetCell(0, "D8", 3));

  pres.Save("Sunburst.pptx", SaveFormat.Pptx);
}

Support for Treemap chart type has been added

Support for Treemap chart type has been added. It includes new properties, methods and enumerators. SizeValue property has been added to IChartDataPoint and descendants.

It returns the size value of chart data point.

IDoubleChartValue SizeValue { get; }

Public enum ParentLabelLayoutType has been added

It represents layout type of category data labels. Used with Treemap series.

Possible values are:

  • Banner - Specifies that parent category labels are shown as banner
  • None - Specifies that parent category labels are not drawn
  • Overlapping - Specifies that parent category labels are shown as overlapping

ParentLabelLayout property has been added to IChartSeries and descendants.

It represents layout of parent labels of Treemap series. Applies to series of type Treemap.

ParentLabelLayoutType ParentLabelLayout { get; set; }

AddDataPointForTreemapSeries method has been added to IChartDataPointCollection and descendants.

It creates the new data point and adds it to the end of collection. Applicable for series which chart type is Treemap.

IChartDataPoint AddDataPointForTreemapSeries(IChartDataCell sizeValue);

Code snippet below shows how to create Treemap chart from scratch and apply properties listed above. :

using (Presentation pres = new Presentation())
{
  IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.Treemap, 50, 50, 500, 400);
  chart.ChartData.Categories.Clear();
  chart.ChartData.Series.Clear();

  IChartDataWorkbook wb = chart.ChartData.ChartDataWorkbook;
  wb.Clear(0);

  //branch 1
  IChartCategory leaf = chart.ChartData.Categories.Add(wb.GetCell(0, "C1", "Leaf1"));
  leaf.GroupingLevels.SetGroupingItem(1, "Stem1");
  leaf.GroupingLevels.SetGroupingItem(2, "Branch1");

  chart.ChartData.Categories.Add(wb.GetCell(0, "C2", "Leaf2"));

  leaf = chart.ChartData.Categories.Add(wb.GetCell(0, "C3", "Leaf3"));
  leaf.GroupingLevels.SetGroupingItem(1, "Stem2");

  chart.ChartData.Categories.Add(wb.GetCell(0, "C4", "Leaf4"));

  //branch 2
  leaf = chart.ChartData.Categories.Add(wb.GetCell(0, "C5", "Leaf5"));
  leaf.GroupingLevels.SetGroupingItem(1, "Stem3");
  leaf.GroupingLevels.SetGroupingItem(2, "Branch2");
  
  chart.ChartData.Categories.Add(wb.GetCell(0, "C6", "Leaf6"));
  
  leaf = chart.ChartData.Categories.Add(wb.GetCell(0, "C7", "Leaf7"));
  leaf.GroupingLevels.SetGroupingItem(1, "Stem4");

  chart.ChartData.Categories.Add(wb.GetCell(0, "C8", "Leaf8"));

  IChartSeries series = chart.ChartData.Series.Add(ChartType.Treemap);
  series.Labels.DefaultDataLabelFormat.ShowCategoryName = true;
  series.DataPoints.AddDataPointForTreemapSeries(wb.GetCell(0, "D1", 4));
  series.DataPoints.AddDataPointForTreemapSeries(wb.GetCell(0, "D2", 5));
  series.DataPoints.AddDataPointForTreemapSeries(wb.GetCell(0, "D3", 3));
  series.DataPoints.AddDataPointForTreemapSeries(wb.GetCell(0, "D4", 6));
  series.DataPoints.AddDataPointForTreemapSeries(wb.GetCell(0, "D5", 9));
  series.DataPoints.AddDataPointForTreemapSeries(wb.GetCell(0, "D6", 9));
  series.DataPoints.AddDataPointForTreemapSeries(wb.GetCell(0, "D7", 4));
  series.DataPoints.AddDataPointForTreemapSeries(wb.GetCell(0, "D8", 3));
  series.ParentLabelLayout = ParentLabelLayoutType.Overlapping;
  
  pres.Save("Treemap.pptx", SaveFormat.Pptx);
}

Support for Waterfall chart type has been added

Support for Waterfall chart type has been added. It includes new properties and methods. SetAsTotal property has been added to IChartDataPoint and descendants.

It sets data point as total. Applied for Waterfall series type only.

bool SetAsTotal { get; set; }

ShowConnectorLines property has been added to IChartSeries and descendants.

It sepresents connector lines. True if connector lines are shown on the Waterfall chart. Applies to series of type Waterfall.

bool ShowConnectorLines { get; set; }

AddDataPointForWaterfallSeries method has been added to IChartDataPointCollection and descendants.

It creates the new data point and adds it to the end of collection. Applicable for series which chart type is Waterfall.

IChartDataPoint AddDataPointForWaterfallSeries(IChartDataCell value);

Code snippet below shows how to create Waterfall chart from scratch and apply properties listed above:

using (Presentation pres = new Presentation())
{
  IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.Waterfall, 50, 50, 500, 400);
  chart.ChartData.Categories.Clear();
  chart.ChartData.Series.Clear();

  IChartDataWorkbook wb = chart.ChartData.ChartDataWorkbook;

  wb.Clear(0);

  chart.ChartData.Categories.Add(wb.GetCell(0, "A1", "Category 1"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A2", "Category 2"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A3", "Category 3"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A4", "Category 4"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A5", "Category 5"));
  chart.ChartData.Categories.Add(wb.GetCell(0, "A6", "Category 6"));
  
  IChartSeries series = chart.ChartData.Series.Add(ChartType.Waterfall);
  series.Labels.DefaultDataLabelFormat.ShowValue = true;
  series.DataPoints.AddDataPointForWaterfallSeries(wb.GetCell(0, "B1", 15));
  series.DataPoints.AddDataPointForWaterfallSeries(wb.GetCell(0, "B2", -41));
  series.DataPoints.AddDataPointForWaterfallSeries(wb.GetCell(0, "B3", 16));
  series.DataPoints.AddDataPointForWaterfallSeries(wb.GetCell(0, "B4", 10));
  series.DataPoints.AddDataPointForWaterfallSeries(wb.GetCell(0, "B5", -23));
  series.DataPoints.AddDataPointForWaterfallSeries(wb.GetCell(0, "B6", 16));
  
  series.DataPoints[5].SetAsTotal = true;
  
  series.ShowConnectorLines = false;

  pres.Save("Waterfall.pptx", SaveFormat.Pptx);
}

WriteAsSvg method has been added to Shape and IShape

WriteAsSvg method (and its overload) has been added to Shape class and IShape interface.

This method allows to save content of the shape as an SVG file.

void WriteAsSvg(Stream stream);
void WriteAsSvg(Stream stream, ISVGOptions svgOptions);

Code snippet below shows how to export slide’s shape to an SVG file.

string pptxFileName = "Presentation.pptx";
string outSvgFileName = "SingleShape.svg";
using (Presentation pres = new Presentation(pptxFileName))
{
  using (Stream stream = new FileStream(outSvgFileName, FileMode.Create, FileAccess.Write))
  {
    pres.Slides[0].Shapes[0].WriteAsSvg(stream);
  }
}