New to Telerik UI for WinFormsStart a free 30-day trial

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:

C#
[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

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

C#
public RadSparkline()

Properties

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

C#
[Browsable(true)]
public SparkAnnotationCollection Annotations { get; }

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

C#
[Browsable(false)]
public SparkArea Area { get; }

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

C#
[Browsable(true)]
public SparkAxisCollection Axes { get; }

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

C#
[Browsable(true)]
public AxisDrawMode AxisDrawMode { get; set; }

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

C#
[Browsable(false)]
public SparkViewControllerCollection Controllers { get; }

Gets the default size of the RadSparkline control.

C#
protected override Size DefaultSize { get; }

Overrides: Control.DefaultSize

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

C#
[Browsable(true)]
public EmptyPointBehavior EmptyPointBehavior { get; set; }

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

C#
[Browsable(true)]
public SparkSeries Series { get; set; }

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

C#
[Browsable(true)]
public bool ShowAxis { get; set; }

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

C#
[Browsable(true)]
public bool ShowFirstPointIndicator { get; set; }

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

C#
[Browsable(true)]
public bool ShowHighPointIndicator { get; set; }

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

C#
[Browsable(true)]
public bool ShowLastPointIndicator { get; set; }

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

C#
[Browsable(true)]
public bool ShowLowPointIndicator { get; set; }

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

C#
[Browsable(true)]
public bool ShowNegativePointIndicators { get; set; }

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

C#
[Browsable(true)]
public bool ShowToolTip { get; set; }

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

C#
public RadSparklineElement SparklineElement { get; }

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

C#
public SparkView View { get; }

Methods

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

C#
public int BeginPrint(RadPrintDocument sender, PrintEventArgs args)
Parameters:senderRadPrintDocument

The RadPrintDocument that initiated the print operation.

argsPrintEventArgs

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)

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

C#
protected override void CreateChildItems(RadElement parent)
Parameters:parentRadElement

The parent element that will contain the child elements.

Overrides: RadControl.CreateChildItems(RadElement)

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

C#
protected virtual RadSparklineElement CreateSparklineElement()
Returns:

RadSparklineElement

A new RadSparklineElement instance.

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

C#
public IDisposable DeferRefresh()
Returns:

IDisposable

An IDisposable object that defers refresh operations.

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

C#
protected override void Dispose(bool disposing)
Parameters:disposingbool

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

Overrides: RadControl.Dispose(bool)

Ends the print process for the sparkline.

C#
public bool EndPrint(RadPrintDocument sender, PrintEventArgs args)
Parameters:senderRadPrintDocument

The RadPrintDocument that initiated the print operation.

argsPrintEventArgs

A PrintEventArgs that contains the event data.

Returns:

bool

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

Implements: IPrintable.EndPrint(RadPrintDocument, PrintEventArgs)

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

C#
public void ExportToImage(Stream stream, Size size)
Parameters:streamStream

The stream to write the exported image data to.

sizeSize

The dimensions of the exported image.

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

C#
public void ExportToImage(string filePath, Size size, ImageFormat imageFormat)
Parameters:filePathstring

The path where the exported image file will be saved.

sizeSize

The dimensions of the exported image.

imageFormatImageFormat

The image format to use for the exported file.

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

C#
public void ExportToImage(string filePath, Size size)
Parameters:filePathstring

The path where the exported image file will be saved.

sizeSize

The dimensions of the exported image.

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

C#
public Form GetSettingsDialog(RadPrintDocument document)
Parameters:documentRadPrintDocument

The RadPrintDocument associated with the print operation.

Returns:

Form

A Form containing the print settings dialog.

Implements: IPrintable.GetSettingsDialog(RadPrintDocument)

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

C#
protected override void OnLoad(Size desiredSize)
Parameters:desiredSizeSize

The desired size for the control.

Overrides: RadControl.OnLoad(Size)

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

C#
protected override void OnThemeChanged()

Overrides: RadControl.OnThemeChanged()

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

C#
public virtual void Print()

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

C#
public virtual void Print(bool showPrinterSettings, RadPrintDocument document)
Parameters:showPrinterSettingsbool

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

documentRadPrintDocument

The RadPrintDocument instance to use for controlling the print process.

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

C#
public virtual void Print(bool showPrinterSettings)
Parameters:showPrinterSettingsbool

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

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

C#
public bool PrintPage(int pageNumber, RadPrintDocument sender, PrintPageEventArgs args)
Parameters:pageNumberint

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

senderRadPrintDocument

The RadPrintDocument that initiated the print operation.

argsPrintPageEventArgs

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)

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

C#
public virtual void PrintPreview()

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

C#
public virtual void PrintPreview(RadPrintDocument document)
Parameters:documentRadPrintDocument

The RadPrintDocument instance to use for controlling the print preview.

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

C#
public override void Refresh()

Overrides: RadControl.Refresh()

Resets theme value overrides for the background color property.

C#
protected override void ResetBackColorThemeOverrides()

Overrides: RadControl.ResetBackColorThemeOverrides()

Resets theme value overrides for the foreground color property.

C#
protected override void ResetForeColorThemeOverrides()

Overrides: RadControl.ResetForeColorThemeOverrides()

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

C#
public void ResumeRefresh()

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

C#
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
Parameters:factorSizeF

The scaling factor to apply to the control.

specifiedBoundsSpecified

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

Overrides: RadControl.ScaleControl(SizeF, BoundsSpecified)

Sets theme value overrides for the background color property.

C#
protected override void SetBackColorThemeOverrides()

Overrides: RadControl.SetBackColorThemeOverrides()

Sets theme value overrides for the foreground color property.

C#
protected override void SetForeColorThemeOverrides()

Overrides: RadControl.SetForeColorThemeOverrides()

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

C#
public void SuspendRefresh()

Events

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

C#
public event SparklineCreateRendererEventHandler CreateRenderer

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

C#
public event PaintSparkFillEventHandler PaintSparkFill

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

C#
public event PaintSparkStrokeEventHandler PaintSparkStroke