Skip to main content

ChartControl.CustomDrawSeries Event

Occurs before a series is drawn when the chart’s contents are being drawn.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v24.1.dll

NuGet Package: DevExpress.Wpf.Charts

Declaration

public event CustomDrawSeriesEventHandler CustomDrawSeries

Event Data

The CustomDrawSeries event's data class is CustomDrawSeriesEventArgs. The following properties provide information specific to this event:

Property Description
DrawOptions Gets the settings for custom drawing series of different view types.
Handled Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. Inherited from RoutedEventArgs.
LegendText Gets or sets the Legend’s text for the series whose points are currently being painted.
OriginalSource Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
RoutedEvent Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
Series Gets the series whose points are currently being painted.
Source Gets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.

The event data class exposes the following methods:

Method Description
InvokeEventHandler(Delegate, Object) When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation. Inherited from RoutedEventArgs.
OnSetSource(Object) When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes. Inherited from RoutedEventArgs.

Remarks

The CustomDrawSeries event is raised before every series is painted. The event parameter’s CustomDrawSeriesEventArgs.Series property provides the series whose specific series options are to be determined. And the CustomDrawSeriesEventArgs.DrawOptions property provides the drawing options specific to each series.

The CustomDrawSeries and ChartControl.CustomDrawSeriesPoint events are always raised in the following order.

  • The CustomDrawSeries event for the first series in the chart’s Diagram.Series collection. The first series in the series collection is a Series for which the SeriesCollection.IndexOf method returns 0.
  • The CustomDrawSeriesPoint event for all the series points of the first series.
  • The CustomDrawSeries event for the second series in the chart’s Diagram.Series collection.
  • The CustomDrawSeriesPoint event for all the series points of the second series.
  • …and so on, for all the other series and their points.
See Also