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.
Thanks Marisa! I created a simple test project and followed your instructions, and discovered that the problem was that I was resetting the tooltips every time the datapointcollection changed, which had a side effect of causing the tooltips to be blank when the chart was rendered.
Hi Will,
I'm having some difficulty reproducing the issue you are seeing. Here's what I'm doing:
1). Load a ColumnSeries at runtime with a datamapping like yours.
2). Change the tooltip according to your instructions
3). Change the datasource
I'm still able to see the tooltip just fine after changing the data source. Can you verify for me if these steps are correct? Also, what version and build are you using of the product.
Thank you,
Marisa