Spire.Presentation 7.2.5 supports creating "Map" chart

2022-03-01 02:37:43

We are glad to announce the release of Spire.Presentation 7.2.5. This version supports creating "Map" chart and modifying the number format for chart source data. In addition, it fixes some known issues such as the converted PDF file content is not correct after modifying the shape text. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREPPT-1837 Supports creating "Map" chart.
Presentation ppt = new Presentation();
 IChart chart = ppt.Slides[0].Shapes.AppendChart(ChartType.Map, new RectangleF(50, 50, 450, 450), false);
 chart.ChartData[0, 1].Text = "series";
 string[] countries = { "China", "Russia", "France", "Mexico", "United States", "India", "Australia" };
 for (int i = 0; i < countries.Length; i++)
 {
     chart.ChartData[i + 1, 0].Text = countries[i];
 }
 int[] values = { 32, 20, 23, 17, 18, 6, 11 };
 for (int i = 0; i < values.Length; i++)
 {
     chart.ChartData[i + 1, 1].NumberValue = values[i];
 }
 chart.Series.SeriesLabel = chart.ChartData[0, 1, 0, 1];
 chart.Categories.CategoryLabels = chart.ChartData[1, 0, 7, 0];
 chart.Series[0].Values = chart.ChartData[1, 1, 7, 1];
 ppt.SaveToFile("output.pptx", Spire.Presentation.FileFormat.Pptx2013);
New feature SPIREPPT-1845 Supports modifying the number format for chart source data.
Presentation ppt = new Presentation();
 ppt.LoadFromFile(@"input.pptx");

 ISlide slide = ppt.Slides[2];
 foreach (IShape shape in slide.Shapes)
 {
     if (shape is IChart)
     {
         IChart chart = shape as IChart;
         if (chart.Type.Equals(ChartType.BarClustered))
         {
             for (int i = 1; i < 5; i++)
             {
                 chart.ChartData[i, 1].NumberFormat = "#,##0.00";
             }
         }
     }
 }
 ppt.SaveToFile("result.pptx", Spire.Presentation.FileFormat.Pptx2013);
Bug SPIREPPT-1383 Fixes the issue that the converted PDF file content was not correct after modifying the shape text.
Bug SPIREPPT-1833 Fixes the issue that some content was incorrect after converting PPT to PDF.
Click the link below to download Spire.Presentation 7.2.5:
More information of Spire.Presentation new release or hotfix: