This topic explains how to apply a custom color palette to the XamScatterSurface3D™ control series as well as how to configure the colors interpolation.
The following topics are prerequisites to understanding this topic:
This topic contains the following sections:
Use the XamScatterSurface3D SeriesColors property to apply a custom color palette to the xamScatterSurface3D control series.
The following table maps the desired configuration to the property settings that manage it.
The screenshot below demonstrates how the xamScatterSurface3D control series look as a result of the following settings:
Following is the code that implements this example.
In XAML:
<ig:XamScatterSurface3D Name="SurfaceChart2"
ItemsSource="{Binding Path=DataCollection}"
XMemberPath="X" YMemberPath="Y" ZMemberPath="Z"
SeriesColors="Blue Green Red"/>
In C#:
var colorCollection = new ColorCollection();
colorCollection.Add(Colors.Blue);
colorCollection.Add(Colors.Green);
colorCollection.Add(Colors.Red);
SurfaceChart.SeriesColors = colorCollection;
In Visual Basic:
Dim colorCollection = New ColorCollection()
colorCollection.Add(Colors.Blue)
colorCollection.Add(Colors.Green)
colorCollection.Add(Colors.Red)
SurfaceChart.SeriesColors = colorCollection
Use the XamScatterSurface3D SeriesColorInterpolation property to specify the series colors interpolation in the xamScatterSurface3D control.
By default, the initial value of the SeriesColorInterpolation
is SeriesColorPaletteInterpolation.ARGB
.
There are three available options for series palette colors interpolation:
The following table maps the desired configuration to the property settings that manage it.
The screenshot below demonstrates how the xamScatterSurface3D control series colors looks as a result of the following settings:
Following is the code that implements this example.
In XAML:
<ig:XamScatterSurface3D Name="SurfaceChart"
ItemsSource="{Binding Path=DataCollection}"
XMemberPath="X" YMemberPath="Y" ZMemberPath="Z"
SeriesColorInterpolation="AHSV">
<ig:XamScatterSurface3D.SeriesColors>
<ig:ColorCollection>
<Color>Blue</Color>
<Color>Green</Color>
<Color>Red</Color>
</ig:ColorCollection>
</ig:XamScatterSurface3D.SeriesColors>
</ig:XamScatterSurface3D>
In C#:
var colorCollection = new ColorCollection();
colorCollection.Add(Colors.Blue);
colorCollection.Add(Colors.Green);
colorCollection.Add(Colors.Red);
SurfaceChart.SeriesColors = colorCollection;
SurfaceChart.SeriesColorInterpolation = SeriesColorPaletteInterpolation.AHSV;
In Visual Basic:
Dim colorCollection = New ColorCollection()
colorCollection.Add(Colors.Blue)
colorCollection.Add(Colors.Green)
colorCollection.Add(Colors.Red)
SurfaceChart.SeriesColors = colorCollection
SurfaceChart.SeriesColorInterpolation = SeriesColorPaletteInterpolation.AHSV
The following topics provide additional information related to this topic.