halley73 Posted October 23, 2008 Report Share Posted October 23, 2008 Hi, how can i set a flat background instead of the default background of the chart? Thank's, Luca Quote Link to comment Share on other sites More sharing options...
JuanC Posted October 23, 2008 Report Share Posted October 23, 2008 There are 2 factors that affect the background of the chart 1) Background property: This is a brush property so you can use solid colors as well as any other WPF brush. XAML:<cfx:Chart x:Name="chart1" Background="LightYellow"> Code:chart1.Background = System.Windows.Media.Brushes.Blue; 2) Style property: some styles might use the background in different ways or draw semi-transparent layers on top of the background, this property allows you to change the overall look of the chart. Note that each style will use a different color Palette (Palette Property) but you can override the colors by changing the palette or changing specific brushes. XAML:xmlns:cfxMotifs="clr-namespace:ChartFX.WPF.Motifs;assembly=ChartFX.WPF" <cfx:Chart x:Name="chart1" Style="{x:Static cfxMotifs:Simple.Style}">Code:chart1.Style = ChartFX.WPF.Motifs.Simple.Style; Regards, JuanC Quote Link to comment Share on other sites More sharing options...
mattdot Posted January 22, 2009 Report Share Posted January 22, 2009 does BorderTemplate affect the background, and if so, what is an example of a border template? Quote Link to comment Share on other sites More sharing options...
JuanC Posted January 26, 2009 Report Share Posted January 26, 2009 A border template is supposed to honor the background so in a sense it can affect it. The template can also show some effects on top of the background. Please note that if you plan to use our built in borders you should use the Chart.Border property along with an element from the ChartFX.WPF.Borders class. The reason for this change is design time support in Visual Studio. You can easily see how our different borders look if you change the Chart.Style to ChartFX.WPF.Motifs.Basic and then use the different borders, by setting the style to basic you will have a simpler chart which will help see the different borders. JuanC Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.