WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PivotChart

    Show / Hide Table of Contents

    Class PivotChart

    Essential PivotChart is a lightweight control that reads Pivot information and visualizes it in graphical format with the ability to drill up and down.

    Inheritance
    System.Object
    PivotChart
    Implements
    System.IDisposable
    Namespace: Syncfusion.Windows.Forms.PivotChart
    Assembly: Syncfusion.PivotChart.Windows.dll
    Syntax
    public class PivotChart : Control, IDisposable

    Constructors

    PivotChart()

    Initializes a new instance of the PivotChart class.

    Declaration
    public PivotChart()

    Properties

    AllowDrillDown

    Gets or sets a value indicating whether drill down option should be enabled.

    Declaration
    public bool AllowDrillDown { get; set; }
    Property Value
    Type Description
    System.Boolean

    AxisFieldSection

    Gets or sets the AxisFieldSections associated with the control.

    Declaration
    public PivotFieldsSection AxisFieldSection { get; set; }
    Property Value
    Type Description
    PivotFieldsSection

    ChartArea

    Gets the ChartArea styles of PivotChart.

    Declaration
    public PivotChartAreaStyles ChartArea { get; }
    Property Value
    Type Description
    PivotChartAreaStyles
    Examples

    This example shows how to use ChartArea property.

    // Changing the chart area's border style.
    this.pivotChart1.ChartArea.BorderStyle = BorderStyle.Fixed3D;
    // Changing the chart area's interior color.
    this.pivotChart1.ChartArea.ChartInterior = new Syncfusion.Drawing.BrushInfo(Color.Blue);
    ' Changing the chart area's border style.
    Me.pivotChart1.ChartArea.BorderStyle = BorderStyle.Fixed3D
    ' Changing the chart area's interior color.
    Me.pivotChart1.ChartArea.ChartInterior = New Syncfusion.Drawing.BrushInfo(Color.Blue)

    ChartControl

    Returns an instance of ChartControl which is loaded into the chart area of PivotChart.

    Declaration
    public ChartControl ChartControl { get; }
    Property Value
    Type Description
    ChartControl

    ChartTypes

    Gets or sets the PivotChart type.

    Declaration
    public PivotChartTypes ChartTypes { get; set; }
    Property Value
    Type Description
    PivotChartTypes
    Examples

    This example shows how to use ChartTypes property.

    // Changing the chart type to SplineArea
    this.pivotChart1.ChartTypes = Syncfusion.Windows.Forms.PivotChart.PivotChartTypes.SplineArea;
    ' Changing the chart type to SplineArea
    Me.pivotChart1.ChartTypes = Syncfusion.Windows.Forms.PivotChart.PivotChartTypes.SplineArea

    CustomPalette

    Gets or sets the custom color palette collection for PivotChart.

    Declaration
    public Color[] CustomPalette { get; set; }
    Property Value
    Type Description
    System.Drawing.Color[]
    Examples

    This example shows how to use CustomPalette property.

           
    
    //Custom Colors for the bars in the chart.
    Color[] colors = new Color[]
    {
    Color.FromArgb(165,165,165),
    Color.FromArgb(68, 114, 196),
    Color.FromArgb(112, 173, 71),
    };
    this.pivotChart1.CustomPalette = colors;
    'Custom Colors for the bars in the chart.
    Dim colors() As Color = New Color() {Color.FromArgb(165, 165, 165), Color.FromArgb(68, 114, 196), Color.FromArgb(112, 173, 71)}
    Me.pivotChart1.CustomPalette = colors

    DeferLayoutUpdate

    Gets or sets a value indicating whether to update pivot chart immediately after an action or to on-demand update is required.

    Declaration
    public bool DeferLayoutUpdate { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableTouchMode

    Gets or sets a value indicating whether the control enables the touch mode.

    Declaration
    public bool EnableTouchMode { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableUpdating

    Gets or sets a value indicating whether to enable or disable updating the cells.

    Declaration
    public bool EnableUpdating { get; set; }
    Property Value
    Type Description
    System.Boolean

    IfTrueEnables updating;OtherwiseFalse. The default value is False.

    EnableXZooming

    Gets or sets a value indicating whether zooming should be enabled for the PivotChart along the X axis.

    Declaration
    public bool EnableXZooming { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableYZooming

    Gets or sets a value indicating whether zooming should be enabled for the PivotChart along the Y axis.

    Declaration
    public bool EnableYZooming { get; set; }
    Property Value
    Type Description
    System.Boolean

    FilterFieldSection

    Gets or sets the FilterFieldSection associated with the control.

    Declaration
    public PivotFieldsSection FilterFieldSection { get; set; }
    Property Value
    Type Description
    PivotFieldsSection

    Font

    Gets or sets the System.Drawing.Font value for the control.

    Declaration
    public Font Font { get; set; }
    Property Value
    Type Description
    System.Drawing.Font

    ItemSource

    Gets or sets source of data for pivot chart. This object should be either an IEnumerable list, or a DataTable.

    Declaration
    public object ItemSource { get; set; }
    Property Value
    Type Description
    System.Object

    LegendAlignment

    Gets or sets the PivotChart legend alignment.

    Declaration
    public ChartAlignment LegendAlignment { get; set; }
    Property Value
    Type Description
    ChartAlignment
    Examples

    This example shows how to use LegendAlignment property.

    // Changing the legend alignment
    this.pivotChart1.LegendAlignment = ChartAlignment.Center;
    ' Changing the legend alignment
    Me.pivotChart1.LegendAlignment = ChartAlignment.Center

    LegendFieldSection

    Gets or sets the LegendFieldSection associated with the control.

    Declaration
    public PivotFieldsSection LegendFieldSection { get; set; }
    Property Value
    Type Description
    PivotFieldsSection

    LegendPosition

    Gets or sets the position of the legend element. Default is Right.

    Declaration
    public ChartDock LegendPosition { get; set; }
    Property Value
    Type Description
    ChartDock

    PivotAxis

    Gets the collection of PivotItems for PivotAxis.

    Declaration
    public ObservableCollection<PivotItem> PivotAxis { get; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<PivotItem>

    PivotCalculations

    Gets the collection of PivotComputationInfo for PivotCalculations.

    Declaration
    public ObservableCollection<PivotComputationInfo> PivotCalculations { get; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<PivotComputationInfo>

    PivotEngine

    Gets or sets the PivotEngine.

    Declaration
    public PivotEngine PivotEngine { get; set; }
    Property Value
    Type Description
    PivotEngine

    PivotFilters

    Gets the collection of FilterExpression for PivotFilters.

    Declaration
    public ObservableCollection<FilterExpression> PivotFilters { get; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<FilterExpression>

    PivotLegend

    Gets the collection of PivotItems for PivotLegend.

    Declaration
    public ObservableCollection<PivotItem> PivotLegend { get; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<PivotItem>

    PivotSchemaDesigner

    Gets the value of the PivotTableFieldList instance wired within the PivotChart.

    Declaration
    public PivotTableFieldList PivotSchemaDesigner { get; }
    Property Value
    Type Description
    PivotTableFieldList

    PrimaryXAxis

    Gets the primary X axis.

    Declaration
    public PivotChartAxisStyles.PivotChartAxis PrimaryXAxis { get; }
    Property Value
    Type Description
    PivotChartAxisStyles.PivotChartAxis

    PrimaryYAxis

    Gets the primary Y axis.

    Declaration
    public PivotChartAxisStyles.PivotChartAxis PrimaryYAxis { get; }
    Property Value
    Type Description
    PivotChartAxisStyles.PivotChartAxis

    PrintDocument

    Gets the print document of the pivot chart.

    Declaration
    public ChartPrintDocument PrintDocument { get; }
    Property Value
    Type Description
    ChartPrintDocument

    RealMode3D

    Gets or sets a value indicating whether the PivotChart should be displayed in a 3D plane.

    Declaration
    public bool RealMode3D { get; set; }
    Property Value
    Type Description
    System.Boolean

    Rotation

    Gets or sets the rotational angle that is to be used when the ChartArea is rendered in 3D. Default is 30.

    Declaration
    public float Rotation { get; set; }
    Property Value
    Type Description
    System.Single

    Series3D

    Gets or sets a value indicating whether PivotChart should be displayed in 3D.

    Declaration
    public bool Series3D { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowLegend

    Gets or sets a value indicating whether the PivotChart legend should be displayed.

    Declaration
    public bool ShowLegend { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowPivotTableFieldList

    Gets or sets a value indicating whether to attach the pivot table field list or not.

    Declaration
    public bool ShowPivotTableFieldList { get; set; }
    Property Value
    Type Description
    System.Boolean

    Skins

    Gets or sets the different skin's styles associated with PivotChart.

    Declaration
    public Skins Skins { get; set; }
    Property Value
    Type Description
    Skins

    SortedAxis

    Maintains the collection of sorted axis.

    Declaration
    public SortAxisDescriptorCollection SortedAxis { get; set; }
    Property Value
    Type Description
    SortAxisDescriptorCollection

    SortedLegends

    Maintains the collection of sorted legends.

    Declaration
    public SortLegendDescriptorCollection SortedLegends { get; set; }
    Property Value
    Type Description
    SortLegendDescriptorCollection

    Style3D

    Gets or sets a value indicating whether the 3D PivotChart should be displayed with 3D style.

    Declaration
    public bool Style3D { get; set; }
    Property Value
    Type Description
    System.Boolean

    UpdateManager

    Gets an instance of a class that facilitates the pivot automatically updating itself due to changes in the underlying data. To enable this support, set EnableUpdating to true;

    Declaration
    public PivotChartUpdatingManager UpdateManager { get; set; }
    Property Value
    Type Description
    PivotChartUpdatingManager
    Remarks

    In order for the PivotChart to automatically respond to the changes in the underlying data, the underlying data must be either: A) a DataTable or DataView or B) an IList; where T implements both INotifyPropertyChanging and INotifyPropertyChanged. Additionally, the IList must also implement INotifyCollectionChanged or IBindingList."

    ValueFieldSection

    Gets or sets the ValueFieldSection associated with the control.

    Declaration
    public PivotFieldsSection ValueFieldSection { get; set; }
    Property Value
    Type Description
    PivotFieldsSection

    ZoomCancel

    Gets or sets the Zoom Cancel key option. Specifies the keyboard shortcut to control ZoomCancel.

    Declaration
    public Keys ZoomCancel { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Keys

    ZoomIn

    Gets or sets the Zooming in key option. Specifies the keyboard shortcut to control ZoomIn.

    Declaration
    public Keys ZoomIn { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Keys

    ZoomLeft

    Gets or sets the Zoom Left keyboard shortcut.

    Declaration
    public Keys ZoomLeft { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Keys

    ZoomOut

    Gets or sets the Zooming out key option. Specifies the keyboard shortcut to control ZoomOut.

    Declaration
    public Keys ZoomOut { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Keys

    ZoomRight

    Gets or sets the Zoom Right keyboard shortcut.

    Declaration
    public Keys ZoomRight { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Keys

    Methods

    ApplyVisualStyle(String)

    Applies visual style for pivot chart control.

    Declaration
    public void ApplyVisualStyle(string styleName)
    Parameters
    Type Name Description
    System.String styleName

    The style to be applied.

    BeginUpdate()

    Suspends the painting of the control until the EndUpdate method called. When many changes are done to PivotChart, you should invoke the BeginUpdate method to temporarily freeze the drawing of the control. After all updates have been made, invoke the EndUpdate method to resume drawing of the control.

    Declaration
    public void BeginUpdate()

    Dispose()

    Clean up any resources being used.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Clean up any resources being used.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    true if managed resources should be disposed; otherwise, false.

    EndUpdate()

    Resumes the painting of the control suspended by calling the BeginUpdate method. When many changes are done to PivotChart, you should invoke the BeginUpdate method to temporarily freeze the drawing of the control. After all updates have been made, invoke the EndUpdate method to resume drawing of the control.

    Declaration
    public void EndUpdate()

    OnChartPopulated(PivotChart.ChartPopulatedEventArgs)

    Raises the ChartPopulated event.

    Declaration
    protected virtual void OnChartPopulated(PivotChart.ChartPopulatedEventArgs e)
    Parameters
    Type Name Description
    PivotChart.ChartPopulatedEventArgs e

    The ChartPopulatedEventArgs contains event data.

    OnCreateControl()

    Occurs when the control is created.

    Declaration
    protected override void OnCreateControl()

    OnDrill(PivotChart.DrillEventArgs)

    Raises when the DrillDown or DrillUp of the chart region.

    Declaration
    protected virtual void OnDrill(PivotChart.DrillEventArgs e)
    Parameters
    Type Name Description
    PivotChart.DrillEventArgs e

    The event data.

    RaiseChartPopulated()

    Raises the ChartPopulated event.

    Declaration
    protected void RaiseChartPopulated()

    Refresh()

    Refresh the PivotChart based on the data in ItemSource

    Declaration
    public override void Refresh()

    ReloadChartData()

    Used to reload the PivotChart series data and grouping labels.

    Declaration
    public void ReloadChartData()

    Events

    ChartPopulated

    Occurs after populated all the series in PivotChart

    Declaration
    public event PivotChart.ChartPopulatedEventHandler ChartPopulated
    Event Type
    Type Description
    PivotChart.ChartPopulatedEventHandler

    Drill

    Occurs when the DrillDown or DrillUp of the chart region.

    Declaration
    public event PivotChart.DrillEventHandler Drill
    Event Type
    Type Description
    PivotChart.DrillEventHandler

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved