ClassRadChartView
Represents a comprehensive chart control that provides data visualization capabilities including various chart types, series, axes, legends, and interactive features such as zooming, panning, and drill-down navigation.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.ChartView.dll
Syntax:
[TelerikToolboxCategory("Data Controls")]
[ComplexBindingProperties("DataSource", "DataMember")]
public class RadChartView : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider, IRangeSelectorControl, IPrintable
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadChartView
Implements:
Inherited Members
Constructors
RadChartView()
Initializes a new instance of the RadChartView class with default settings and control styles.
Declaration
public RadChartView()
Properties
Annotations
Collection of the ChartAnnotations
Declaration
[Browsable(true)]
public ChartAnnotationCollection Annotations { get; }
Property Value
Area
Gets the currently active ChartArea that defines the plotting region and coordinate system for data visualization.
Declaration
[Browsable(false)]
public ChartArea Area { get; }
Property Value
AreaType
Gets or sets the chart area type, which determines the coordinate system and layout for data visualization (Cartesian, Pie, or Polar).
Declaration
[Browsable(true)]
public ChartAreaType AreaType { get; set; }
Property Value
Axes
Collection of the Axes
Declaration
[Browsable(true)]
public ChartAxisCollection Axes { get; }
Property Value
ChartElement
Gets the RadChartElement that represents the main visual component containing the chart display, legend, and title elements.
Declaration
public RadChartElement ChartElement { get; }
Property Value
Controllers
Collection of the Controllers
Declaration
[Browsable(false)]
public ChartViewControllerCollection Controllers { get; }
Property Value
DataMember
Gets or sets the name of the list or table in the data source for which the ChartSeries is bound.
Declaration
[Browsable(false)]
public string DataMember { get; set; }
Property Value
DataSource
Gets or sets the data source of the ChartSeries.
Declaration
[Browsable(true)]
public object DataSource { get; set; }
Property Value
DefaultSize
Gets the default size of the chart view control.
Declaration
protected override Size DefaultSize { get; }
Property Value
Overrides
DrillNavigationMode
Gets or sets the navigation mode for drill-down functionality, determining how drill navigation is presented to users.
Declaration
[Browsable(false)]
public DrillNavigationMode DrillNavigationMode { get; set; }
Property Value
LegendItemsLayout
Declaration
public LegendItemsLayout LegendItemsLayout { get; set; }
Property Value
LegendItemsOrientation
Gets or sets the orientation of the legend items. The possible values are Horizontal and Vertical.
Declaration
public Orientation LegendItemsOrientation { get; set; }
Property Value
LegendPosition
Determines the position of the legend element.
Declaration
public LegendPosition LegendPosition { get; set; }
Property Value
LegendTitle
Gets or sets the legend title.
SelectionMode
Gets or sets the selection mode for data points, determining whether no selection, single, or multiple data points can be selected.
Declaration
[Browsable(true)]
public ChartSelectionMode SelectionMode { get; set; }
Property Value
Series
Collection of the ChartSeries
Declaration
[Browsable(true)]
public ChartSeriesCollection Series { get; }
Property Value
ShowDrillNavigation
Gets or sets a value indicating whether DrillNavigation is displayed.
ShowGrid
Gets or sets a value indicating whether chart grid should be shown.
ShowItemToolTips
Gets or sets a value indicating whether ToolTips are shown for the RadItem objects contained in the RadControl.
Declaration
[Browsable(false)]
public override bool ShowItemToolTips { get; set; }
Property Value
Overrides
ShowLegend
Gets or sets a value indicating whether legend is shown.
ShowPanZoom
Gets or sets a value indicating whether pan and zoom functionality is enabled for interactive chart navigation.
Declaration
[Browsable(false)]
public bool ShowPanZoom { get; set; }
Property Value
ShowSmartLabels
Gets or sets a value indicating whether smart labels functionality is enabled to prevent label overlapping and improve readability.
Declaration
[Browsable(false)]
public bool ShowSmartLabels { get; set; }
Property Value
ShowStillIndicators
Gets or sets a value indicating whether still indicators are displayed to provide visual feedback during chart interactions.
Declaration
[Browsable(false)]
public bool ShowStillIndicators { get; set; }
Property Value
ShowTitle
Gets or sets a value indicating whether chart title is shown.
ShowToolTip
Gets or sets a value indicating whether tooltips are displayed when hovering over chart elements.
Declaration
[Browsable(true)]
public bool ShowToolTip { get; set; }
Property Value
ShowTrackBall
Gets or sets a value indicating whether the track ball functionality is enabled for data point tracking and highlighting.
Declaration
[Browsable(true)]
public bool ShowTrackBall { get; set; }
Property Value
Title
Gets or sets the chart title.
UseDataSource
Automatically setup DataSource of ChartSeries on attaching using this DataSource only when DataSource property of ChartSeries is null.
Declaration
[Browsable(true)]
public bool UseDataSource { get; set; }
Property Value
View
Gets the primary ChartView that contains the chart area, series, axes, and data visualization components.
Methods
BeginPrint(RadPrintDocument, PrintEventArgs)
Called when the printing begins.
Declaration
public int BeginPrint(RadPrintDocument sender, PrintEventArgs args)
Parameters
sender
The that has initiated the printing.
args
The event args.
Returns
The number of pages.
Implements
CreateChartElement()
Creates and returns a new instance of the chart element that serves as the main visual component of the chart view.
Declaration
protected virtual RadChartElement CreateChartElement()
Returns
A RadChartElement instance that represents the chart's visual content.
CreateChildItems(RadElement)
Creates and adds the chart element as a child item to the specified parent element.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
parent
The parent RadElement to which the chart element will be added.
Overrides
DeferRefresh()
Defers chart refresh operations and returns a disposable object that resumes refresh when disposed.
Declaration
public IDisposable DeferRefresh()
Returns
An IDisposable object that when disposed will resume chart refresh operations.
Dispose(bool)
Declaration
protected override void Dispose(bool disposing)
Parameters
disposing
Overrides
DrillDown(DataPoint)
Initiates a drill-down operation to navigate to a more detailed chart view based on the specified data point.
DrillToTop()
Navigates to the top-level chart view, returning to the root of the drill navigation hierarchy.
Declaration
public virtual bool DrillToTop()
Returns
true if the navigation to the top-level view was successful; otherwise, false.
DrillUp()
Initiates a drill-up operation to navigate back to the previous chart view level.
Declaration
public virtual bool DrillUp()
Returns
true if the drill-up operation was successful; otherwise, false.
EndPrint(RadPrintDocument, PrintEventArgs)
Called when the printing ends.
Declaration
public bool EndPrint(RadPrintDocument sender, PrintEventArgs args)
Parameters
sender
The that has initiated the printing.
args
The event args.
Returns
[false] if cancel
Implements
ExportToImage(Stream, Size)
Exports the chart view into the specified stream using the PNG image format.
ExportToImage(Stream, Size, ImageFormat)
Exports the chart view into the specified stream.
Declaration
public void ExportToImage(Stream stream, Size size, ImageFormat imageFormat)
Parameters
stream
The stream to which to write the chart image
size
The size of the exported image.
imageFormat
The image format in which to export the chart.
ExportToImage(string, Size)
Exports the chart view into the specified file using the PNG image format.
ExportToImage(string, Size, ImageFormat)
Exports the chart view into the specified file.
Declaration
public void ExportToImage(string filePath, Size size, ImageFormat imageFormat)
Parameters
filePath
The file to which the chart will be exported.
size
The size of the exported file.
imageFormat
The image format in which to export the chart.
GetArea<T>()
Returns a chart area of the specified type, providing strongly-typed access to area-specific properties and methods.
Declaration
public T GetArea<T>() where T : ChartArea
Returns
T
A chart area of the specified type, or null if the current area is not of the requested type.
GetSeries<T>(int)
Returns a chart series of the specified type at the given index, providing strongly-typed access to series-specific properties and methods.
Declaration
public T GetSeries<T>(int index) where T : ChartSeries
Parameters
index
The zero-based index of the series in the series collection.
Returns
T
A chart series of the specified type at the given index, or null if the series at the index is not of the requested type.
GetSettingsDialog(RadPrintDocument)
Gets a print settings dialog that is specific for the printable object.
Declaration
public Form GetSettingsDialog(RadPrintDocument document)
Parameters
document
The that has initiated the printing.
Returns
The dialog.
Implements
GetViewElement()
Gets a view element for range selector functionality, providing a specialized view of the chart for range selection operations.
Declaration
public RadElement GetViewElement()
Returns
A RadElement that represents the range selector view element.
Implements
OnLoad(Size)
Handles the load event and configures gesture support and chart element behavior for the chart view.
Declaration
protected override void OnLoad(Size desiredSize)
Parameters
desiredSize
The desired size for the control during loading.
Overrides
OnMouseDown(MouseEventArgs)
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
e
Overrides
OnMouseUp(MouseEventArgs)
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
e
Overrides
OnThemeChanged()
Called when the theme is changed.
Declaration
protected override void OnThemeChanged()
Overrides
Pan(double, double)
Pans the chart view by moving the visible area by the specified horizontal and vertical offset values.
Print()
Directly prints the RadChartView to the default printer.
Declaration
public virtual void Print()
Print(bool)
Directly prints the RadChartView to the default printer or shows printer settings and then prints the RadChartView.
Declaration
public virtual void Print(bool showPrinterSettings)
Parameters
showPrinterSettings
Indicates whether printer settings dialog should be shown.
Print(bool, RadPrintDocument)
Directly prints the RadChartView to the default printer or shows printer settings and then prints the RadChartView.
Declaration
public virtual void Print(bool showPrinterSettings, RadPrintDocument document)
Parameters
showPrinterSettings
Indicates whether printer settings dialog should be shown.
document
As instance of RadPrintDocument used to control the print process.
PrintPage(int, RadPrintDocument, PrintPageEventArgs)
Prints the page with the specified number.
Declaration
public bool PrintPage(int pageNumber, RadPrintDocument sender, PrintPageEventArgs args)
Parameters
pageNumber
The number of the current page.
sender
The that has initiated the printing.
args
The event args.
Returns
[true] if there are more pages, [false] otherwise
Implements
PrintPreview()
Shows a RadPrintPreviewDialog for editing print settings.
Declaration
public virtual void PrintPreview()
PrintPreview(RadPrintDocument)
Shows a RadPrintPreviewDialog for editing print settings.
Declaration
public virtual void PrintPreview(RadPrintDocument document)
Parameters
document
As instance of RadPrintDocument used to control the print process.
Refresh()
Refreshes the chart view by performing a layout update and redrawing the chart content.
Declaration
public override void Refresh()
Overrides
ResetBackColorThemeOverrides()
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
ResumeRefresh()
Resumes chart refresh operations that were previously suspended, allowing the chart to update and redraw.
Declaration
public void ResumeRefresh()
ScaleControl(SizeF, BoundsSpecified)
Declaration
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
Parameters
factor
specified
Overrides
SetBackColorThemeOverrides()
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
Declaration
protected override void SetForeColorThemeOverrides()
Overrides
SuspendRefresh()
Suspends chart refresh operations to improve performance during multiple chart modifications.
Declaration
public void SuspendRefresh()
Zoom(double, double)
Zooms the chart by applying the specified horizontal and vertical scale factors to the chart area.
Events
ContextMenuOpening
Occurs when context menu is opening.
Declaration
public event ChartViewContextMenuOpeningEventHandler ContextMenuOpening
Event Value
CreatePoint
Occurs when a new DataPoint is created.
Declaration
public event ChartViewCreatePointEventHandler CreatePoint
Event Value
CreatePointElement
Occurs when a new DataPointElement is created.
Declaration
public event ChartViewCreatePointElementEventHandler CreatePointElement
Event Value
CreateRenderer
Fires when the area requies a renderer for the first time.
Declaration
public event ChartViewCreateRendererEventHandler CreateRenderer
Event Value
Drill
Fires when started Drill operation.
LabelFormatting
Fires when the content of a point label needs to be formatted for display.
Declaration
public event ChartViewLabelFormattingEventHandler LabelFormatting
Event Value
SelectedPointChanged
Occurs when the value of the IsSelected property of a DataPoint is changed.
Declaration
public event ChartViewSelectedChangedEventHandler SelectedPointChanged
Event Value
SelectedPointChanging
Occurs when the value of the IsSelected property of a DataPoint is changing.
Declaration
public event ChartViewSelectedChangingEventHandler SelectedPointChanging
Event Value