Class RadChartView
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.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.ChartView.dll
Syntax
[TelerikToolboxCategory("Data Controls")]
public class RadChartView : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider, IRangeSelectorControl, IPrintable
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
public ChartAnnotationCollection Annotations { get; }
Property Value
ChartAnnotationCollection
|
Area
Gets the currently active ChartArea that defines the plotting region and coordinate system for data visualization.
Declaration
public ChartArea Area { get; }
Property Value
ChartArea
|
AreaDesign
This property is not relevant for this class.
Declaration
public ChartArea AreaDesign { get; set; }
Property Value
ChartArea
|
AreaType
Gets or sets the chart area type, which determines the coordinate system and layout for data visualization (Cartesian, Pie, or Polar).
Declaration
public ChartAreaType AreaType { get; set; }
Property Value
ChartAreaType
|
AutoSize
This property is not relevant for this class.
Declaration
public override bool AutoSize { get; set; }
Property Value
System.Boolean
|
Overrides
Axes
Collection of the Axes
Declaration
public ChartAxisCollection Axes { get; }
Property Value
ChartAxisCollection
|
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
RadChartElement
|
Controllers
Collection of the Controllers
Declaration
public ChartViewControllerCollection Controllers { get; }
Property Value
ChartViewControllerCollection
|
DataMember
Gets or sets the name of the list or table in the data source for which the ChartSeries is bound.
Declaration
public string DataMember { get; set; }
Property Value
System.String
|
DataSource
Gets or sets the data source of the ChartSeries.
Declaration
public object DataSource { get; set; }
Property Value
System.Object
|
DefaultSize
Gets the default size of the chart view control.
Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size
|
DrillNavigationMode
LegendItemsLayout
Declaration
public LegendItemsLayout LegendItemsLayout { get; set; }
Property Value
LegendItemsLayout
|
LegendItemsOrientation
Gets or sets the orientation of the legend items. The possible values are System.Windows.Forms.Orientation.Horizontal and System.Windows.Forms.Orientation.Vertical.
Declaration
public Orientation LegendItemsOrientation { get; set; }
Property Value
System.Windows.Forms.Orientation
|
LegendPosition
Determines the position of the legend element.
Declaration
public LegendPosition LegendPosition { get; set; }
Property Value
LegendPosition
|
LegendTitle
Gets or sets the legend title.
Declaration
public string LegendTitle { get; set; }
Property Value
System.String
|
SelectionMode
Gets or sets the selection mode for data points, determining whether no selection, single, or multiple data points can be selected.
Declaration
public ChartSelectionMode SelectionMode { get; set; }
Property Value
ChartSelectionMode
|
Series
Collection of the ChartSeries
Declaration
public ChartSeriesCollection Series { get; }
Property Value
ChartSeriesCollection
|
ShowDrillNavigation
ShowGrid
Gets or sets a value indicating whether chart grid should be shown.
Declaration
public bool ShowGrid { get; set; }
Property Value
System.Boolean
|
ShowItemToolTips
Gets or sets a value indicating whether ToolTips are shown for the RadItem objects contained in the RadControl.
Declaration
public override bool ShowItemToolTips { get; set; }
Property Value
System.Boolean
|
Overrides
ShowLegend
Gets or sets a value indicating whether legend is shown.
Declaration
public bool ShowLegend { get; set; }
Property Value
System.Boolean
|
ShowPanZoom
Gets or sets a value indicating whether pan and zoom functionality is enabled for interactive chart navigation.
Declaration
public bool ShowPanZoom { get; set; }
Property Value
System.Boolean
|
ShowSmartLabels
Gets or sets a value indicating whether smart labels functionality is enabled to prevent label overlapping and improve readability.
Declaration
public bool ShowSmartLabels { get; set; }
Property Value
System.Boolean
|
ShowStillIndicators
Gets or sets a value indicating whether still indicators are displayed to provide visual feedback during chart interactions.
Declaration
public bool ShowStillIndicators { get; set; }
Property Value
System.Boolean
|
ShowTitle
Gets or sets a value indicating whether chart title is shown.
Declaration
public bool ShowTitle { get; set; }
Property Value
System.Boolean
|
ShowToolTip
Gets or sets a value indicating whether tooltips are displayed when hovering over chart elements.
Declaration
public bool ShowToolTip { get; set; }
Property Value
System.Boolean
|
ShowTrackBall
Gets or sets a value indicating whether the track ball functionality is enabled for data point tracking and highlighting.
Declaration
public bool ShowTrackBall { get; set; }
Property Value
System.Boolean
|
Text
This property is not relevant for this class.
Declaration
public override string Text { get; set; }
Property Value
System.String
|
Overrides
Title
Gets or sets the chart title.
Declaration
public string Title { get; set; }
Property Value
System.String
|
UseDataSource
Automatically setup DataSource of ChartSeries on attaching using this DataSource only when DataSource property of ChartSeries is null.
Declaration
public bool UseDataSource { get; set; }
Property Value
System.Boolean
|
View
Gets the primary ChartView that contains the chart area, series, axes, and data visualization components.
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
|
Methods
BeginPrint(RadPrintDocument, PrintEventArgs)
Declaration
public int BeginPrint(RadPrintDocument sender, PrintEventArgs args)
Parameters
RadPrintDocument
sender
|
System.Drawing.Printing.PrintEventArgs
args
|
Returns
System.Int32
|
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
RadChartElement
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
RadElement
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
System.IDisposable
An System.IDisposable object that when disposed will resume chart refresh operations. |
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean
disposing
|
Overrides
DrillDown(DataPoint)
Initiates a drill-down operation to navigate to a more detailed chart 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
|
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
|
EndPrint(RadPrintDocument, PrintEventArgs)
Declaration
public bool EndPrint(RadPrintDocument sender, PrintEventArgs args)
Parameters
RadPrintDocument
sender
|
System.Drawing.Printing.PrintEventArgs
args
|
Returns
System.Boolean
|
Implements
ExportToImage(Stream, Size)
Exports the chart view into the specified stream using the PNG image format.
Declaration
public void ExportToImage(Stream stream, Size size)
Parameters
System.IO.Stream
stream
The stream to which to write the chart image |
System.Drawing.Size
size
The size of the exported image. |
ExportToImage(Stream, Size, ImageFormat)
Exports the chart view into the specified stream.
Declaration
public void ExportToImage(Stream stream, Size size, ImageFormat imageFormat)
Parameters
System.IO.Stream
stream
The stream to which to write the chart image |
System.Drawing.Size
size
The size of the exported image. |
System.Drawing.Imaging.ImageFormat
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.
Declaration
public void ExportToImage(string filePath, Size size)
Parameters
System.String
filePath
The file to which the chart will be exported. |
System.Drawing.Size
size
The size of the exported file. |
ExportToImage(String, Size, ImageFormat)
Exports the chart view into the specified file.
Declaration
public void ExportToImage(string filePath, Size size, ImageFormat imageFormat)
Parameters
System.String
filePath
The file to which the chart will be exported. |
System.Drawing.Size
size
The size of the exported file. |
System.Drawing.Imaging.ImageFormat
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. |
Type Parameters
T
The type of chart area to retrieve, must inherit from ChartArea. |
GetSeries<T>(Int32)
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
System.Int32
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. |
Type Parameters
T
The type of chart series to retrieve, must inherit from ChartSeries. |
GetSettingsDialog(RadPrintDocument)
Declaration
public Form GetSettingsDialog(RadPrintDocument document)
Parameters
RadPrintDocument
document
|
Returns
System.Windows.Forms.Form
|
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
RadElement
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
System.Drawing.Size
desiredSize
The desired size for the control during loading. |
Overrides
OnMouseDown(MouseEventArgs)
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Overrides
OnMouseUp(MouseEventArgs)
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
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.
Declaration
public void Pan(double x, double y)
Parameters
System.Double
x
The horizontal offset value for the pan operation. |
System.Double
y
The vertical offset value for the pan operation. |
Print()
Print(Boolean)
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
System.Boolean
showPrinterSettings
Indicates whether printer settings dialog should be shown. |
Print(Boolean, 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
System.Boolean
showPrinterSettings
Indicates whether printer settings dialog should be shown. |
RadPrintDocument
document
As instance of RadPrintDocument used to control the print process. |
PrintPage(Int32, RadPrintDocument, PrintPageEventArgs)
Declaration
public bool PrintPage(int pageNumber, RadPrintDocument sender, PrintPageEventArgs args)
Parameters
System.Int32
pageNumber
|
RadPrintDocument
sender
|
System.Drawing.Printing.PrintPageEventArgs
args
|
Returns
System.Boolean
|
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
RadPrintDocument
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
System.Drawing.SizeF
factor
|
System.Windows.Forms.BoundsSpecified
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.
Declaration
public void Zoom(double horizontalScaleFactor, double verticalScaleFactor)
Parameters
System.Double
horizontalScaleFactor
The horizontal scaling factor for zoom operation. |
System.Double
verticalScaleFactor
The vertical scaling factor for zoom operation. |
Events
ContextMenuOpening
Occurs when context menu is opening.
Declaration
public event ChartViewContextMenuOpeningEventHandler ContextMenuOpening
Event Type
ChartViewContextMenuOpeningEventHandler
|
CreatePoint
Occurs when a new DataPoint is created.
Declaration
public event ChartViewCreatePointEventHandler CreatePoint
Event Type
ChartViewCreatePointEventHandler
|
CreatePointElement
Occurs when a new DataPointElement is created.
Declaration
public event ChartViewCreatePointElementEventHandler CreatePointElement
Event Type
ChartViewCreatePointElementEventHandler
|
CreateRenderer
Fires when the area requies a renderer for the first time.
Declaration
public event ChartViewCreateRendererEventHandler CreateRenderer
Event Type
ChartViewCreateRendererEventHandler
|
Drill
Fires when started Drill operation.
Declaration
public event DrillEventHandler Drill
Event Type
DrillEventHandler
|
LabelFormatting
Fires when the content of a point label needs to be formatted for display.
Declaration
public event ChartViewLabelFormattingEventHandler LabelFormatting
Event Type
ChartViewLabelFormattingEventHandler
|
SelectedPointChanged
Occurs when the value of the IsSelected property of a DataPoint is changed.
Declaration
public event ChartViewSelectedChangedEventHandler SelectedPointChanged
Event Type
ChartViewSelectedChangedEventHandler
|
SelectedPointChanging
Occurs when the value of the IsSelected property of a DataPoint is changing.
Declaration
public event ChartViewSelectedChangingEventHandler SelectedPointChanging
Event Type
ChartViewSelectedChangingEventHandler
|