ChartView Tooltips ghosting

4 posts, 1 answers
  1. Shawn
    Shawn avatar
    7 posts
    Member since:
    Dec 2012

    Posted 27 May 2014 Link to this post

    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(
         @"<DataTemplate xmlns="""">",
                   @"<Border BorderBrush=""Gray"" BorderThickness=""1"" Background=""#FFF7F7F7"">",
                        @"<TextBlock Text=""{Binding Value, StringFormat='",
                                                    @"'}"" Margin=""4,4,4,4"" FontFamily=""Segoe UI"" FontSize=""14"" ",
                                                    @"Foreground=""#FF494949"" VerticalAlignment=""Center""/>",
                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?

  2. Shawn
    Shawn avatar
    7 posts
    Member since:
    Dec 2012

    Posted 27 May 2014 in reply to Shawn Link to this post

    The image didn't post of the ghosting. Let me try again (attached):

  3. DevCraft R3 2016 release webinar banner
  4. Answer
    Petar Marchev
    Petar Marchev avatar
    968 posts

    Posted 30 May 2014 Link to this post

    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.

    Petar Marchev
    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.
  5. Shawn
    Shawn avatar
    7 posts
    Member since:
    Dec 2012

    Posted 30 May 2014 Link to this post

    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.
Back to Top