Words (.NET) - Column3D chart - How to hide axis Z legend in pdf format?

Hello, we have a purchased license.

We use Column3D chart, and i noticed that chart render is a little bit different in pdf format/docx format.
For example:

var shape = builder.InsertChart
(
      ChartType.Column3D,
      widgetSize.WidthPoints,
      widgetSize.HeightPoints
);
var chart = shape.Chart;
chart.Series.Clear();
chart.Series.Add("", new[] { "cat1", "cat2" }, new[] { 5.0, 1.0 });
chart.Legend.Position = LegendPosition.None; 

Result in docx: Отчет 1 (74).docx (8.6 KB)
Result in pdf: Отчет 1 (23).pdf (18.1 KB)

Pdf report have a legend on axis Z (“Series1”), but docx report doesn’t. How to hide the legend in pdf report?

@buryginl

We have tested the scenario and noticed that the legend “Series1” does not hide using ChartLegend.Position property. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22363. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@buryginl

We have closed this issue (WORDSNET-22363) as ‘Not a bug’.

Please use ChartAxis.Hidden property (chart.AxisZ.Hidden = true;) as shown below to hide the “Series1”.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
var shape = builder.InsertChart
    (
    ChartType.Column3D,
    500,
    500
    );
var chart = shape.Chart;
chart.Series.Clear();
chart.Series.Add("", new[] { "cat1", "cat2" }, new[] { 5.0, 1.0 });
ChartLegend legend = chart.Legend;
legend.Position = LegendPosition.None;
chart.AxisZ.Hidden = true;

doc.Save(MyDir + "output.docx");
doc.Save(MyDir + "output.pdf");

The issues you have found earlier (filed as WORDSNET-22363) have been fixed in this Aspose.Words for .NET 21.9 update.