This is a migrated thread and some comments may be shown as answers.

ChartView Tooltips ghosting

3 Answers 24 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 27 May 2014, 08:58 PM
I added a tooltip based on code I got from the demos to my chart. I am seeing some ghosting when I drag the mouse over a bar (on a bar chart.) It seems that the machine has a bit to do with it. One of our testers is seeing it worse on her machine which is a little older than mine. I am still seeing it, but not as bad with a newer, more powerful machine. I am defining the tooltip's data template in the code behind (for a couple reason I won't get into at the moment):

private DataTemplate GetToolTipDataTemplate()
{
     StringReader markup = new StringReader(
     string.Format("{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}",
     @"<DataTemplate xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">",
          @"<Grid>",
               @"<Border BorderBrush=""Gray"" BorderThickness=""1"" Background=""#FFF7F7F7"">",
                    @"<TextBlock Text=""{Binding Value, StringFormat='",
                                                LabelFormat,
                                                @"'}"" Margin=""4,4,4,4"" FontFamily=""Segoe UI"" FontSize=""14"" ",
                                                @"Foreground=""#FF494949"" VerticalAlignment=""Center""/>",
                    @"</Border>",
          @"</Grid>",
          @"</DataTemplate>"));
            XmlReader xmlReader = XmlReader.Create(markup);
            return XamlReader.Load(xmlReader) as DataTemplate;
}

Here is an image of the tooltip ghosting: 



I will note that the data template above is a bit different from what you see in the image. I took out the vector image to see if its generation was causing the issue. But it is still doing it. 

Any ideas?


3 Answers, 1 is accepted

Sort by
0
Shawn
Top achievements
Rank 1
answered on 27 May 2014, 09:02 PM
The image didn't post of the ghosting. Let me try again (attached):

0
Accepted
Petar Marchev
Telerik team
answered on 30 May 2014, 07:14 AM
Hi Shawn,

In order to turn the tool tip on, you need to add a ChartTooltipBehavior. Only one : )  I think that you have added more than one behavior, hence the 'ghosting'.

Please make sure that you have only one ChartTooltipBehavior in the Behaviors collection of the chart and let us know how it goes.

Regards,
Petar Marchev
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Shawn
Top achievements
Rank 1
answered on 30 May 2014, 07:12 PM
Thanks Petar. You were on the money. I am generating everything in code. At some point, it was looping back through and adding a redundant behavior. Very good call.
Tags
ChartView
Asked by
Shawn
Top achievements
Rank 1
Answers by
Shawn
Top achievements
Rank 1
Petar Marchev
Telerik team
Share this question
or