BarSeriesBase.ColorEach Property
OBSOLETE
Use the PointColorizer property instead.
This property is obsolete (use the PointColorizer property instead). Indicates whether series bars are drawn in different colors.
Namespace: DevExpress.XamarinForms.Charts
Assembly: DevExpress.XamarinForms.Charts.dll
NuGet Package: DevExpress.XamarinForms.Charts
Declaration
[Obsolete("Use the PointColorizer property instead.")]
public bool ColorEach { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true to draw each bar in a different color; false to use the same color for all bars. |
Remarks
To specify bar colors to be used when the ColorEach property is set to true, assign a ChartStyle object with the specified Palette to the chart view’s ChartStyle property.
To draw all bars of a series in the same color, assign the BarSeriesStyle object with the specified Fill color to the Style property of the bar series. You can also use the BarSeriesStyle.Stroke and BarSeriesStyle.StrokeThickness properties to specify the bar stroke.
Example
This example shows how to adjust a bar chart view so that it draws bars in different colors taken from the specified palette.
<ContentPage>
<ContentPage.BindingContext>
<local:ViewModel/>
</ContentPage.BindingContext>
<dxc:ChartView>
<dxc:ChartView.ChartStyle>
<dxc:ChartStyle Palette="{Binding Palette}"/>
</dxc:ChartView.ChartStyle>
<dxc:ChartView.Series>
<dxc:BarSeries ColorEach="True">
<!--...-->
</dxc:BarSeries>
</dxc:ChartView.Series>
</dxc:ChartView>
</ContentPage>