# Custom Brushes for Plotting Data

## Content



This section provides information on using the [DrawDataSeriesEventArgs](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.DrawDataSeriesEventArgs.html) for creating a custom brush during plotting.

Whenever a data series is plotted, the **DrawDataSeries** event of [C1Chart](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.C1Chart.html) fires. This event allows defining the selection of a custom brush during plotting. The event sender object is the C1Chart.ChartDataSeries to be plotted. The event data (DrawDataSeriesEventArgs) have the following properties:

*   The [Brush](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.DrawDataSeriesEventArgs.Brush.html) property defines the brush that will be used for rendering the data series. You should create your own brush and assign it to this property if you want to use to a custom brush.
*   The [DisposeBrush](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.DrawDataSeriesEventArgs.DisposeBrush.html) is Boolean value that specifies whether the brush should be disposed after using. If **DisposeBrush** is set to False then you must dispose the brush yourself.
*   The [GroupIndex](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.DrawDataSeriesEventArgs.GroupIndex.html) property defines index of chart group.
*   The [SeriesIndex](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.DrawDataSeriesEventArgs.SeriesIndex.html) property defines index of chart group.
*   The [Bounds](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.DrawDataSeriesEventArgs.Bounds.html) property represents rectangle area in which data will be plotted. This rectangle will be useful when creating gradient brushes.

## See Also

[Creating a Hatched Brush](/componentone/docs/win/online-chart2d/customizingchartelem/custombrushesforplot/creatingahatchedbrus)

[Creating a Gradient Brush](/componentone/docs/win/online-chart2d/customizingchartelem/custombrushesforplot/creatingagradientbru)