DevExpress ChartControl Pie 颜色设置

<UserControl x:Class="UseCustomPalette.MainPage"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
     mc:Ignorable="d"
     d:DesignHeight="300" d:DesignWidth="400" >
  
     <Grid x:Name="LayoutRoot" Background="White">
         <dxc:ChartControl Name="chartControl1" >
 
 
             <!--region #Palette 主要是这里-->
             <dxc:ChartControl.Palette>
                 <dxc:CustomPalette>
                     <dxc:CustomPalette.Colors>
                         <Color>Blue</Color>
                         <Color>Yellow</Color>
                         <Color>Magenta</Color>
                     </dxc:CustomPalette.Colors>
                 </dxc:CustomPalette>
             </dxc:ChartControl.Palette>
             <!--endregion #Palette-->
 
 
             <dxc:ChartControl.Diagram>
                 <dxc:SimpleDiagram2D>
                     <dxc:SimpleDiagram2D.Series>
                         <dxc:PieSeries2D HoleRadiusPercent="0" >
                             <dxc:PieSeries2D.Points>
                                 <dxc:SeriesPoint Argument="A" Value="3" />
                                 <dxc:SeriesPoint Argument="B" Value="2" />
                                 <dxc:SeriesPoint Argument="C" Value="1" />
                             </dxc:PieSeries2D.Points>
                         </dxc:PieSeries2D>
                     </dxc:SimpleDiagram2D.Series>
                 </dxc:SimpleDiagram2D>
             </dxc:ChartControl.Diagram>
         </dxc:ChartControl>
     </Grid>
</UserControl>

你可能感兴趣的:(DevExpress ChartControl Pie 颜色设置)