This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I'm trying Pie Chart on Windows Phone 7. The default position of legend is at the right side of the chart, layout vertically. If I set the LegendPosition to Bottom, the layout of legend will change to horizontal, which will cause some legend items exceed the legend frame. I want to make it stack vertically. How to do that? |
|
|
Hello To create a vertical legend in the Bottom position, you will need to create a custom legend style. Here is the xaml code for a legend that is always vertical: <DataTemplate x:Key="LegendItemTemplate"> <DataTemplate x:Key="LegendHeaderTemplate"> <Style x:Key="LegendStyle" TargetType="ch:Legend"> You can use this style to set the PieChart.LegendStyle property. - Jason |
|
|
Thanks Jason. That's what I want. But I wonder if I could edit legend's style in Expression Blend designer surface directly, just like I edit other controls' style? I noticed the legend inside a pie chart is not selectable, and when I tried to edit the pie chart's template, Blend prompted my a blank grid, which made me feel confused.
- Allen |
|
|
Oh I see what you mean. Unfortunatly I'm not an expert with Expression Blend so not sure what's happening here. You will need to stick to using the xaml I gave you for now. Regards |
|