[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IPivotOptions.ShowValueFieldButtons

ShowValueFieldButtons Property

ShowValueFieldButtons

Gets or sets whether value field buttons are displayed on a PivotChart.

This property returns the current visibility setting for value field buttons in the PivotOptions object of a PivotChart.

Declaration
bool ShowValueFieldButtons { get; set; }
Property ShowValueFieldButtons As Boolean
Examples
worksheet.Range["A1:D5"].Value = new object[,] {
    {"Category", "Country", "Amount", "Order ID"},
    {"Beverages", "United States", 100, 1},
    {"Beverages", "Canada", 200, 2},
    {"Snacks", "United States", 150, 3}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:D5"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["F1"], "PivotTable1");
pivotTable.PivotFields["Category"].Orientation = PivotFieldOrientation.RowField;
pivotTable.PivotFields["Amount"].Orientation = PivotFieldOrientation.DataField;
IChart chart = worksheet.Shapes.AddChartInPixel(ChartType.ColumnClustered, 0, 120, 400, 240).Chart;
chart.SetSourceData(pivotTable.TableRange1);
bool showValueFieldButtons = chart.PivotOptions.ShowValueFieldButtons;