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
Implements
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 |
---|
System.Boolean |
AxisFieldSection
Gets or sets the AxisFieldSections associated with the control.
Declaration
public PivotFieldsSection AxisFieldSection { get; set; }
Property Value
Type |
---|
PivotFieldsSection |
ChartArea
Gets the ChartArea styles of PivotChart.
Declaration
public PivotChartAreaStyles ChartArea { get; }
Property Value
Type |
---|
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 |
---|
ChartControl |
ChartTypes
Gets or sets the PivotChart type.
Declaration
public PivotChartTypes ChartTypes { get; set; }
Property Value
Type |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
System.Boolean |
FilterFieldSection
Gets or sets the FilterFieldSection associated with the control.
Declaration
public PivotFieldsSection FilterFieldSection { get; set; }
Property Value
Type |
---|
PivotFieldsSection |
Font
Gets or sets the System.Drawing.Font value for the control.
Declaration
public Font Font { get; set; }
Property Value
Type |
---|
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 |
---|
System.Object |
LegendAlignment
Gets or sets the PivotChart legend alignment.
Declaration
public ChartAlignment LegendAlignment { get; set; }
Property Value
Type |
---|
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 |
---|
PivotFieldsSection |
LegendPosition
Gets or sets the position of the legend element. Default is Right.
Declaration
public ChartDock LegendPosition { get; set; }
Property Value
Type |
---|
ChartDock |
PivotAxis
Gets the collection of PivotItems for PivotAxis.
Declaration
public ObservableCollection<PivotItem> PivotAxis { get; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<PivotItem> |
PivotCalculations
Gets the collection of PivotComputationInfo for PivotCalculations.
Declaration
public ObservableCollection<PivotComputationInfo> PivotCalculations { get; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<PivotComputationInfo> |
PivotEngine
Gets or sets the PivotEngine.
Declaration
public PivotEngine PivotEngine { get; set; }
Property Value
Type |
---|
PivotEngine |
PivotFilters
Gets the collection of FilterExpression for PivotFilters.
Declaration
public ObservableCollection<FilterExpression> PivotFilters { get; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<FilterExpression> |
PivotLegend
Gets the collection of PivotItems for PivotLegend.
Declaration
public ObservableCollection<PivotItem> PivotLegend { get; }
Property Value
Type |
---|
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 |
---|
PivotTableFieldList |
PrimaryXAxis
Gets the primary X axis.
Declaration
public PivotChartAxisStyles.PivotChartAxis PrimaryXAxis { get; }
Property Value
Type |
---|
PivotChartAxisStyles.PivotChartAxis |
PrimaryYAxis
Gets the primary Y axis.
Declaration
public PivotChartAxisStyles.PivotChartAxis PrimaryYAxis { get; }
Property Value
Type |
---|
PivotChartAxisStyles.PivotChartAxis |
PrintDocument
Gets the print document of the pivot chart.
Declaration
public ChartPrintDocument PrintDocument { get; }
Property Value
Type |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
System.Boolean |
Skins
Gets or sets the different skin's styles associated with PivotChart.
Declaration
public Skins Skins { get; set; }
Property Value
Type |
---|
Skins |
SortedAxis
Maintains the collection of sorted axis.
Declaration
public SortAxisDescriptorCollection SortedAxis { get; set; }
Property Value
Type |
---|
SortAxisDescriptorCollection |
SortedLegends
Maintains the collection of sorted legends.
Declaration
public SortLegendDescriptorCollection SortedLegends { get; set; }
Property Value
Type |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
System.Windows.Forms.Keys |
ZoomLeft
Gets or sets the Zoom Left keyboard shortcut.
Declaration
public Keys ZoomLeft { get; set; }
Property Value
Type |
---|
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 |
---|
System.Windows.Forms.Keys |
ZoomRight
Gets or sets the Zoom Right keyboard shortcut.
Declaration
public Keys ZoomRight { get; set; }
Property Value
Type |
---|
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 |
---|
PivotChart.ChartPopulatedEventHandler |
Drill
Occurs when the DrillDown or DrillUp of the chart region.
Declaration
public event PivotChart.DrillEventHandler Drill
Event Type
Type |
---|
PivotChart.DrillEventHandler |