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

RadPieChart unable to set Styles

2 Answers 86 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stefano
Top achievements
Rank 1
Stefano asked on 19 Jul 2011, 09:19 AM
Hi,
i've recently updated my project with the Q2 release of RadControls for Windows Phone 7 (2011.2.712.1037) and i have an issue with the styling of a RadPieChart.
I have this following code:
<chart:RadPieChart Margin="66,152,6,210" d:LayoutOverrides="Height">
    <chart:PieSeries LabelOffset="80" ShowLabels="True" ItemsSource="{Binding Series}">
        <chart:PieSeries.Styles>
            <Style TargetType="Path" BasedOn="{StaticResource BasePieStyle}">
                <Setter Property="Fill" Value="#FF37FF00"/>
            </Style>
 
            <Style TargetType="Path" BasedOn="{StaticResource BasePieStyle}">
                <Setter Property="Fill" Value="Red"/>
            </Style>
        </chart:PieSeries.Styles>
    </chart:PieSeries>
</chart:RadPieChart>

Everything worked since the update, but now the PieSeries.Styles property became PieSeries.Style and accepts only a value. My problem is i want to set exactly those two colors to my two slices of pie and i don't know how to proceed. I've checked on the example project that's been installed with the Q2 package but it's compiled against an older version of the DLL.
Thanks
Stefano Driussi

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi
Telerik team
answered on 20 Jul 2011, 11:58 AM
Hello Stefano,

Thank you for contacting us.

We changed the name of the Styles property to SliceStyles which we believe to be more meaningful. So, the code should look like:

<chart:RadPieChart Margin="66,152,6,210" d:LayoutOverrides="Height">
    <chart:PieSeries LabelOffset="80" ShowLabels="True" ItemsSource="{Binding Series}">
        <chart:PieSeries.SliceStyles>
            <Style TargetType="Path" BasedOn="{StaticResource BasePieStyle}">
                <Setter Property="Fill" Value="#FF37FF00"/>
            </Style>
  
            <Style TargetType="Path" BasedOn="{StaticResource BasePieStyle}">
                <Setter Property="Fill" Value="Red"/>
            </Style>
        </chart:PieSeries.SliceStyles>
    </chart:PieSeries>
</chart:RadPieChart>

I hope this helps, do not hesitate to write us back should you have any other questions/problems.

Kind regards,
Georgi
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Stefano
Top achievements
Rank 1
answered on 27 Jul 2011, 01:11 PM
Thanks a lot, that solved the problem.
Tags
Chart
Asked by
Stefano
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Stefano
Top achievements
Rank 1
Share this question
or