Hey,
I've added tooltips to an UltraDataChart (and, similarily, pie chart) of mine, using a CategoryTooltipLayer.
While the entire border of this tooltip is black, the arrow pointing towards the series is in a pink color:
Is there any way to have that arrow in black as well?
Is it also possible to set the arrow color if I use a custom tooltip control (which derives from UserControl, and not the default tooltip)? Instead of casting e.CurrentContent to DefaultTooltipControl, I'm creating a new control in its place - which, naturally, would always have its ParentForm set to NULL when being created.
Thanks.
Hello Uwe,
Allow me to first say that this is unexpected behavior, and I have logged this in our internal tracking systems so a developer can take a look. The pink color that you are seeing appears to likely be used for internal testing purposes, but accidentally made it through to the UI of the chart. I have logged this issue with a development ID of 255632 and have created you a private support case with an ID of CAS-197073-B9H5K9 that I will link to this issue, which you can access here.
As a workaround to this behavior, I would recommend that you handle the TooltipContentUpdating event of the series that your CategoryTooltipLayer is meant to represent. This will result in an event handler that expects a return type of Control, and you can use the following sample code to prevent this behavior:
private Control Series_TooltipContentUpdating(object sender, ChartTooltipContentEventArgs e) { DefaultTooltipControl control = e.CurrentContent as DefaultTooltipControl; if (control.ParentForm != null) { control.ParentForm.BackColor = Color.Black; } return e.CurrentContent; }
I am attaching a sample project to demonstrate the above. I hope this helps.
Please let me know if you have any other questions or concerns on this matter.
UltraDataChartCategoryTooltip.zip