Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
760
Tooltips Disappearing On Redraw
posted

Hello,

I am encountering an issue where my tooltips disappear after I cause the chart to redraw. The tooltips display just fine when the chart loads initially, but if I cause it to redraw (by modifying the data source, for example) the tooltip is just a small empty box. The custom code I have around tooltips is below.

 

When each series is created:

 

series.DataMapping = "Label=Label;Value=Value;Tooltip=Tooltip";

 

I then change the tooltip for each DP into a textblock for additional styling options:

 

 

foreach (DataPoint point in series.DataPoints)

                {

                    if (point.ToolTip != null && 

                        !string.IsNullOrEmpty(point.ToolTip.ToString()))

                    {

                        TextBlock tb = new TextBlock();

                        tb.Text = (string) point.ToolTip;

 

...

 

                        point.ToolTip = tb;

                    }

 

Before:

 

After:

 

Thank you in advance.