If you look at the visual tree, you will find that you must change the background property of the grid and border to change the background to transparent (the elements are highlighted in yellow in the figure below).

To do this, you can change the color in the Loaded event. First you should find an EdgePanel named ChartArea , after which you should change the grid color and border. If you want to set the transparency of the Legend background, you must find the Legend element and set the appropriate properties.
<DVC:Chart Canvas.Top="80" Canvas.Left="10" Name="mcChart" Width="400" Height="250" Background="Orange" Loaded="mcChart_Loaded"> <DVC:Chart.Series> <DVC:PieSeries Title="Experience" ItemsSource="{StaticResource FruitCollection}" IndependentValueBinding="{Binding Path=Name}" DependentValueBinding="{Binding Path=Share}"> </DVC:PieSeries> </DVC:Chart.Series> </DVC:Chart>
Code for:
private void mcChart_Loaded(object sender, RoutedEventArgs e) { EdgePanel ep = VisualHelper.FindChild<EdgePanel>(sender as Chart, "ChartArea"); if (ep != null) { var grid = ep.Children.OfType<Grid>().FirstOrDefault(); if (grid != null) { grid.Background = new SolidColorBrush(Colors.Transparent); } var border = ep.Children.OfType<Border>().FirstOrDefault(); if (border != null) { border.BorderBrush = new SolidColorBrush(Colors.Transparent); } } Legend legend = VisualHelper.FindChild<Legend>(sender as Chart, "Legend"); if (legend != null) { legend.Background = new SolidColorBrush(Colors.Transparent); legend.BorderBrush = new SolidColorBrush(Colors.Transparent); } }
Helper class to search for a child in this case EdgePanel :
class VisualHelper { public static T FindChild<T>(DependencyObject parent, string childName) where T : DependencyObject { if (parent == null) return null; T foundChild = null; int childrenCount = VisualTreeHelper.GetChildrenCount(parent); for (int i = 0; i < childrenCount; i++) { var child = VisualTreeHelper.GetChild(parent, i); T childType = child as T; if (childType == null) { foundChild = FindChild<T>(child, childName); if (foundChild != null) break; } else if (!string.IsNullOrEmpty(childName)) { var frameworkElement = child as FrameworkElement; if (frameworkElement != null && frameworkElement.Name == childName) { foundChild = (T)child; break; } } else { foundChild = (T)child; break; } } return foundChild; } }
source share