0

我正在尝试更改饼图和柱形图的颜色,但我不知道该怎么做。有人可以给我看或举个例子吗?

到目前为止我的代码:

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" Background="White">
        <chart:Chart x:Name="PieChart" Foreground="Gray" Title="Part of the Chart Resembling a Video Game Character">
            <chart:Chart.Series>
                <chart:PieSeries
                        IndependentValueBinding="{Binding Label}"
                        DependentValueBinding="{Binding Value}">
                    <chart:PieSeries.Template>
                        <ControlTemplate TargetType="chart:PieSeries">
                            <Canvas x:Name="PlotArea" RenderTransformOrigin="0.5,0.5">
                                <Canvas.RenderTransform>
                                    <RotateTransform Angle="125"/>
                                </Canvas.RenderTransform>
                            </Canvas>
                        </ControlTemplate>
                    </chart:PieSeries.Template>
                </chart:PieSeries>
            </chart:Chart.Series>
        </chart:Chart>
    </Grid>
</Grid>
4

1 回答 1

0

我找到了一个解决方案,希望对某人有所帮助;

http://blogs.msdn.com/b/delay/archive/2009/05/19/chart-tweaking-made-easy-how-to-make-four-simple-color-tooltip-changes-with-silverlight- wpf-charting.aspx

于 2013-09-06T06:46:55.513 回答