sonofaforester Posted April 11, 2011 Report Posted April 11, 2011 When I place the Legend inside the Plot Area I get NullReferenceException at runtime. Take the PassingData example and simply set the LegendBox to be inside the chart area and it occurs. Any suggestions? Quote
JuanC Posted April 14, 2011 Report Posted April 14, 2011 Have you checked when the NullReferenceException occurs? I tested placing the legend inside using XAML <cfx:Chart Name="chart1" Border="{x:Static cfx:Borders.Classic}" Palette="{x:Static cfx:Palettes.Basic}" Style="{x:Static cfxmotifs:Simple.Style}"> <cfx:Chart.LegendBox> <cfx:LegendBox cfx:Chart.TargetPanel="Inside" HorizontalAlignment="Right" VerticalAlignment="Top"/> </cfx:Chart.LegendBox></cfx:Chart> I also tried using code in the Page_loaded method instead of XAML as follows Chart.SetTargetPanel(chart1.LegendBox, "Inside");chart1.LegendBox.HorizontalAlignment = HorizontalAlignment.Right;chart1.LegendBox.VerticalAlignment = VerticalAlignment.Top; Both ways worked fine. If you try any of these and they fail you might want to download our most recent hotfix. JuanC Quote
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.