RadSparklineElement
Represents the main visual element for the RadSparkline control, providing the core rendering and interaction functionality for sparkline charts.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadSparklineElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadSparklineElement...
Implements:
Inherited Members
Constructors
public RadSparklineElement()
Properties
Gets or sets the data series that provides the values to be displayed in the sparkline chart.
[Browsable(true)]
public SparkSeries Series { get; set; }
Gets the SparkView instance that controls the rendering and display of the sparkline chart.
public SparkView View { get; }
Gets the SparkWrapper instance that manages the underlying sparkline visualization and data processing.
[Browsable(false)]
public SparkWrapper Wrapper { get; }
Methods
Performs the final arrangement of child elements within the specified bounds and returns the actual size used.
Creates the child elements required for the sparkline functionality, including the spark wrapper element.
protected override void CreateChildElements()
Overrides:
Creates and returns a new SparkWrapper element that will manage the sparkline visualization and data handling.
protected virtual SparkWrapper CreateSparkWrapperElement()
A new SparkWrapper instance configured for this sparkline element.
Exports the sparkline visualization to an image stream in the specified format and size.
public void ExportToImage(Stream stream, Size size, ImageFormat imageFormat)
The stream where the exported image data will be written.
sizeSizeThe dimensions of the exported image in pixels.
imageFormatImageFormatThe image format to use for the export operation.
Gets the direct stylable children elements for theme and style application.
protected override IEnumerable<RadObject> GetStylableChildren()
IEnumerable<RadObject>
An enumerable collection of direct child RadObject instances that can be styled.
Overrides:
Gets the hierarchy of stylable children elements, including the view and all child elements for theming and styling purposes.
protected override IEnumerable<RadObject> GetStylableChildrenHierarchy()
IEnumerable<RadObject>
An enumerable collection of RadObject instances that can be styled.
Overrides:
Initializes member fields to their default values, setting up the element to stretch both horizontally and vertically.
protected override void InitializeFields()
Overrides:
Handles the key down event by forwarding the event to the wrapper element for processing.
protected override void OnKeyDown(KeyEventArgs e)
The key event arguments containing the pressed key information.
Overrides:
Handles the key press event by forwarding the event to the wrapper element for processing.
protected override void OnKeyPress(KeyPressEventArgs e)
The key press event arguments containing the pressed character information.
Overrides:
Handles the key up event by forwarding the event to the wrapper element for processing.
protected override void OnKeyUp(KeyEventArgs e)
The key event arguments containing the released key information.
Overrides:
Handles the mouse down event by converting coordinates to local space and forwarding to the wrapper element.
protected override void OnMouseDown(MouseEventArgs e)
The mouse event arguments containing button, position, and click information.
Overrides:
Handles the mouse enter event by forwarding the event to the wrapper element for processing.
protected override void OnMouseEnter(EventArgs e)
The event arguments for the mouse enter event.
Overrides:
Handles the mouse hover event by forwarding the event to the wrapper element for processing.
protected override void OnMouseHover(EventArgs e)
The event arguments for the mouse hover event.
Overrides:
Handles the mouse leave event by forwarding the event to the wrapper element for processing.
protected override void OnMouseLeave(EventArgs e)
The event arguments for the mouse leave event.
Overrides:
Handles the mouse move event by converting coordinates to local space and forwarding to the wrapper element.
protected override void OnMouseMove(MouseEventArgs e)
The mouse event arguments containing position and movement information.
Overrides:
Handles the mouse up event by converting coordinates to local space and forwarding to the wrapper element.
protected override void OnMouseUp(MouseEventArgs e)
The mouse event arguments containing button and position information.
Overrides:
Handles the mouse wheel event by converting coordinates to local space and forwarding to the wrapper element.
protected override void OnMouseWheel(MouseEventArgs e)
The mouse event arguments containing wheel delta and position information.
Overrides:
Handles render size change events and raises the RenderSizeChanged event to notify subscribers of layout changes.
protected override void OnRenderSizeChanged(SizeChangedInfo info)
The size change information containing old and new size values.
Overrides:
Renders the sparkline element using the specified graphics context, applying rotation and scaling transformations as needed.
Determines whether the element should fall back to the default theme when no specific theme is applied.
protected override bool ShouldFallbackToDefaultTheme()
false to indicate that this element uses its own theming system rather than falling back to defaults.
Overrides:
Events
Occurs when a new data point is created for the sparkline, allowing customization of individual data points.
public event SparklineCreatePointEventHandler CreatePoint
Occurs when the sparkline area requires a custom renderer for the first time, allowing users to provide custom rendering implementations.
public event SparklineCreateRendererEventHandler CreateRenderer
Occurs when a sparkline fill area is about to be painted, providing access to customize the brush used for filling regions.
public event PaintSparkFillEventHandler PaintSparkFill
Occurs when a sparkline stroke is about to be painted, providing access to customize the pen used for drawing lines and borders.
public event PaintSparkStrokeEventHandler PaintSparkStroke
Occurs when the render size of the sparkline element changes, providing notification for layout adjustments.
public event EventHandler RenderSizeChanged