Please see the screen cap below for reference.
1) On the Legend, I'd like the first text to be lower - at the level of the top of the pie chart. Here is my current code for that:
Dim legend As New UltraItemLegend() Me.Controls.Add(legend) legend.Anchor = AnchorStyles.None legend.Dock = DockStyle.Right legend.Top = pieChart.Top legend.Height = 460 pieChart.Legend = legend legend.BringToFront()
2) When I mouseover other slices I do not get any mouseover text like I do with the UltraCategoryChart bar chart. It would be idea to see "Requested 45" for example when I mouseover the green area.
Thanks!
Forgot the example:
Hello Ted ,
Thank you for contacting.
For your 1st requirement you can try setting Piechart LabelsPosition property to ‘BestFit’ which will allow legend labels to automatically decide their location. Like this:
pieChart.LabelsPosition = LabelsPosition.BestFit;
For about your 2nd requirement, I believe you are talking about tooltip property of the chart, so did you enable that and still not able to get the labels when hover over ?
pieChart.ShowDefaultTooltip = true;
If yes then please provide a sample application to debug the code and find the cause of the issue.
Or you can update the sample I have created to test these behaviors.
Let me know if you have any question.
Sincerly,
Divya Jain
PieChart.zip
Thank you for the reply Divya.
The tooltips now works!
However, when I used pieChart.LabelsPosition = LabelsPosition.BestFit it did not change the top margin of the legend, but only added unwanted callouts to the piechart.
The problem is that I am positioning pieChart.Top = 50 in order to leave room for other controls on the form. However, when I dock the legend to the right side it won't allow me to set a .Top. It seems like there should be a top margin property for the legend (before the first entry is shown).
Hello Ted,
I am sure its because since you docked the legend to the right, piechart.top or piechar.height would not take into consideration.
If you provide your sample/update mine sample i can play around little bit to see if i find something.
With UltraPieChart you can use UltraItemLegend only. We do have ‘Top’ property off the UltraItemLegend but since you docked the legend to the right it will take up all the available space on the right and top property will do nothing.
You can test that by comment out the legend docking and set the legend.Top to may be 50, the way you are doing and it will work fine.
Here is the list of all the available properties of the UltraPieChart for your reference.
-
I can't run your sample because we are on version 19.1, not 19.2. But I think if you added the line in yellow it should recreate my issue where the legend does not align with the top of the chart anymore. Is there just one legend control (I've learned now that there are 3 different chart controls)? Maybe one that has a top margin property?