beltrams Posted August 27, 2010 Report Share Posted August 27, 2010 I have a pie chart, for some reason the legend appear more or less in the top-center instad of top-right. If I change the graph to be column or cureve the legend is correctly in the top-right, but not for pie. This is my code: < cfx:LegendBox cfx:Chart.TargetPanel="Inside" DockPanel.Dock="Top" HorizontalAlignment="Right" VerticalAlignment="Top" Visibility="{Binding Path=Text, ElementName=LegendBoxVisibilityDummyTextBox, Mode=OneWay}"> Quote Link to comment Share on other sites More sharing options...
JuanC Posted August 27, 2010 Report Share Posted August 27, 2010 Chart.TargetPanel="Inside" should only be used in "axis" charts (bar, line, area, curve, etc.). It is not supported in non-axis charts (pie, doughnut, radar, etc.) JuanC Quote Link to comment Share on other sites More sharing options...
beltrams Posted August 27, 2010 Author Report Share Posted August 27, 2010 Thanks JuanC. TargetPanel is sot supported at all or I can use other values? I am binding the chart tupe to my view model, is there any way I can bond TargetPanel to something so that I dont waste space in Column and Curve? Thanks, Simone Quote Link to comment Share on other sites More sharing options...
JuanC Posted August 27, 2010 Report Share Posted August 27, 2010 You can use "Tools" which is the default value for the TargetPanel attached property if you want to setup a binding and return "Inside" for axis charts and "Tools" for non-axis charts. BTW, "Inside" will in fact place the label on top of the pie and HorizontalAlignment is honored (obviously if available space is bigger than legend) If your space is constrained you might want to look at this JuanC Quote Link to comment Share on other sites More sharing options...
beltrams Posted September 1, 2010 Author Report Share Posted September 1, 2010 Thanks JuanC, All of this make sense, thanks. I also have found your article on how to save legend space very interesting. Thanks again. Simone 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.