Back to Devexpress

BarSeriesBase.Style Property

maui-devexpress-dot-maui-dot-charts-dot-barseriesbase-19ecdccb.md

latest2.0 KB
Original Source

BarSeriesBase.Style Property

Gets or sets the bar series appearance. This is a bindable property.

Namespace : DevExpress.Maui.Charts

Assembly : DevExpress.Maui.Charts.dll

NuGet Package : DevExpress.Maui.Charts

Declaration

csharp
public BarSeriesStyle Style { get; set; }

Property Value

TypeDescription
BarSeriesStyle

A BarSeriesStyle object that stores bar series appearance settings.

|

Remarks

Use the Style property to specify the fill color and stroke to be applied to all bars of a series.

To draw series bars in different colors, use the series’s PointColorizer property.

Example

This example customizes the bar series appearance (bar color and stroke). To do this, assign the BarSeriesStyle object with the specified settings to the Style property of the bar series.

xaml
<dxc:ChartView>
  <dxc:ChartView.Series>
      <dxc:BarSeries x:Name="barSeries">
          <dxc:BarSeries.Style>
              <dxc:BarSeriesStyle Fill="MediumSeaGreen" Stroke="SeaGreen" StrokeThickness="10"/>
          </dxc:BarSeries.Style>
      </dxc:BarSeries>
  </dxc:ChartView.Series>
</dxc:ChartView>
csharp
using Microsoft.Maui.Graphics;
using DevExpress.Maui.Charts;
// ...

barSeries.Style = new BarSeriesStyle() {
    Fill = Color.MediumSeaGreen,
    Stroke = Color.SeaGreen,
    StrokeThickness = 10
};

See Also

BarSeriesBase Class

BarSeriesBase Members

DevExpress.Maui.Charts Namespace