Back to Devexpress

ChartControl.CustomDrawSeries Event

wpf-devexpress-dot-xpf-dot-charts-dot-chartcontrol-a24fad3e.md

latest6.0 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public event CustomDrawSeriesEventHandler CustomDrawSeries
vb
Public Event CustomDrawSeries As CustomDrawSeriesEventHandler

Event Data

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

PropertyDescription
DrawOptionsGets the settings for custom drawing series of different view types.
HandledGets 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.
LegendTextGets or sets the Legend’s text for the series whose points are currently being painted.
OriginalSourceGets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
RoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
SeriesGets the series whose points are currently being painted.
SourceGets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.

The event data class exposes the following methods:

MethodDescription
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

CustomDrawSeriesPoint

ChartControl Class

ChartControl Members

DevExpress.Xpf.Charts Namespace