[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IPivotOptions.ShowExpandCollapseEntireFieldButtons

ShowExpandCollapseEntireFieldButtons Property

ShowExpandCollapseEntireFieldButtons

Gets or sets whether the expand entire field and collapse entire field buttons are displayed on a PivotChart.

These buttons let users expand or collapse an entire field directly from the PivotChart.

Declaration
bool ShowExpandCollapseEntireFieldButtons { get; set; }
Property ShowExpandCollapseEntireFieldButtons As Boolean
Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Category", "Amount"},
    {"Fruit", 100},
    {"Fruit", 200},
    {"Vegetable", 150}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"]);
pivotTable.PivotFields["Category"].Orientation = PivotFieldOrientation.RowField;
pivotTable.PivotFields["Amount"].Orientation = PivotFieldOrientation.DataField;
IChart chart = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 10, 10, 300, 200).Chart;
chart.SeriesCollection.Add(pivotTable.TableRange1);
chart.PivotOptions.ShowExpandCollapseEntireFieldButtons = true;
bool showExpandCollapseButtons = chart.PivotOptions.ShowExpandCollapseEntireFieldButtons;