We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Legend in the Waterfall Chart can't be deleted or hidding

Hi there, is there a way to hide or delete the legend of a waterfall, i tried everything chart.legend.IsDeleted chart.showLegend as well and other mores like LegendEntry… but nothing seems to hide or delete it.

Thank you

@Aariss,

Please zip and attach your input Excel file, we will check it soon.

Waterfall_Aspose.zip (13.5 KB)
Thank you.

@Aariss,

Thanks for the data file.

Please notice, I am able to reproduce the issue as you mentioned by using the following sample code with your template file. I tried many ways but the legend entries are not hidden/deleted in the output file.
e.g.
Sample code:

        Workbook workbook = new Workbook("e:\\test2\\Waterfall_Aspose.xlsx");

        // Retrieve the first Worksheet in Workbook
        Worksheet worksheet = workbook.Worksheets[0];

        // Retrieve the Cells of the first Worksheet
        var cells = worksheet.Cells;
        // Add a Chart in same worksheet as of data
        int idx = worksheet.Charts.Add(ChartType.Waterfall, 4, 7, 30, 17);
        // Retrieve the Chart object
        Chart chart = worksheet.Charts[idx];

        // Add Series
        chart.NSeries.Add("E12:E21", true);

        // Add Category Data
        chart.NSeries.CategoryData = "D12:D21";

        //it does not work
        chart.ShowLegend = false;

        // Save the workbook
        workbook.Save("e:\\test2\\out1.xlsx");

I have logged a ticket with an id “CELLSNET-50197” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

1 Like

@Aariss,

This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

1 Like

The issues you have found earlier (filed as CELLSNET-50197) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao