How to manage PivotChart with PivotOptions
What is PivotChart
A PivotChart in Excel is a graphical representation of data created from a PivotTable. It allows users to visualize and analyze data dynamically by summarizing and displaying information in chart form. PivotCharts are interactive and can be easily modified to show different perspectives of the data, making it a powerful tool for data analysis and presentation in Excel.
How to manage PivotChart with PivotOptions
By using Aspose.Cells, you can use Aspose.Cells.Charts.PivotOptions to manage PivotChart.
Sample file and code: Sample File
//How to manage PivotChart with PivotOptions | |
path = ""; | |
Workbook book = new Workbook(path + "Sample.xlsx"); | |
Chart chart = book.Worksheets[0].Charts[0]; | |
PivotOptions opt = chart.PivotOptions; | |
//Hide ZoneFilter in PivotChart | |
opt.DropZoneFilter = false; //HideZoneFilter | |
//You can set more properties, try them! | |
//opt.DropZoneCategories = false; //HideZoneCategories | |
//opt.DropZoneData = false; //HideZoneData | |
//opt.DropZoneSeries = false; //HideZoneSeries | |
//opt.DropZonesVisible = false; //Hide All | |
//Save the file and see the effect. | |
book.Save(path + "HideZoneFilter.xlsx"); | |
With the example code above, you can check the result file with the following effect, as shown in the figure: