PivotOptionsを使用してPivotChartを管理する方法
Contents
[
Hide
]
PivotChartとは
ExcelのPivotChartは、PivotTableから作成されたデータの視覚的な表現です。これにより、ユーザーは情報を要約してチャート形式で表示し、データをダイナミックに視覚化して分析することができます。PivotChartは対話型であり、データの異なる視点を簡単に表示するように修正できるため、Excelでのデータ分析とプレゼンテーションにおける強力なツールとなっています。
PivotOptionsを使用してPivotChartを管理する方法
Aspose.Cellsを使用すると、PivotChartを管理するためにAspose.Cells.Charts.PivotOptionsを使用できます。
サンプルファイルとコード: サンプルファイル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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"); | |
上記の例のコードを使用すると、次の効果が表示された結果ファイルを確認できます。