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
Called when the printing begins.
public int BeginPrint(RadPrintDocument sender, PrintEventArgs args)
The that has initiated the printing.
The event args.
Returns:The number of pages.
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.
Called when the printing ends.
public bool EndPrint(RadPrintDocument sender, PrintEventArgs args)
The that has initiated the printing.
The event args.
Returns:[false] if cancel
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.
Gets a print settings dialog that is specific for the printable object.
public Form GetSettingsDialog(RadPrintDocument document)
The that has initiated the printing.
The dialog.
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:
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.
Prints the page with the specified number.
public bool PrintPage(int pageNumber, RadPrintDocument sender, PrintPageEventArgs args)
The number of the current page.
senderRadPrintDocumentThe that has initiated the printing.
The event args.
Returns:[true] if there are more pages, [false] otherwise
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:
protected override void ResetBackColorThemeOverrides()
Overrides:
protected override void ResetForeColorThemeOverrides()
Overrides:
Resumes chart refresh operations that were previously suspended, allowing the chart to update and redraw.
public void ResumeRefresh()
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
Overrides:
protected override void SetBackColorThemeOverrides()
Overrides:
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