Class RadChartElement
Represents the main visual element of a RadChartView control that contains and manages the chart display, including the chart area, legend, title, and drill navigation components.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.ChartView.dll
Syntax
public class RadChartElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadChartElement()
Declaration
public RadChartElement()
Properties
DrillNavigationMode
DrillNavigator
DrillPosition
Gets or sets the position of the drill navigation element within the chart layout.
Declaration
public DrillElementPosition DrillPosition { get; set; }
Property Value
DrillElementPosition
|
LegendElement
Gets the ChartLegendElement that displays series information and provides legend functionality for the chart.
Declaration
public ChartLegendElement LegendElement { get; }
Property Value
ChartLegendElement
|
LegendItemsLayout
Declaration
public LegendItemsLayout LegendItemsLayout { get; set; }
Property Value
LegendItemsLayout
|
LegendItemsOrientation
Gets or sets the orientation of legend items within the legend element, determining whether items are arranged horizontally or vertically.
Declaration
public Orientation LegendItemsOrientation { get; set; }
Property Value
System.Windows.Forms.Orientation
|
LegendOffset
Gets or sets the offset position of the legend element when LegendPosition is set to Float.
Declaration
public Point LegendOffset { get; set; }
Property Value
System.Drawing.Point
|
LegendPosition
Gets or sets the docking position of the legend element relative to the chart area or allows it to float at a custom position.
Declaration
public LegendPosition LegendPosition { get; set; }
Property Value
LegendPosition
|
LegendTitle
Gets or sets the title text displayed at the top of the legend element.
Declaration
public string LegendTitle { get; set; }
Property Value
System.String
|
ShowDrillNavigation
ShowLegend
Gets or sets a value indicating whether the chart legend is visible and displayed to show series information and data point descriptions.
Declaration
public bool ShowLegend { get; set; }
Property Value
System.Boolean
|
ShowTitle
Gets or sets a value indicating whether the chart title element is visible and displayed above or beside the chart area.
Declaration
public bool ShowTitle { get; set; }
Property Value
System.Boolean
|
TitleElement
Gets the ChartTitleElement that represents the visual title component of the chart.
Declaration
public ChartTitleElement TitleElement { get; }
Property Value
ChartTitleElement
|
TitlePosition
Gets or sets the docking position of the chart title element relative to the chart area.
Declaration
public TitlePosition TitlePosition { get; set; }
Property Value
TitlePosition
|
View
Gets the primary ChartView that contains the chart area, series, and axes for data visualization.
Declaration
public ChartView View { get; }
Property Value
ChartView
|
Views
Gets the collection of ChartView objects available for drill-down navigation and multi-view scenarios.
Declaration
public ChartViewCollection Views { get; }
Property Value
ChartViewCollection
|
Wrapper
Gets the ChartWrapper that encapsulates the chart view and handles chart rendering and interaction functionality.
Declaration
public ChartWrapper Wrapper { get; }
Property Value
ChartWrapper
|
Methods
ArrangeOverride(SizeF)
Arranges the child elements within the available space and handles special positioning for floating legend elements.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
The final size allocated for this element. |
Returns
System.Drawing.SizeF
The actual size used by the element after arrangement. |
Overrides
CreateChartLegendElement()
Creates and returns the chart legend element that displays series information and data point descriptions.
Declaration
protected virtual ChartLegendElement CreateChartLegendElement()
Returns
ChartLegendElement
A ChartLegendElement for displaying the chart legend. |
CreateChartTitleElement()
Creates and returns the chart title element that displays the chart title text.
Declaration
protected virtual ChartTitleElement CreateChartTitleElement()
Returns
ChartTitleElement
A ChartTitleElement for displaying the chart title. |
CreateChartWrapperElement()
Creates and returns the chart wrapper element that contains and manages the chart view and handles chart rendering.
Declaration
protected virtual ChartWrapper CreateChartWrapperElement()
Returns
ChartWrapper
A ChartWrapper for managing chart functionality. |
CreateChildElements()
Creates and initializes the child elements including the dock layout panel, title element, chart wrapper, legend element, and drill navigation components.
Declaration
protected override void CreateChildElements()
Overrides
CreateDockLayoutElement()
Creates and returns the dock layout panel that arranges the chart components including title, legend, and chart area.
Declaration
protected virtual DockLayoutPanel CreateDockLayoutElement()
Returns
DockLayoutPanel
A DockLayoutPanel for organizing chart elements. |
CreateDrillButtonsContainer()
Creates and returns the drill navigation container element that provides drill-down and drill-up functionality.
Declaration
protected virtual RadItem CreateDrillButtonsContainer()
Returns
RadItem
A RadItem representing the drill navigation container. |
DrillDown(DataPoint)
Initiates a drill-down operation to navigate to a more detailed view based on the specified data point.
Declaration
public virtual bool DrillDown(DataPoint point)
Parameters
DataPoint
point
The DataPoint that serves as the entry point for the drill-down operation. |
Returns
System.Boolean
|
DrillToIndex(Int32)
Navigates directly to a specific chart view by its index in the view collection.
Declaration
public virtual bool DrillToIndex(int viewIndex)
Parameters
System.Int32
viewIndex
The zero-based index of the target view in the view collection. |
Returns
System.Boolean
|
DrillToTop()
Navigates to the top-level chart view, returning to the root of the drill navigation hierarchy.
Declaration
public virtual bool DrillToTop()
Returns
System.Boolean
|
DrillUp()
Initiates a drill-up operation to navigate back to the previous chart view level.
Declaration
public virtual bool DrillUp()
Returns
System.Boolean
|
GetLegendDockPosition()
Determines and returns the appropriate dock position for the legend element based on the current LegendPosition.
Declaration
protected virtual Dock GetLegendDockPosition()
Returns
Dock
A Dock value representing the dock position for the legend element. |
GetStylableChildren()
Returns an enumerable collection of direct stylable child objects, including the chart view and immediate child elements.
Declaration
protected override IEnumerable<RadObject> GetStylableChildren()
Returns
System.Collections.Generic.IEnumerable<RadObject>
An System.Collections.Generic.IEnumerable<T> containing direct stylable child objects. |
Overrides
GetStylableChildrenHierarchy()
Returns an enumerable collection of all stylable child objects in the entire hierarchy, including the chart view and all nested child elements.
Declaration
protected override IEnumerable<RadObject> GetStylableChildrenHierarchy()
Returns
System.Collections.Generic.IEnumerable<RadObject>
An System.Collections.Generic.IEnumerable<T> containing all stylable objects in the hierarchy. |
Overrides
GetTitleDockPosition()
Determines and returns the appropriate dock position for the title element based on the current TitlePosition.
Declaration
protected virtual Dock GetTitleDockPosition()
Returns
Dock
A Dock value representing the dock position for the title element. |
InitializeFields()
Initializes member fields to their default values. This method is called prior the CreateChildItems one and allows for initialization of members on which child elements depend.
Declaration
protected override void InitializeFields()
Overrides
OnGesture(GestureEventArgs)
Processes gesture events and routes them to the appropriate gesture handler based on the gesture type.
Declaration
protected override void OnGesture(GestureEventArgs args)
Parameters
GestureEventArgs
args
The GestureEventArgs containing gesture information and event data. |
Overrides
OnKeyDown(KeyEventArgs)
Raises the KeyDown event and forwards it to the chart wrapper for processing.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
System.Windows.Forms.KeyEventArgs
e
The System.Windows.Forms.KeyEventArgs instance containing the event data. |
Overrides
OnKeyPress(KeyPressEventArgs)
Raises the KeyPress event and forwards it to the chart wrapper for processing.
Declaration
protected override void OnKeyPress(KeyPressEventArgs e)
Parameters
System.Windows.Forms.KeyPressEventArgs
e
The System.Windows.Forms.KeyPressEventArgs instance containing the event data. |
Overrides
OnKeyUp(KeyEventArgs)
Raises the KeyUp event and forwards it to the chart wrapper for processing.
Declaration
protected override void OnKeyUp(KeyEventArgs e)
Parameters
System.Windows.Forms.KeyEventArgs
e
The System.Windows.Forms.KeyEventArgs instance containing the event data. |
Overrides
OnMouseDown(MouseEventArgs)
Raises the MouseDown event.
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Overrides
OnMouseEnter(EventArgs)
Raises the MouseEnter event.
Declaration
protected override void OnMouseEnter(EventArgs e)
Parameters
System.EventArgs
e
The System.EventArgs instance containing the event data. |
Overrides
OnMouseHover(EventArgs)
Raises the MouseHover event.
Declaration
protected override void OnMouseHover(EventArgs e)
Parameters
System.EventArgs
e
The System.EventArgs instance containing the event data. |
Overrides
OnMouseLeave(EventArgs)
Raises the MouseLeave event.
Declaration
protected override void OnMouseLeave(EventArgs e)
Parameters
System.EventArgs
e
The System.EventArgs instance containing the event data. |
Overrides
OnMouseMove(MouseEventArgs)
Raises the MouseMove event.
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Overrides
OnMouseUp(MouseEventArgs)
Raises the MouseUp event.
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Overrides
OnMouseWheel(MouseEventArgs)
Raises the MouseWheel event and forwards it to the chart wrapper for processing.
Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Overrides
OnPanGesture(PanGestureEventArgs)
Processes pan gesture events and forwards them to the chart wrapper for handling chart panning operations.
Declaration
protected override void OnPanGesture(PanGestureEventArgs args)
Parameters
PanGestureEventArgs
args
The PanGestureEventArgs containing pan gesture information. |
Overrides
OnPressAndTapGesture(PressAndTapGestureEventArgs)
Processes press and tap gesture events and forwards them to the chart wrapper for handling advanced touch interactions.
Declaration
protected override void OnPressAndTapGesture(PressAndTapGestureEventArgs args)
Parameters
PressAndTapGestureEventArgs
args
The PressAndTapGestureEventArgs containing press and tap gesture information. |
Overrides
OnRenderSizeChanged(SizeChangedInfo)
Handles render size change events and raises the RenderSizeChanged event when the chart element's size changes.
Declaration
protected override void OnRenderSizeChanged(SizeChangedInfo info)
Parameters
SizeChangedInfo
info
The SizeChangedInfo containing information about the size change. |
Overrides
OnRotateGesture(RotateGestureEventArgs)
Processes rotate gesture events and forwards them to the chart wrapper for handling chart rotation operations.
Declaration
protected override void OnRotateGesture(RotateGestureEventArgs args)
Parameters
RotateGestureEventArgs
args
The RotateGestureEventArgs containing rotation gesture information. |
Overrides
OnTwoFingerTapGesture(GestureEventArgs)
Processes two-finger tap gesture events and forwards them to the chart wrapper for handling multi-touch interactions.
Declaration
protected override void OnTwoFingerTapGesture(GestureEventArgs args)
Parameters
GestureEventArgs
args
The GestureEventArgs containing two-finger tap gesture information. |
Overrides
OnZoomGesture(ZoomGestureEventArgs)
Processes zoom gesture events and forwards them to the chart wrapper for handling chart zooming operations.
Declaration
protected override void OnZoomGesture(ZoomGestureEventArgs args)
Parameters
ZoomGestureEventArgs
args
The ZoomGestureEventArgs containing zoom gesture information. |
Overrides
PaintElement(IGraphics, Single, SizeF)
Paints the chart element by drawing the chart view content to the provided graphics surface.
Declaration
protected override void PaintElement(IGraphics graphics, float angle, SizeF scale)
Parameters
IGraphics
graphics
The graphics object used for drawing operations. |
System.Single
angle
The rotation angle for the drawing operation. |
System.Drawing.SizeF
scale
The scaling factor for the drawing operation. |
Overrides
SetLegendDock(LegendPosition)
Sets the docking position of the legend element based on the specified LegendPosition.
Declaration
protected virtual void SetLegendDock(LegendPosition position)
Parameters
LegendPosition
position
The desired position for the legend element. |
SetTitleDock(TitlePosition)
Sets the docking position of the title element based on the specified TitlePosition.
Declaration
protected virtual void SetTitleDock(TitlePosition position)
Parameters
TitlePosition
position
The desired position for the title element. |
ShouldFallbackToDefaultTheme()
Determines whether the chart element should fallback to the default theme when no custom theme is applied.
Declaration
protected override bool ShouldFallbackToDefaultTheme()
Returns
System.Boolean
|
Overrides
Events
ContextMenuOpening
Occurs when the chart context menu is about to open, allowing customization of menu items and behavior.
Declaration
public event ChartViewContextMenuOpeningEventHandler ContextMenuOpening
Event Type
ChartViewContextMenuOpeningEventHandler
|
CreatePoint
Occurs when a new DataPoint is created, allowing customization of data point properties and behavior.
Declaration
public event ChartViewCreatePointEventHandler CreatePoint
Event Type
ChartViewCreatePointEventHandler
|
CreatePointElement
Occurs when a new DataPointElement is created for visual representation of data points, allowing customization of point element properties.
Declaration
public event ChartViewCreatePointElementEventHandler CreatePointElement
Event Type
ChartViewCreatePointElementEventHandler
|
CreateRenderer
Occurs when the chart area requires a custom renderer to be created for the first time during chart initialization.
Declaration
public event ChartViewCreateRendererEventHandler CreateRenderer
Event Type
ChartViewCreateRendererEventHandler
|
CurrentViewIndexChanged
Occurs when the current view index changes during drill navigation operations.
Declaration
public event EventHandler CurrentViewIndexChanged
Event Type
System.EventHandler
|
Drill
Occurs when a drill operation is initiated, allowing navigation between different chart views or data levels.
Declaration
public event DrillEventHandler Drill
Event Type
DrillEventHandler
|
LabelFormatting
Occurs when a data point label needs to be formatted before display, allowing customization of label content and appearance.
Declaration
public event ChartViewLabelFormattingEventHandler LabelFormatting
Event Type
ChartViewLabelFormattingEventHandler
|
RenderSizeChanged
Occurs when the chart element's render size changes, typically during resize operations.
Declaration
public event EventHandler RenderSizeChanged
Event Type
System.EventHandler
|