XYSeries.ColorEach Property
Indicates whether each point marker of a series is shown with a different color.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v20.1.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.Charts, DevExpress.Wpf.Charts
Declaration
Property Value
Type | Description |
---|---|
Boolean | true to paint each point marker with a different color; otherwise, false. |
Remarks
Use the ColorEach property to control whether data point markers are drawn in different colors.
If the ColorEach property is enabled, colors for point markers are taken from the palette specified via the ChartControlBase.Palette property.
Example
The following example demonstrates how to create a 2D Point chart. Assign the ChartControl.Diagram property to XYDiagram2D and add a PointSeries2D object to the Diagram.Series collection.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-create-a-2d-point-chart-e1651.
<Window x:Class="Point2DChart.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts" Title="Window1" Height="350" Width="620">
<Grid>
<dxc:ChartControl Name="chartControl1">
<dxc:ChartControl.Diagram>
<dxc:XYDiagram2D>
<dxc:XYDiagram2D.Series>
<dxc:PointSeries2D ColorEach="True" MarkerSize="20">
<dxc:PointSeries2D.Points>
<dxc:SeriesPoint Argument="A" Value="1" />
<dxc:SeriesPoint Argument="B" Value="3" />
<dxc:SeriesPoint Argument="C" Value="7" />
<dxc:SeriesPoint Argument="D" Value="4" />
<dxc:SeriesPoint Argument="E" Value="5" />
<dxc:SeriesPoint Argument="F" Value="3" />
<dxc:SeriesPoint Argument="G" Value="9" />
<dxc:SeriesPoint Argument="H" Value="11" />
</dxc:PointSeries2D.Points>
<!--region #PointOptions-->
<dxc:PointSeries2D.PointOptions>
<dxc:PointOptions PointView="ArgumentAndValues" />
</dxc:PointSeries2D.PointOptions>
<!--endregion #PointOptions-->
<!--region #MarkerModel-->
<dxc:PointSeries2D.MarkerModel>
<dxc:DollarMarker2DModel />
</dxc:PointSeries2D.MarkerModel>
<!--endregion #MarkerModel-->
<!--region #Label-->
<dxc:PointSeries2D.Label>
<dxc:SeriesLabel ConnectorVisible="False" Indent="15" dxc:MarkerSeries2D.Angle="90" />
</dxc:PointSeries2D.Label>
<!--endregion #Label-->
</dxc:PointSeries2D>
</dxc:XYDiagram2D.Series>
</dxc:XYDiagram2D>
</dxc:ChartControl.Diagram>
</dxc:ChartControl>
</Grid>
</Window>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ColorEach property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.