Reputation: 5455
When I explicitly set the width of the legend in a Visiblox chart I find that legend item text gets cut off instead of wrapping. For example,
<Style x:Key="LegendStyle" TargetType="{x:Type charts:Legend}">
<Setter Property="Width" Value="200" />
</Style>
<charts:Chart Name="chart" LegendStyle="{StaticResource LegendStyle}" />
I know I can use the LegendTemplate property of the Chart control to provide a ControlTemplate for the Legend class. However, I am not sure how I would modify this to produce text wrapping in the child LegendItem controls. I am also not sure how I can modify the template used to draw the LegendItem controls to produce text wrapping. Is there a way to do this?
Upvotes: 3
Views: 1162
Reputation: 1
It might be easier to provide a LegendItemTemplate or a LegendItemStyle. These are dependency properties on the series type. You can get more information in the documentation under the "Styling and templating" section.
Upvotes: 2