Skip to main content

Microsoft Silverlight

Answered Question How do you make the background of a pieseries chart invisible and lose the legend?RSS Feed

(0)

mathiasX_
mathiasX_

Member

Member

14 points

55 Posts

How do you make the background of a pieseries chart invisible and lose the legend?

I have a pieseries chart that I need to have blend in with the ToolWindow is sits in.  Here is the code so far for this control...

<sd:WindowGroup Background="#FF37466D" >
	<sd:ToolWindow Title="Net Assets" x:Name="NetAssets" Background="#FF37466D">
                            <chart:Chart x:Name="AssetChart" BorderBrush="Gray" Margin="1" Background="#FF37466D" Title="" >
                                	<chart:PieSeries IndependentValueBinding="{Binding Path=acctBalance}"
                                                 	DependentValueBinding="{Binding Path=acctBalance}"
                                                 	AnimationSequence="FirstToLast" 
                                                	 Background="#FF37466D" 
                                                 	IsSelectionEnabled="False" 
                                                 	Visibility="Visible"
                                                 	Foreground="#FF37466D">
                                	</chart:PieSeries>
                            </chart:Chart>
	</sd:ToolWindow>
</sd:WindowGroup>
 

SharpGIS
SharpGIS

Contributor

Contributor

3387 points

611 Posts

Answered Question

Re: How do you make the background of a pieseries chart invisible and lose the legend?

The trick is to open your page.xaml that contains the piechart up in Blend. Right-click the piechart in the list on the left, and select to edit a copy of the template.

Now start browsing through the items in the piechart (you might have to repeat the process for sub elements), and delete the parts that you don't need like the legend. I've succesfully been able to split the piechart up in separate legend and piechart controls using this approach, and also completely restyle background, border etc.

If you get stuck, I recommend that you google for tutorials on templating controls in blend. It is really powerfull stuff when you get into it.

--
/Morten | blog - twitter
Please click on "Mark as Answer" if this answered your question.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities