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.
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
Initializes a new instance of the RadChartView class with default settings and control styles.
public RadChartView()
Properties
Collection of the ChartAnnotations
[Browsable(true)]
public ChartAnnotationCollection Annotations { get; }
Gets the currently active ChartArea that defines the plotting region and coordinate system for data visualization.
[Browsable(false)]
public ChartArea Area { get; }
Gets or sets the chart area type, which determines the coordinate system and layout for data visualization (Cartesian, Pie, or Polar).
[Browsable(true)]
public ChartAreaType AreaType { get; set; }
Collection of the Axes
[Browsable(true)]
public ChartAxisCollection Axes { get; }
Gets the RadChartElement that represents the main visual component containing the chart display, legend, and title elements.
public RadChartElement ChartElement { get; }
Collection of the Controllers
[Browsable(false)]
public ChartViewControllerCollection Controllers { get; }
Gets or sets the name of the list or table in the data source for which the ChartSeries is bound.
[Browsable(false)]
public string DataMember { get; set; }
Gets or sets the data source of the ChartSeries.
[Browsable(true)]
public object DataSource { get; set; }
Gets the default size of the chart view control.
protected override Size DefaultSize { get; }
Overrides:
Gets or sets the navigation mode for drill-down functionality, determining how drill navigation is presented to users.
[Browsable(false)]
public DrillNavigationMode DrillNavigationMode { get; set; }
Gets or sets the orientation of the legend items. The possible values are Horizontal and Vertical.
public Orientation LegendItemsOrientation { get; set; }
Determines the position of the legend element.
public LegendPosition LegendPosition { get; set; }
Gets or sets the legend title.
public string LegendTitle { get; set; }
Gets or sets the selection mode for data points, determining whether no selection, single, or multiple data points can be selected.
[Browsable(true)]
public ChartSelectionMode SelectionMode { get; set; }
Collection of the ChartSeries
[Browsable(true)]
public ChartSeriesCollection Series { get; }
Gets or sets a value indicating whether DrillNavigation is displayed.
public bool ShowDrillNavigation { get; set; }
Gets or sets a value indicating whether chart grid should be shown.
public bool ShowGrid { get; set; }
Gets or sets a value indicating whether ToolTips are shown for the RadItem objects contained in the RadControl.
[Browsable(false)]
public override bool ShowItemToolTips { get; set; }
Overrides:
Gets or sets a value indicating whether legend is shown.
public bool ShowLegend { get; set; }
Gets or sets a value indicating whether pan and zoom functionality is enabled for interactive chart navigation.
[Browsable(false)]
public bool ShowPanZoom { get; set; }
Gets or sets a value indicating whether smart labels functionality is enabled to prevent label overlapping and improve readability.
[Browsable(false)]
public bool ShowSmartLabels { get; set; }
Gets or sets a value indicating whether still indicators are displayed to provide visual feedback during chart interactions.
[Browsable(false)]
public bool ShowStillIndicators { get; set; }
Gets or sets a value indicating whether chart title is shown.
public bool ShowTitle { get; set; }
Gets or sets a value indicating whether tooltips are displayed when hovering over chart elements.
[Browsable(true)]
public bool ShowToolTip { get; set; }
Gets or sets a value indicating whether the track ball functionality is enabled for data point tracking and highlighting.
[Browsable(true)]
public bool ShowTrackBall { get; set; }
Automatically setup DataSource of ChartSeries on attaching using this DataSource only when DataSource property of ChartSeries is null.
[Browsable(true)]
public bool UseDataSource { get; set; }
Gets the primary ChartView that contains the chart area, series, axes, and data visualization components.
public ChartView View { get; }
Gets the collection of ChartView objects available for drill-down navigation and multi-view scenarios.
[Browsable(false)]
public ChartViewCollection Views { get; }
Methods
Reports the single page produced when printing the chart.
public int BeginPrint(RadPrintDocument sender, PrintEventArgs args)
The print document initiating the operation.
argsPrintEventArgsThe print-start event data.
Returns:The page count, which is one.
Implements:
Creates and returns a new instance of the chart element that serves as the main visual component of the chart view.
protected virtual RadChartElement CreateChartElement()
A RadChartElement instance that represents the chart's visual content.
Creates and adds the chart element as a child item to the specified parent element.
protected override void CreateChildItems(RadElement parent)
The parent RadElement to which the chart element will be added.
Overrides:
Defers chart refresh operations and returns a disposable object that resumes refresh when disposed.
public IDisposable DeferRefresh()
An IDisposable object that when disposed will resume chart refresh operations.
Initiates a drill-down operation to navigate to a more detailed chart view based on the specified data point.
Navigates to the top-level chart view, returning to the root of the drill navigation hierarchy.
public virtual bool DrillToTop()
true if the navigation to the top-level view was successful; otherwise, false.
Initiates a drill-up operation to navigate back to the previous chart view level.
public virtual bool DrillUp()
true if the drill-up operation was successful; otherwise, false.
Completes printing without canceling the operation.
public bool EndPrint(RadPrintDocument sender, PrintEventArgs args)
The print document initiating the operation.
argsPrintEventArgsThe print-end event data.
Returns:true to indicate that printing was not canceled.
Implements:
Exports the chart view into the specified stream.
public void ExportToImage(Stream stream, Size size, ImageFormat imageFormat)
The stream to which to write the chart image
sizeSizeThe size of the exported image.
imageFormatImageFormatThe image format in which to export the chart.
Exports the chart view into the specified file.
public void ExportToImage(string filePath, Size size, ImageFormat imageFormat)
The file to which the chart will be exported.
sizeSizeThe size of the exported file.
imageFormatImageFormatThe image format in which to export the chart.
Returns a chart area of the specified type, providing strongly-typed access to area-specific properties and methods.
public T GetArea<T>() where T : ChartArea
T
A chart area of the specified type, or null if the current area is not of the requested type.
Returns a chart series of the specified type at the given index, providing strongly-typed access to series-specific properties and methods.
public T GetSeries<T>(int index) where T : ChartSeries
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.
Creates the chart's themed print settings dialog with its first page removed.
public Form GetSettingsDialog(RadPrintDocument document)
The print document being configured.
Returns:The print settings dialog for the chart.
Implements:
Gets a view element for range selector functionality, providing a specialized view of the chart for range selection operations.
public RadElement GetViewElement()
A RadElement that represents the range selector view element.
Implements:
Handles the load event and configures gesture support and chart element behavior for the chart view.
protected override void OnLoad(Size desiredSize)
The desired size for the control during loading.
Overrides:
Records whether the mouse press began inside the chart wrapper so a later release outside it can be forwarded.
protected override void OnMouseDown(MouseEventArgs e)
The mouse event data.
Overrides:
Forwards a release that ends outside the wrapper when the press began inside it, then clears the stored state.
protected override void OnMouseUp(MouseEventArgs e)
The mouse event data.
Overrides:
Called when the theme is changed.
protected override void OnThemeChanged()
Overrides:
Directly prints the RadChartView to the default printer.
public virtual void Print()
Directly prints the RadChartView to the default printer or shows printer settings and then prints the RadChartView.
public virtual void Print(bool showPrinterSettings, RadPrintDocument document)
Indicates whether printer settings dialog should be shown.
documentRadPrintDocumentAs instance of RadPrintDocument used to control the print process.
Directly prints the RadChartView to the default printer or shows printer settings and then prints the RadChartView.
public virtual void Print(bool showPrinterSettings)
Indicates whether printer settings dialog should be shown.
Exports the chart as a PNG image, draws it within the printable page area, and reports that no further pages remain.
public bool PrintPage(int pageNumber, RadPrintDocument sender, PrintPageEventArgs args)
The number of the page requested by the print document.
senderRadPrintDocumentThe print document initiating the operation.
argsPrintPageEventArgsThe page event data containing the graphics surface.
Returns:false because the chart is printed on a single page.
Implements:
Shows a RadPrintPreviewDialog for editing print settings.
public virtual void PrintPreview()
Shows a RadPrintPreviewDialog for editing print settings.
public virtual void PrintPreview(RadPrintDocument document)
As instance of RadPrintDocument used to control the print process.
Refreshes the chart view by performing a layout update and redrawing the chart content.
public override void Refresh()
Overrides:
Removes the chart element's background-color theme override.
protected override void ResetBackColorThemeOverrides()
Overrides:
Removes the chart element's foreground-color theme override.
protected override void ResetForeColorThemeOverrides()
Overrides:
Resumes chart refresh operations that were previously suspended, allowing the chart to update and redraw.
public void ResumeRefresh()
Scales the chart view margins with the control before applying the base control scaling.
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
The width and height scaling factors.
specifiedBoundsSpecifiedThe bounds dimensions being scaled.
Overrides:
Applies the control's background color as a theme override on the chart element.
protected override void SetBackColorThemeOverrides()
Overrides:
Applies the control's foreground color as a theme override on the chart element.
protected override void SetForeColorThemeOverrides()
Overrides:
Suspends chart refresh operations to improve performance during multiple chart modifications.
public void SuspendRefresh()
Zooms the chart by applying the specified horizontal and vertical scale factors to the chart area.
Events
Occurs when context menu is opening.
public event ChartViewContextMenuOpeningEventHandler ContextMenuOpening
Occurs when a new DataPoint is created.
public event ChartViewCreatePointEventHandler CreatePoint
Occurs when a new DataPointElement is created.
public event ChartViewCreatePointElementEventHandler CreatePointElement
Fires when the area requies a renderer for the first time.
public event ChartViewCreateRendererEventHandler CreateRenderer
Fires when started Drill operation.
public event DrillEventHandler Drill
Fires when the content of a point label needs to be formatted for display.
public event ChartViewLabelFormattingEventHandler LabelFormatting
Occurs when the value of the IsSelected property of a DataPoint is changed.
public event ChartViewSelectedChangedEventHandler SelectedPointChanged
Occurs when the value of the IsSelected property of a DataPoint is changing.
public event ChartViewSelectedChangingEventHandler SelectedPointChanging