Set Background color for 3D Chart

9 posts, 1 answers
  1. James
    James avatar
    44 posts
    Member since:
    Jan 2012

    Posted 04 Apr 2012 Link to this post

    I need to know how to set the background color of the charting area of a 3D chart.  For the 2D chart I create a MarkedZone object and apply a solidcolorbrush as follows:
     MarkedZone bgZone = new MarkedZone();
     bgZone.Background = new SolidColorBrush(Colors.Aqua);
     this.radChart1.DefaultView.ChartArea.Annotations.Clear();
     this.radChart1.DefaultView.ChartArea.Annotations.Add(bgZone);
    
    This does not work for the 3D chart!  How would I make this work for the 3D chart or is it even possible.
    
    Thanks,
    
    James
    
    
    
  2. James
    James avatar
    44 posts
    Member since:
    Jan 2012

    Posted 06 Apr 2012 Link to this post

    Please help with this!  I really need an answer to this soon.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 09 Apr 2012 Link to this post

    Hello James,

    Unfortunately the RadChart control does not support marked zones with 3D series and we are not planning on developing such a feature.

    All the best,
    Petar Marchev
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  5. James
    James avatar
    44 posts
    Member since:
    Jan 2012

    Posted 09 Apr 2012 Link to this post

    Petar,

    Thanks for answering about the marked zones.  How would I go about setting the background for the 3D chart then?  That is really what I need to know.  The marked zone was just the way of making it happen with the 2D.

    James
  6. James
    James avatar
    44 posts
    Member since:
    Jan 2012

    Posted 11 Apr 2012 Link to this post

    I really need to know if there is anyway to set a plot area background brush, both solid and linear gradient, for a 3D WPF RadChart.  The version that I am using is 2010.2.10.806.  I would really appreciate a member from the Telerik team letting me know an answer to this question.

    Thanks,

    James
  7. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 11 Apr 2012 Link to this post

    Hi James,
     
    Setting the background for the 3D RadChart can not be achieved with out-of-the-box means. However, below I have pasted some code that might be of help to you:
    <UserControl.Resources>
         
        <SolidColorBrush x:Key="StripLinesDiffuseMaterialBrush1" Color="Aquamarine"/>
        <SolidColorBrush x:Key="StripLinesDiffuseMaterialBrush2" Color="Aquamarine"/>
        <SolidColorBrush x:Key="StripLinesDiffuseMaterialBrush3" Color="Aquamarine"/>
     
        <telerik:MaterialsCollection x:Key="3DStripLinesStyle">
            <media3d:DiffuseMaterial Brush="{StaticResource StripLinesDiffuseMaterialBrush1}" />
            <media3d:DiffuseMaterial Brush="{StaticResource StripLinesDiffuseMaterialBrush2}" />
            <media3d:DiffuseMaterial Brush="{StaticResource StripLinesDiffuseMaterialBrush3}" />
        </telerik:MaterialsCollection>
         
    </UserControl.Resources>
       
    Place this in the resources and now the background of the chart should be Aquamarine color.
     
    Greetings,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. James
    James avatar
    44 posts
    Member since:
    Jan 2012

    Posted 11 Apr 2012 Link to this post

    Petar,
    This is a WPF application.  Will that make any difference?  When I copied the xaml in the code and tried to find an appropriate namespace for media3 I could not find one.  I tried this in a silverlight application and found the namespace telerik.windows.controls.media.media3d.  Thanks for any help you can offer.

    James
  9. Answer
    Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 12 Apr 2012 Link to this post

    Hello James,

    My apologies for overlooking that you inquired this about WPF. Indeed I tested the provided code on a Silverlight project, not a WPF one.

    After some investigation, I am sorry to inform you that setting the background with 3D series in WPF cannot is not possible. I am sorry for the caused inconvenience. 

    All the best,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  10. James
    James avatar
    44 posts
    Member since:
    Jan 2012

    Posted 12 Apr 2012 Link to this post

    Petar,
    Thanks for the reply.

    James
Back to Top
UI for WPF is Visual Studio 2017 Ready