This is a migrated thread and some comments may be shown as answers.

3D PIE WPF

1 Answer 57 Views
Chart
This is a migrated thread and some comments may be shown as answers.
goku
Top achievements
Rank 1
goku asked on 13 Nov 2009, 09:08 AM
I have some questions about styling the 3d pie in wpf.
I didnt found this in the api. Maybe someone can show me some c# code on this:
I want to change the opacity of each pie - slice, change the corner radius, get access to the colors and if possible to seperate a slice of the pie chart.

1 Answer, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 18 Nov 2009, 09:25 AM
Hello goku,

Currently, exploding pie is not possible to achieve. We plan adding this feature for the Q1 release.
Here is a sample on how to change the materials palette:
<Window x:Class="WpfApplication1.Window1"
        xmlns:t="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting"
        xmlns:tc="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:charting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting"
        Title="Window1" Height="500" Width="800">
    <Grid>
        <t:RadChart x:Name="radChart1">
            <t:RadChart.Resources>
                <charting:MaterialsCollection x:Key="{tc:ThemeResourceKey ThemeType={x:Type tc:Office_BlackTheme}, ElementType={x:Type charting:ChartArea}, ResourceId={x:Static charting:ResourceHelper.ResourceKey3DStyle}}" >
                    <MaterialGroup>
                        <MaterialGroup.Children>
                            <DiffuseMaterial Brush="Red" />
                            <SpecularMaterial Brush="White" />
                        </MaterialGroup.Children>
                    </MaterialGroup>
                    <MaterialGroup>
                        <MaterialGroup.Children>
                            <DiffuseMaterial Brush="Green" />
                            <SpecularMaterial Brush="White" />
                        </MaterialGroup.Children>
                    </MaterialGroup>
                </charting:MaterialsCollection>
            </t:RadChart.Resources>
        </t:RadChart>
    </Grid>
</Window>

Note, that the Legend will not reflect the changes since it is 2D. You will need to add custom legend items and customize them.

Sincerely yours,
Evtim
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Chart
Asked by
goku
Top achievements
Rank 1
Answers by
Dwight
Telerik team
Share this question
or