Gradient in pie chart series - how to remove?

7 posts, 0 answers
  1. kaczmar2
    kaczmar2 avatar
    8 posts
    Member since:
    Nov 2010

    Posted 17 Nov 2010 Link to this post

    I am using a SolidColorBrush in my pie chart, but I still see some kind of gradient and band for each of the series items (see attached screenshot.  I assumed that SolidColorBrush would paint a solid pie slice.  How can I achieve this?
  2. Sia
    Admin
    Sia avatar
    756 posts

    Posted 18 Nov 2010 Link to this post

    Hello Christian Kaczmarek,

    The shadow which you see is a mask over the pie. The palette brushes functionality does not remove the masks and that is why you need to retemplate your pie in order to have them removed. Please check the attached project.

    Kind regards,
    Sia
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. kaczmar2
    kaczmar2 avatar
    8 posts
    Member since:
    Nov 2010

    Posted 18 Nov 2010 Link to this post

    Thank you for the sample.  I was able to integrate it into the pie chart and the chart looks exactly how I need it.  Thank you again.
  4. Saravanan
    Saravanan avatar
    36 posts
    Member since:
    Jun 2011

    Posted 15 Jul 2011 Link to this post

    Thank you,
     
    i have some questions,
     
    1.how to position the item label style in center ?..why its always in corner  ?
     
    2.Can we reduce the radius size ?,i want to reduce the size to very small
     
    3.how to change gradient circle shape from circle to ellipse ?
      (i want to show bubble effect) l
     
    please find the attachment here..
     
    Thanking you,
    Saravanan
  5. Sia
    Admin
    Sia avatar
    756 posts

    Posted 19 Jul 2011 Link to this post

    Hello Saravanan,

    Straight to your questions:
     
    1. How to position the item label style in center ?..why its always in corner  ?

    You can reduce the label offset and position you labels inside the pie slices. For example:
    <telerik:SeriesMapping.SeriesDefinition>
        <telerik:PieSeriesDefinition ItemLabelFormat="#VAL %" ItemStyle="{StaticResource CustomPieStyle}">
            <telerik:PieSeriesDefinition.LabelSettings>
                <telerik:RadialLabelSettings LabelOffset="0.5" />
            </telerik:PieSeriesDefinition.LabelSettings>
            <telerik:PieSeriesDefinition.InteractivitySettings>
                <telerik:InteractivitySettings HoverScope="Item" SelectionMode="Single" SelectionScope="Item"/>
            </telerik:PieSeriesDefinition.InteractivitySettings>
        </telerik:PieSeriesDefinition>
    </telerik:SeriesMapping.SeriesDefinition>
    Different settings can be observed in our "Smart Labels" demo.

    2. Can we reduce the radius size ?,i want to reduce the size to very small
    You can reduce the pie size by changing the RadiusFactor default value as follows:
    <telerik:PieSeriesDefinition ItemLabelFormat="#VAL %" ItemStyle="{StaticResource CustomPieStyle}" RadiusFactor="0.5">

    3. How to change gradient circle shape from circle to ellipse ? (i want to show bubble effect)
    You need to modify the mask over the pie by setting custom style, which can be found in the attached project. The RadialGradientBrush which needs to be modified is:
    <RadialGradientBrush x:Key="PieMaskBrush" GradientOrigin="0.5,0.5">
        <GradientStop Color="#33FFFFFF" Offset="0.88"/>
        <GradientStop Color="#00FFFFFF" Offset="0.65"/>
        <GradientStop Offset="0.89"/>
    </RadialGradientBrush>

    I hope this helps.

    Greetings,
    Sia
    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!

  6. Saravanan
    Saravanan avatar
    36 posts
    Member since:
    Jun 2011

    Posted 19 Jul 2011 Link to this post

    Thank you very much Team,
      
      
    Quesion 1:
      
    i am showing value in terms of Percentage.(100%)
      
    but when give data like this..
      
                 ObservableCollection<TradeData> tradeData = new ObservableCollection<TradeData>();
                 tradeData.Add(new TradeData { Name = "name1", Count = 80 });
                 tradeData.Add(new TradeData { Name = "name3", Count = 80});
                 return tradeData;
      
    it shows what i give but its wrong i thing ..how should i avoid this..
      
    Question 2:
      
     How should i show the display message "No Data Series" when two series value is Zero ?
                   ObservableCollection<TradeData> tradeData = new ObservableCollection<TradeData>();
                 tradeData.Add(new TradeData { Name = "name1", Count = 0});
                 tradeData.Add(new TradeData { Name = "name3", Count = 0});
                return tradeData;
    its shows 0%,0%,i want to hide this one..
      
    please find the attachement here
      
      
        
  7. Sia
    Admin
    Sia avatar
    756 posts

    Posted 22 Jul 2011 Link to this post

    Hello Saravanan,

    Can you please give us some more details about your first question because with the present information we are not sure what causes your problem?

    Regarding your second question, you need to set the chart's itemsource to null when all values are 0.
    RadChart.ItemsSource = null;

    Another option is to hide the zero values by setting:
    (seriesMapping1.SeriesDefinition as PieSeriesDefinition).LabelSettings.ShowZeroValueLabels = false;


    All the best,
    Sia
    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!

Back to Top