我想做一个带有DropShadow效果的饼图,所以我试图将效果放在PieDataPoint对象上,但它不起作用 - 而不是在每个切片的阴影中画出一个阴影他们对邻居的影子,如下图所示:
答案 0 :(得分:0)
最终我在图表模板内的EdgePanel上设置了DropShadow效果,并且它有效。
<Charting:Chart.Template>
<ControlTemplate TargetType="Charting:Chart">
<Border>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<chartingprimitives:EdgePanel x:Name="ChartArea" Style="{TemplateBinding ChartAreaStyle}">
<chartingprimitives:EdgePanel.Effect>
<DropShadowEffect
ShadowDepth = "5"
Direction = "330"
Color = "Gray"
Opacity = "0.5"
BlurRadius = "10">
</DropShadowEffect>
</chartingprimitives:EdgePanel.Effect>
</chartingprimitives:EdgePanel>
<charting:Legend x:Name="Legend" BorderThickness="0" Grid.Row="1" HorizontalAlignment="Center"/>
</Grid>
</Border>
</ControlTemplate>
</Charting:Chart.Template>