Class
RadSparkline

Represents a sparkline control that provides a compact, inline chart visualization for displaying trends and patterns in data series.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Data Controls")]
public class RadSparkline : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider, IPrintable

Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadSparkline

Implements: IAnalyticsProviderIBindableComponentIComponentIComponentTreeHandlerIDisposableIDropTargetILayoutHandlerINotifyPropertyChangedIPrintableISupportInitializeISupportInitializeNotificationISynchronizeInvokeIWin32Window

Inherited Members RadControl.isResizing2RadControl.isDisposing2RadControl.invalidResizeRectRadControl.isAccessibilityRequestedRadControl.Construct()RadControl.CreateBehavior()RadControl.CreateRootElement()RadControl.InitializeRootElement(RootRadElement)RadControl.LoadElementTree()RadControl.LoadElementTree(Size)RadControl.OnKeyDown(KeyEventArgs)RadControl.OnKeyUp(KeyEventArgs)RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)RadControl.OnKeyPress(KeyPressEventArgs)RadControl.OnClick(EventArgs)RadControl.OnDoubleClick(EventArgs)RadControl.OnMouseDown(MouseEventArgs)RadControl.OnMouseUp(MouseEventArgs)RadControl.OnMouseEnter(EventArgs)RadControl.OnMouseLeave(EventArgs)RadControl.OnMouseMove(MouseEventArgs)RadControl.OnMouseHover(EventArgs)RadControl.OnMouseWheel(MouseEventArgs)RadControl.OnMouseCaptureChanged(EventArgs)RadControl.OnGotFocus(EventArgs)RadControl.OnLostFocus(EventArgs)RadControl.OnCreateControl()RadControl.OnHandleDestroyed(EventArgs)RadControl.OnParentChanged(EventArgs)RadControl.OnVisibleChanged(EventArgs)RadControl.OnFontChanged(EventArgs)RadControl.OnForeColorChanged(EventArgs)RadControl.OnBackColorChanged(EventArgs)RadControl.OnEnabledChanged(EventArgs)RadControl.OnBindingContextChanged(EventArgs)RadControl.OnLocationChanged(EventArgs)RadControl.OnPaddingChanged(EventArgs)RadControl.OnRightToLeftChanged(EventArgs)RadControl.OnPaint(PaintEventArgs)RadControl.OnLayout(LayoutEventArgs)RadControl.OnAutoSizeChanged(EventArgs)RadControl.WndProc(ref Message)RadControl.OnInvalidated(RadElement)RadControl.OnCaptureLosing()RadControl.OnToolTipTextNeeded(object, ToolTipTextNeededEventArgs)RadControl.OnScreenTipNeeded(object, ScreenTipNeededEventArgs)RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)RadControl.ProcessMnemonic(char)RadControl.ProcessFocusRequested(RadElement)RadControl.ProcessCaptureChangeRequested(RadElement, bool)RadControl.ProcessAutoSizeChanged(bool)RadControl.IsInputKey(Keys)RadControl.GetInputElement()RadControl.BeginInit()RadControl.EndInit()RadControl.OnNotifyPropertyChanged(string)RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadControl.GetPreferredSize(Size)RadControl.SetBoundsCore(int, int, int, int, BoundsSpecified)RadControl.GetRootElementDesiredSize(int, int, int, int)RadControl.OnZoomGesture(ZoomGestureEventArgs)RadControl.OnRotateGesture(RotateGestureEventArgs)RadControl.OnPanGesture(PanGestureEventArgs)RadControl.OnTwoFingerTapGesture(GestureEventArgs)RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)RadControl.OnGesture(GestureEventArgs)RadControl.ProcessGesture(Message)RadControl.EnableGesture(GestureType)RadControl.DisableGesture(GestureType)RadControl.SuspendUpdate()RadControl.ResumeUpdate()RadControl.ResumeUpdate(bool)RadControl.InvokeLayoutCallback(LayoutCallback)RadControl.RegisterHostedControl(RadHostItem)RadControl.UnregisterHostedControl(RadHostItem, bool)RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)RadControl.GetPlainText()RadControl.ShouldSerializeProperty(RadProperty)RadControl.ShouldSerializeProperty(RadProperty, RadObject)RadControl.ResetProperty(RadProperty, RadObject)RadControl.CanEditElementAtDesignTime(RadElement)RadControl.ProcessCodedUIMessage(ref IPCMessage)RadControl.FindPropertyInChildren(RadControl, IPCMessage)RadControl.PerformRadAutoScale(BoundsSpecified?)RadControl.GetMonitorDpiScaleFactor(Control)RadControl.SetRadAutoScale(bool)RadControl.EnableDpiScalingRadControl.EnableRadAutoScaleRadControl.EnableRadFormInitialDpiScalingRadControl.EnableImageDpiScalingRadControl.EnableSvgImagesRadControl.IsLoadedRadControl.ElementTreeRadControl.UseCompatibleTextRenderingDefaultValueRadControl.BehaviorRadControl.RootElementRadControl.PaddingRadControl.ThemeNameRadControl.TextRadControl.EnableThemingRadControl.ThemeClassNameRadControl.ImageListRadControl.ImageScalingSizeRadControl.UseCompatibleTextRenderingRadControl.AutoSizeRadControl.MaximumSizeRadControl.MinimumSizeRadControl.FocusableRadControl.SiteRadControl.CausesValidationRadControl.IsInitializingRadControl.SmallImageListRadControl.SmallImageScalingSizeRadControl.IsDesignModeRadControl.IsDisplayedRadControl.FocusedElementRadControl.AllowShowFocusCuesRadControl.ShowItemToolTipsRadControl.CommandBindingsRadControl.EnableKeyMapRadControl.BackColorRadControl.ForeColorRadControl.FontRadControl.ValidationCancelRadControl.EnableAnalyticsRadControl.AnalyticsNameRadControl.EnableRadAccessibilityObjectsRadControl.EnableCodedUITestsRadControl.EnableCodedUITestsDefaultValueRadControl.EnableUIAutomationRadControl.EnableUIAutomationDefaultValueRadControl.ElementInvalidatedRadControl.ToolTipTextNeededRadControl.ScreenTipNeededRadControl.ThemeNameChangedRadControl.InitializedRadControl.PropertyChangedRadControl.ZoomGestureRadControl.RotateGestureRadControl.PanGestureRadControl.TwoFingerTapGestureRadControl.PressAndTapGestureScrollableControl.ScrollStateAutoScrollingScrollableControl.ScrollStateHScrollVisibleScrollableControl.ScrollStateVScrollVisibleScrollableControl.ScrollStateUserHasScrolledScrollableControl.ScrollStateFullDragScrollableControl.AdjustFormScrollbars(bool)ScrollableControl.GetScrollState(int)ScrollableControl.OnPaintBackground(PaintEventArgs)ScrollableControl.SetDisplayRectLocation(int, int)ScrollableControl.ScrollControlIntoView(Control)ScrollableControl.ScrollToControl(Control)ScrollableControl.OnScroll(ScrollEventArgs)ScrollableControl.SetAutoScrollMargin(int, int)ScrollableControl.SetScrollState(int, bool)ScrollableControl.AutoScrollScrollableControl.AutoScrollMarginScrollableControl.AutoScrollPositionScrollableControl.AutoScrollMinSizeScrollableControl.CreateParamsScrollableControl.DisplayRectangleScrollableControl.HScrollScrollableControl.HorizontalScrollScrollableControl.VScrollScrollableControl.VerticalScrollScrollableControl.ScrollControl.GetAccessibilityObjectById(int)Control.SetAutoSizeMode(AutoSizeMode)Control.GetAutoSizeMode()Control.AccessibilityNotifyClients(AccessibleEvents, int)Control.AccessibilityNotifyClients(AccessibleEvents, int, int)Control.BeginInvoke(Delegate)Control.BeginInvoke(Delegate, params object[])Control.BringToFront()Control.Contains(Control)Control.CreateAccessibilityInstance()Control.CreateControlsInstance()Control.CreateGraphics()Control.CreateHandle()Control.CreateControl()Control.DefWndProc(ref Message)Control.DestroyHandle()Control.DoDragDrop(object, DragDropEffects)Control.DrawToBitmap(Bitmap, Rectangle)Control.EndInvoke(IAsyncResult)Control.FindForm()Control.GetTopLevel()Control.RaiseKeyEvent(object, KeyEventArgs)Control.RaiseMouseEvent(object, MouseEventArgs)Control.Focus()Control.FromChildHandle(IntPtr)Control.FromHandle(IntPtr)Control.GetChildAtPoint(Point, GetChildAtPointSkip)Control.GetChildAtPoint(Point)Control.GetContainerControl()Control.GetScaledBounds(Rectangle, SizeF, BoundsSpecified)Control.GetNextControl(Control, bool)Control.GetStyle(ControlStyles)Control.Hide()Control.InitLayout()Control.Invalidate(Region)Control.Invalidate(Region, bool)Control.Invalidate()Control.Invalidate(bool)Control.Invalidate(Rectangle)Control.Invalidate(Rectangle, bool)Control.Invoke(Delegate)Control.Invoke(Delegate, params object[])Control.InvokePaint(Control, PaintEventArgs)Control.InvokePaintBackground(Control, PaintEventArgs)Control.IsKeyLocked(Keys)Control.IsInputChar(char)Control.IsMnemonic(char, string)Control.LogicalToDeviceUnits(int)Control.LogicalToDeviceUnits(Size)Control.ScaleBitmapLogicalToDevice(ref Bitmap)Control.NotifyInvalidate(Rectangle)Control.InvokeOnClick(Control, EventArgs)Control.OnBackgroundImageChanged(EventArgs)Control.OnBackgroundImageLayoutChanged(EventArgs)Control.OnCausesValidationChanged(EventArgs)Control.OnContextMenuChanged(EventArgs)Control.OnContextMenuStripChanged(EventArgs)Control.OnCursorChanged(EventArgs)Control.OnDockChanged(EventArgs)Control.OnNotifyMessage(Message)Control.OnParentBackColorChanged(EventArgs)Control.OnParentBackgroundImageChanged(EventArgs)Control.OnParentBindingContextChanged(EventArgs)Control.OnParentCursorChanged(EventArgs)Control.OnParentEnabledChanged(EventArgs)Control.OnParentFontChanged(EventArgs)Control.OnParentForeColorChanged(EventArgs)Control.OnParentRightToLeftChanged(EventArgs)Control.OnParentVisibleChanged(EventArgs)Control.OnPrint(PaintEventArgs)Control.OnTabIndexChanged(EventArgs)Control.OnTabStopChanged(EventArgs)Control.OnTextChanged(EventArgs)Control.OnClientSizeChanged(EventArgs)Control.OnControlAdded(ControlEventArgs)Control.OnControlRemoved(ControlEventArgs)Control.OnHandleCreated(EventArgs)Control.OnDragEnter(DragEventArgs)Control.OnDragOver(DragEventArgs)Control.OnDragLeave(EventArgs)Control.OnDragDrop(DragEventArgs)Control.OnGiveFeedback(GiveFeedbackEventArgs)Control.OnEnter(EventArgs)Control.InvokeGotFocus(Control, EventArgs)Control.OnHelpRequested(HelpEventArgs)Control.OnInvalidated(InvalidateEventArgs)Control.OnLeave(EventArgs)Control.InvokeLostFocus(Control, EventArgs)Control.OnMarginChanged(EventArgs)Control.OnMouseDoubleClick(MouseEventArgs)Control.OnMouseClick(MouseEventArgs)Control.OnDpiChangedBeforeParent(EventArgs)Control.OnDpiChangedAfterParent(EventArgs)Control.OnMove(EventArgs)Control.OnQueryContinueDrag(QueryContinueDragEventArgs)Control.OnRegionChanged(EventArgs)Control.OnResize(EventArgs)Control.OnSizeChanged(EventArgs)Control.OnChangeUICues(UICuesEventArgs)Control.OnStyleChanged(EventArgs)Control.OnSystemColorsChanged(EventArgs)Control.OnValidating(CancelEventArgs)Control.OnValidated(EventArgs)Control.RescaleConstantsForDpi(int, int)Control.PerformLayout()Control.PerformLayout(Control, string)Control.PointToClient(Point)Control.PointToScreen(Point)Control.PreProcessMessage(ref Message)Control.PreProcessControlMessage(ref Message)Control.ProcessCmdKey(ref Message, Keys)Control.ProcessDialogChar(char)Control.ProcessDialogKey(Keys)Control.ProcessKeyEventArgs(ref Message)Control.ProcessKeyMessage(ref Message)Control.ProcessKeyPreview(ref Message)Control.RaiseDragEvent(object, DragEventArgs)Control.RaisePaintEvent(object, PaintEventArgs)Control.RecreateHandle()Control.RectangleToClient(Rectangle)Control.RectangleToScreen(Rectangle)Control.ReflectMessage(IntPtr, ref Message)Control.ResetMouseEventArgs()Control.ResetText()Control.ResumeLayout()Control.ResumeLayout(bool)Control.Scale(SizeF)Control.Select()Control.Select(bool, bool)Control.SelectNextControl(Control, bool, bool, bool, bool)Control.SendToBack()Control.SetBounds(int, int, int, int)Control.SetBounds(int, int, int, int, BoundsSpecified)Control.SetClientSizeCore(int, int)Control.SizeFromClientSize(Size)Control.SetStyle(ControlStyles, bool)Control.SetTopLevel(bool)Control.SetVisibleCore(bool)Control.RtlTranslateAlignment(HorizontalAlignment)Control.RtlTranslateAlignment(LeftRightAlignment)Control.RtlTranslateAlignment(ContentAlignment)Control.RtlTranslateHorizontal(HorizontalAlignment)Control.RtlTranslateLeftRight(LeftRightAlignment)Control.RtlTranslateContent(ContentAlignment)Control.Show()Control.SuspendLayout()Control.Update()Control.UpdateBounds()Control.UpdateBounds(int, int, int, int)Control.UpdateBounds(int, int, int, int, int, int)Control.UpdateZOrder()Control.UpdateStyles()Control.OnImeModeChanged(EventArgs)Control.AccessibilityObjectControl.AccessibleDefaultActionDescriptionControl.AccessibleDescriptionControl.AccessibleNameControl.AccessibleRoleControl.AllowDropControl.AnchorControl.AutoScrollOffsetControl.LayoutEngineControl.BackgroundImageControl.BackgroundImageLayoutControl.BindingContextControl.BottomControl.BoundsControl.CanFocusControl.CanRaiseEventsControl.CanSelectControl.CaptureControl.CheckForIllegalCrossThreadCallsControl.ClientRectangleControl.ClientSizeControl.CompanyNameControl.ContainsFocusControl.ContextMenuControl.ContextMenuStripControl.ControlsControl.CreatedControl.CursorControl.DataBindingsControl.DefaultBackColorControl.DefaultCursorControl.DefaultFontControl.DefaultForeColorControl.DefaultMarginControl.DefaultMaximumSizeControl.DefaultMinimumSizeControl.DefaultPaddingControl.DeviceDpiControl.IsDisposedControl.DisposingControl.DockControl.DoubleBufferedControl.EnabledControl.FocusedControl.FontHeightControl.HandleControl.HasChildrenControl.HeightControl.IsHandleCreatedControl.InvokeRequiredControl.IsAccessibleControl.IsMirroredControl.LeftControl.LocationControl.MarginControl.ModifierKeysControl.MouseButtonsControl.MousePositionControl.NameControl.ParentControl.ProductNameControl.ProductVersionControl.RecreatingHandleControl.RegionControl.RenderRightToLeftControl.ResizeRedrawControl.RightControl.RightToLeftControl.ScaleChildrenControl.SizeControl.TabIndexControl.TabStopControl.TagControl.TopControl.TopLevelControlControl.ShowKeyboardCuesControl.ShowFocusCuesControl.UseWaitCursorControl.VisibleControl.WidthControl.PreferredSizeControl.CanEnableImeControl.DefaultImeModeControl.ImeModeControl.ImeModeBaseControl.PropagatingImeModeControl.BackColorChangedControl.BackgroundImageChangedControl.BackgroundImageLayoutChangedControl.BindingContextChangedControl.CausesValidationChangedControl.ClientSizeChangedControl.ContextMenuChangedControl.ContextMenuStripChangedControl.CursorChangedControl.DockChangedControl.EnabledChangedControl.FontChangedControl.ForeColorChangedControl.LocationChangedControl.MarginChangedControl.RegionChangedControl.RightToLeftChangedControl.SizeChangedControl.TabIndexChangedControl.TabStopChangedControl.TextChangedControl.VisibleChangedControl.ClickControl.ControlAddedControl.ControlRemovedControl.DragDropControl.DragEnterControl.DragOverControl.DragLeaveControl.GiveFeedbackControl.HandleCreatedControl.HandleDestroyedControl.HelpRequestedControl.InvalidatedControl.PaddingChangedControl.PaintControl.QueryContinueDragControl.QueryAccessibilityHelpControl.DoubleClickControl.EnterControl.GotFocusControl.KeyDownControl.KeyPressControl.KeyUpControl.LayoutControl.LeaveControl.LostFocusControl.MouseClickControl.MouseDoubleClickControl.MouseCaptureChangedControl.MouseDownControl.MouseEnterControl.MouseLeaveControl.DpiChangedBeforeParentControl.DpiChangedAfterParentControl.MouseHoverControl.MouseMoveControl.MouseUpControl.MouseWheelControl.MoveControl.PreviewKeyDownControl.ResizeControl.ChangeUICuesControl.StyleChangedControl.SystemColorsChangedControl.ValidatingControl.ValidatedControl.ParentChangedControl.ImeModeChangedComponent.Dispose()Component.GetService(Type)Component.ToString()Component.EventsComponent.ContainerComponent.DesignModeComponent.DisposedMarshalByRefObject.MemberwiseClone(bool)MarshalByRefObject.GetLifetimeService()MarshalByRefObject.InitializeLifetimeService()MarshalByRefObject.CreateObjRef(Type)

Constructors

RadSparkline()

Initializes a new instance of the RadSparkline class with default settings.

Declaration

cs-api-definition
public RadSparkline()

Properties

Annotations

Gets the collection of annotations that can be added to the sparkline to provide additional visual information or markers.

Declaration

cs-api-definition
[Browsable(true)]
public SparkAnnotationCollection Annotations { get; }

Property Value

SparkAnnotationCollection

Area

Gets the current visible area of the sparkline that defines the rendering boundaries and viewport.

Declaration

cs-api-definition
[Browsable(false)]
public SparkArea Area { get; }

Property Value

SparkArea

Axes

Gets the collection of axes used by the sparkline for data positioning and scaling.

Declaration

cs-api-definition
[Browsable(true)]
public SparkAxisCollection Axes { get; }

Property Value

SparkAxisCollection

AxisDrawMode

Gets or sets how the horizontal axis is drawn relative to the data series in the sparkline.

Declaration

cs-api-definition
[Browsable(true)]
public AxisDrawMode AxisDrawMode { get; set; }

Property Value

AxisDrawMode

Controllers

Gets the collection of controllers that manage user interaction and behavior for the sparkline view.

Declaration

cs-api-definition
[Browsable(false)]
public SparkViewControllerCollection Controllers { get; }

Property Value

SparkViewControllerCollection

DefaultSize

Gets the default size of the RadSparkline control.

Declaration

cs-api-definition
protected override Size DefaultSize { get; }

Property Value

Size

Overrides Control.DefaultSize

EmptyPointBehavior

Gets or sets how empty or null data points are handled in the sparkline visualization.

Declaration

cs-api-definition
[Browsable(true)]
public EmptyPointBehavior EmptyPointBehavior { get; set; }

Property Value

EmptyPointBehavior

Series

Gets or sets the data series that will be displayed in the sparkline chart.

Declaration

cs-api-definition
[Browsable(true)]
public SparkSeries Series { get; set; }

Property Value

SparkSeries

ShowAxis

Gets or sets whether the horizontal axis line is visible in the sparkline chart.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowAxis { get; set; }

Property Value

bool

ShowFirstPointIndicator

Gets or sets whether a marker indicating the first data point in the series will be displayed on the sparkline.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowFirstPointIndicator { get; set; }

Property Value

bool

ShowHighPointIndicator

Gets or sets whether a marker indicating the highest data point value will be displayed on the sparkline.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowHighPointIndicator { get; set; }

Property Value

bool

ShowLastPointIndicator

Gets or sets whether a marker indicating the last data point in the series will be displayed on the sparkline.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowLastPointIndicator { get; set; }

Property Value

bool

ShowLowPointIndicator

Gets or sets whether a marker indicating the lowest data point value will be displayed on the sparkline.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowLowPointIndicator { get; set; }

Property Value

bool

ShowNegativePointIndicators

Gets or sets whether markers for negative data point values will be displayed on the sparkline.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowNegativePointIndicators { get; set; }

Property Value

bool

ShowToolTip

Gets or sets a value indicating whether tooltips are displayed when hovering over data points in the sparkline.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowToolTip { get; set; }

Property Value

bool

SparklineElement

Gets the main sparkline element that contains the visualization logic and rendering components.

Declaration

cs-api-definition
public RadSparklineElement SparklineElement { get; }

Property Value

RadSparklineElement

View

Gets the SparkView instance associated with the sparkline element that manages the chart rendering and data display.

Declaration

cs-api-definition
public SparkView View { get; }

Property Value

SparkView

Methods

BeginPrint(RadPrintDocument, PrintEventArgs)

Begins the print process for the sparkline and returns the number of pages to print.

Declaration

cs-api-definition
public int BeginPrint(RadPrintDocument sender, PrintEventArgs args)

Parameters

sender

RadPrintDocument

The RadPrintDocument that initiated the print operation.

args

PrintEventArgs

A PrintEventArgs that contains the event data.

Returns

int

The number of pages to print (always returns 1 for sparklines).

Implements IPrintable.BeginPrint(RadPrintDocument, PrintEventArgs)

CreateChildItems(RadElement)

Creates the child elements for the sparkline control within the specified parent element.

Declaration

cs-api-definition
protected override void CreateChildItems(RadElement parent)

Parameters

parent

RadElement

The parent element that will contain the child elements.

Overrides RadControl.CreateChildItems(RadElement)

CreateSparklineElement()

Creates and returns a new instance of the RadSparklineElement that will be used as the core element of the sparkline control.

Declaration

cs-api-definition
protected virtual RadSparklineElement CreateSparklineElement()

Returns

RadSparklineElement

A new RadSparklineElement instance.

DeferRefresh()

Returns a disposable object that can be used to defer refresh operations until disposed, allowing for batch updates.

Declaration

cs-api-definition
public IDisposable DeferRefresh()

Returns

IDisposable

An IDisposable object that defers refresh operations.

Dispose(bool)

Releases the unmanaged resources used by the RadSparkline and optionally releases the managed resources.

Declaration

cs-api-definition
protected override void Dispose(bool disposing)

Parameters

disposing

bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Overrides RadControl.Dispose(bool)

EndPrint(RadPrintDocument, PrintEventArgs)

Ends the print process for the sparkline.

Declaration

cs-api-definition
public bool EndPrint(RadPrintDocument sender, PrintEventArgs args)

Parameters

sender

RadPrintDocument

The RadPrintDocument that initiated the print operation.

args

PrintEventArgs

A PrintEventArgs that contains the event data.

Returns

bool

true if the print operation completed successfully; otherwise, false.

Implements IPrintable.EndPrint(RadPrintDocument, PrintEventArgs)

ExportToImage(Stream, Size)

Exports the sparkline to a stream as a PNG image with the specified size.

Declaration

cs-api-definition
public void ExportToImage(Stream stream, Size size)

Parameters

stream

Stream

The stream to write the exported image data to.

size

Size

The dimensions of the exported image.

ExportToImage(string, Size)

Exports the sparkline to an image file using PNG format with the specified size.

Declaration

cs-api-definition
public void ExportToImage(string filePath, Size size)

Parameters

filePath

string

The path where the exported image file will be saved.

size

Size

The dimensions of the exported image.

ExportToImage(string, Size, ImageFormat)

Exports the sparkline to an image file using the specified format and size.

Declaration

cs-api-definition
public void ExportToImage(string filePath, Size size, ImageFormat imageFormat)

Parameters

filePath

string

The path where the exported image file will be saved.

size

Size

The dimensions of the exported image.

imageFormat

ImageFormat

The image format to use for the exported file.

GetSettingsDialog(RadPrintDocument)

Gets the settings dialog for configuring print options for the sparkline.

Declaration

cs-api-definition
public Form GetSettingsDialog(RadPrintDocument document)

Parameters

document

RadPrintDocument

The RadPrintDocument associated with the print operation.

Returns

Form

A Form containing the print settings dialog.

Implements IPrintable.GetSettingsDialog(RadPrintDocument)

OnLoad(Size)

Performs initialization when the control is loaded with the specified desired size.

Declaration

cs-api-definition
protected override void OnLoad(Size desiredSize)

Parameters

desiredSize

Size

The desired size for the control.

Overrides RadControl.OnLoad(Size)

OnThemeChanged()

Called when the control's theme is changed, ensuring the sparkline area is properly updated to reflect theme modifications.

Declaration

cs-api-definition
protected override void OnThemeChanged()

Overrides RadControl.OnThemeChanged()

Print()

Prints the sparkline directly to the default printer without showing any dialog.

Declaration

cs-api-definition
public virtual void Print()

Print(bool)

Prints the sparkline to the default printer, optionally showing printer settings dialog first.

Declaration

cs-api-definition
public virtual void Print(bool showPrinterSettings)

Parameters

showPrinterSettings

bool

true to show the printer settings dialog before printing; false to print directly.

Print(bool, RadPrintDocument)

Prints the sparkline using the specified print document, optionally showing printer settings dialog first.

Declaration

cs-api-definition
public virtual void Print(bool showPrinterSettings, RadPrintDocument document)

Parameters

showPrinterSettings

bool

true to show the printer settings dialog before printing; false to print directly.

document

RadPrintDocument

The RadPrintDocument instance to use for controlling the print process.

PrintPage(int, RadPrintDocument, PrintPageEventArgs)

Prints the specified page of the sparkline to the print document.

Declaration

cs-api-definition
public bool PrintPage(int pageNumber, RadPrintDocument sender, PrintPageEventArgs args)

Parameters

pageNumber

int

The page number to print (always 1 for sparklines).

sender

RadPrintDocument

The RadPrintDocument that initiated the print operation.

args

PrintPageEventArgs

A PrintPageEventArgs that contains the event data and graphics context for printing.

Returns

bool

false to indicate that there are no more pages to print; otherwise, true.

Implements IPrintable.PrintPage(int, RadPrintDocument, PrintPageEventArgs)

PrintPreview()

Shows a print preview dialog for the sparkline with default print settings.

Declaration

cs-api-definition
public virtual void PrintPreview()

PrintPreview(RadPrintDocument)

Shows a print preview dialog for the sparkline using the specified print document.

Declaration

cs-api-definition
public virtual void PrintPreview(RadPrintDocument document)

Parameters

document

RadPrintDocument

The RadPrintDocument instance to use for controlling the print preview.

Refresh()

Forces a complete refresh of the sparkline control, including layout recalculation and visual updates.

Declaration

cs-api-definition
public override void Refresh()

Overrides RadControl.Refresh()

ResetBackColorThemeOverrides()

Resets theme value overrides for the background color property.

Declaration

cs-api-definition
protected override void ResetBackColorThemeOverrides()

Overrides RadControl.ResetBackColorThemeOverrides()

ResetForeColorThemeOverrides()

Resets theme value overrides for the foreground color property.

Declaration

cs-api-definition
protected override void ResetForeColorThemeOverrides()

Overrides RadControl.ResetForeColorThemeOverrides()

ResumeRefresh()

Resumes refresh operations for the sparkline after they have been suspended.

Declaration

cs-api-definition
public void ResumeRefresh()

ScaleControl(SizeF, BoundsSpecified)

Scales the control by the specified factor and adjusts the sparkline view margins accordingly.

Declaration

cs-api-definition
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)

Parameters

factor

SizeF

The scaling factor to apply to the control.

specified

BoundsSpecified

A bitwise combination of the BoundsSpecified values specifying which bounds to scale.

Overrides RadControl.ScaleControl(SizeF, BoundsSpecified)

SetBackColorThemeOverrides()

Sets theme value overrides for the background color property.

Declaration

cs-api-definition
protected override void SetBackColorThemeOverrides()

Overrides RadControl.SetBackColorThemeOverrides()

SetForeColorThemeOverrides()

Sets theme value overrides for the foreground color property.

Declaration

cs-api-definition
protected override void SetForeColorThemeOverrides()

Overrides RadControl.SetForeColorThemeOverrides()

SuspendRefresh()

Suspends refresh operations for the sparkline to improve performance during multiple property changes.

Declaration

cs-api-definition
public void SuspendRefresh()

Events

CreateRenderer

Occurs when the sparkline area requires a custom renderer for the first time, allowing users to provide their own rendering implementation.

Declaration

cs-api-definition
public event SparklineCreateRendererEventHandler CreateRenderer

Event Value

SparklineCreateRendererEventHandler

PaintSparkFill

Occurs when a sparkline fill area is about to be painted, allowing customization of the brush used for filling regions.

Declaration

cs-api-definition
public event PaintSparkFillEventHandler PaintSparkFill

Event Value

PaintSparkFillEventHandler

PaintSparkStroke

Occurs when a sparkline stroke is about to be painted, allowing customization of the pen used for drawing lines and borders.

Declaration

cs-api-definition
public event PaintSparkStrokeEventHandler PaintSparkStroke

Event Value

PaintSparkStrokeEventHandler