Palettes
RadChartView3D has a built-in automatic coloring mechanism. There are predefined palettes containing 3D materials used to define the textures of the chart data points.
Here are all of the predefined chart palettes:
Name | Pallete |
---|---|
Arctic | |
Autumn | |
Cold | |
Flower | |
Forest | |
Grayscale | |
Ground | |
Lilac | |
Natural | |
Pastel | |
Rainbow | |
Spring | |
Summer | |
Warm | |
Windows8 | |
Office2013 | |
VisualStudio2013 | |
Green | |
Office2016 | |
Material | |
Fluent | |
Crystal | |
VisualStudio2019 |
A palette can be set via the Palette property of the chart. The property is of type System.Windows.Media.Media3D.MaterialCollection so you can easily create a custom palette.
Example 1: Setting a palette in XAML
Example 2: Setting a palette in code
Figure 2: Chart with 3 BarSeries3D colored using the Windows8 palette
The DefaultVisualMaterial property of the series has a higher precedence than the palette materials.
Create a custom palette
The chart allows you to create a custom palette by defining a MaterialCollection and populating it with System.Windows.Media.Media3D.Material objects. The new collection can be assinged to the Palette property of the chart.