[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IChart.PivotOptions

PivotOptions Property

PivotOptions

Gets the pivot chart button display options.

Declaration
IPivotOptions PivotOptions { get; }
ReadOnly Property PivotOptions As IPivotOptions
Examples
object[,] sourceData = new object[,] {
    {"Category", "Amount"},
    {"Beverages", 100},
    {"Snacks", 200}
};
worksheet.Range["A1:B3"].Value = sourceData;
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B3"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "PivotTable1");
pivotTable.PivotFields["Category"].Orientation = PivotFieldOrientation.RowField;
pivotTable.PivotFields["Amount"].Orientation = PivotFieldOrientation.DataField;
IChart chart = worksheet.Shapes.AddChartInPixel(ChartType.ColumnClustered, 0, 100, 360, 220).Chart;
chart.SetSourceData(pivotTable.TableRange1);
IPivotOptions pivotOptions = chart.PivotOptions;
pivotOptions.ShowLegendFieldButtons = false;