Colors Issue, Camera Extensions..

2 posts, 0 answers
  1. Hash
    Hash avatar
    3 posts
    Member since:
    Jun 2011

    Posted 24 Jun 2011 Link to this post

    I am using WPF Rad Pie Chart control
    Here i have multiple problems..As per my requirement..

    I need to display thress categories in Pie chart 
    1. Incomplete
    2. Complete
    3. NotStarted

    If the any <Category> records are 0 then we are not going to display that in the pie chart.. But i do want to display the legend.
    So to achieve this, I am adding the Legend Item manually, Label and MarkerFill..

    1) The problem is .. When i do not display a category.., the legend colors and Pie chart colors are not matching..  Can you please let me know a way to resolve this problems.. [--  FYI If i am displaying all the categories on the chart, then the colors Match]
    2) If i do not use any camera extensions, by default the pie chart is at an angle of 60 degrees.. Which is not very visible to the user, How can i change the default angle so that it displays.. as a full circle..

    Thanks for the Help..

  2. Sia
    Sia avatar
    667 posts

    Posted 29 Jun 2011 Link to this post

    Hello aslesh,

    Straight to your questions:

    1. I understand your problem and it is caused because the pie slices get their color depending on the number of slices ( the first color is set to the first slice, the second to the second one and so on).
    A possible solution to overcome this is to use a custom delegate function where a specific color is set depending on some field. Please check this approach and let me know whether it is possible in your scenario.

    2. I suppose that you use a 3D Pie series in your project. You can set the camera extension initially in your code as follows and clear it on the size changed event of RadChart if you do not want the user to be able to change the pie position after that:
    public MainWindow()
                CameraExtension c = new CameraExtension();
                this.RadChart1.SizeChanged += new SizeChangedEventHandler(RadChart1_SizeChanged);
            void RadChart1_SizeChanged(object sender, SizeChangedEventArgs e)
    Best wishes,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top