Unable to hide legend

Hi.

I’m trying to create a pie chart without a legend.
When I’m setting HasLegend = false, the the legend still renders, but in front of the chart.
The same goes for HasTitle.

What am i doing wrong?

Regards, Richard

public static void AddChart()
{
PresentationEx pres = new PresentationEx();

// pres.Slides.AddClone(pres.Slides[0]);
SlideEx sld = pres.Slides[0];

ChartEx chart = sld.Shapes.AddChart(ChartTypeEx.Pie3D, 0, 0, 600, 300);
chart.HasTitle = false;
chart.HasLegend = false;

int defaultWorksheetIndex = 0;

ChartDataCellFactory fact = chart.ChartData.ChartDataCellFactory;

// chart.HasDataTable = false;
chart.Legend.Position = LegendPositionTypeEx.TopRight;
//Adding new series
chart.ChartData.Series.Add(fact.GetCell(defaultWorksheetIndex, 0, 1, “Series 1”), chart.Type);
//Adding new categories
chart.ChartData.Categories.Add(fact.GetCell(defaultWorksheetIndex, 1, 0, “Caetegoty 1”));
chart.ChartData.Categories.Add(fact.GetCell(defaultWorksheetIndex, 2, 0, “Caetegoty 2”));
chart.ChartData.Categories.Add(fact.GetCell(defaultWorksheetIndex, 3, 0, “Caetegoty 3”));
//Take first chart series
ChartSeriesEx series = chart.ChartData.Series[0];
series.Labels.ShowValue = false;
series.Labels.ShowPercentage = true;
series.Labels.ShowLegendKey = false;

//Now populating series data
series.Values.Add(fact.GetCell(defaultWorksheetIndex, 1, 1, 20));
series.Values.Add(fact.GetCell(defaultWorksheetIndex, 2, 1, 50));
series.Values.Add(fact.GetCell(defaultWorksheetIndex, 3, 1, 30));

pres.Write(@“C:\AsposeChart.pptx”);
}

<!–[if gte mso 10]> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

<![endif]–>

Hi Furberg,

Thanks for using Aspose.Slides,

I have worked with the requirements shared by you and have observed the issue specified. For issue one i.e. hiding “HasLegend”, an ID SLIDESNET-33308 has already been created in our issue tracking system as investigation to further investigate and resolve the issue.

Regarding to second issue i.e. “HasTitle” also there is an issue with ID SLIDESNET-33138 has already been created in our issue tracking system to resolve this issue.

We will share the further information with you as soon as it is available.

We are sorry for your inconvenience,

Ok, I have achieved this by the following settings:


chart.HasLegend = true;
chart.Legend.Overlay = true;
chart.Legend.Height = 0;

Regards, Richard

Hi Richard,


I like to share that hiding chart legends issue will be resolved in upcoming release of Aspose.Slides for .NET and an issue with ID SLIDESNET-32446 has already created in our issue tracking system for this and we will share the notification with you as soon as the fix will be available.

Many Thanks,

The issues you have found earlier (filed as SLIDESNET-33308) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as SLIDESNET-32446) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(3)

The issues you have found earlier (filed as SLIDESNET-33138) have been fixed in this update.