Tooltip not work in Annotation and PolarCustomAnnotation

6 posts, 0 answers
  1. kity
    kity avatar
    71 posts
    Member since:
    Mar 2012

    Posted 02 Feb 2015 Link to this post

    I have simple RadPolarChart and annotation collection.
    I put tooltip, tooltip services but not work at all.
    May it is becouse this is dynamic element figure and have diferent point position x,y ?
    Or may be problem is becouse of standart .net framewrok behaiviars.

    I try to use telerik tooltip behaviar but result is the same.
    Here is my example:

    <br>        <telerik:RadPolarChart x:Name="Myart"><br><br>            <telerik:RadPolarChart.Behaviors><br>                <telerik:ChartTooltipBehavior TriggerMode="Hold"    /><br>            </telerik:RadPolarChart.Behaviors><br><br>  <telerik:RadPolarChart.Annotations><br> <telerik:PolarCustomAnnotation PolarValue="{Binding Malue}" x:Name="Annotation1"<br>                                               RadialValue="{Binding Opt}"<br> telerik:RadToolTipService.ToolTipContent="Optimum vessel heading (Purple Ellipse)"<br>                               telerik:RadToolTipService.ToolTipContentTemplate="{StaticResource DataTemplateToolTip}"                                                                                                                                                                                                                                    <br>                               telerik:RadToolTipService.HorizontalOffset="10"<br>                               telerik:RadToolTipService.VerticalOffset="-10"      >                                          <br>

    ...
  2. kity
    kity avatar
    71 posts
    Member since:
    Mar 2012

    Posted 02 Feb 2015 in reply to kity Link to this post

    Sorry, cannot edit priviusly post to remove <br> tag ;(
  3. DevCraft banner
  4. Peshito
    Admin
    Peshito avatar
    496 posts

    Posted 03 Feb 2015 Link to this post

    Hello,

    Could you try setting the IsHitTestVisible to true and try again.

    Hope that helps.

    Regards,
    Peshito
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. baba ti
    baba ti avatar
    3 posts
    Member since:
    Mar 2014

    Posted 03 Feb 2015 in reply to Peshito Link to this post

    Thank you and have a nice day.
  6. Peshito
    Admin
    Peshito avatar
    496 posts

    Posted 04 Feb 2015 Link to this post

    Hello,

    According to your code snippet, you haven't set the IsHitTestVisible to true.

    Below is an example of a PolarChart having annotation with IsHitTestVisible set to true and RadTooltipService used to set annotation's tooltip:
    <telerik:RadPolarChart x:Name="polarChart" >
           <telerik:RadPolarChart.PolarAxis>
               <telerik:PolarAxis />
           </telerik:RadPolarChart.PolarAxis>
           <telerik:RadPolarChart.RadialAxis>
               <telerik:NumericRadialAxis />
           </telerik:RadPolarChart.RadialAxis>
            
           <telerik:RadPolarChart.Behaviors>
               <telerik:ChartTooltipBehavior />
           </telerik:RadPolarChart.Behaviors>
     
           <telerik:RadPolarChart.Series>
               <telerik:PolarPointSeries>
                   <telerik:PolarPointSeries.DataPoints>
                       <telerik:PolarDataPoint Angle="30" Value="4"/>
                       <telerik:PolarDataPoint Angle="60" Value="4"/>
                       <telerik:PolarDataPoint Angle="90" Value="4"/>
                   </telerik:PolarPointSeries.DataPoints>
               </telerik:PolarPointSeries>
           </telerik:RadPolarChart.Series>
     
           <telerik:RadPolarChart.Annotations >
               <telerik:PolarCustomAnnotation PolarValue="3"
                                              RadialValue="20"
                                              IsHitTestVisible="True">
                   <telerik:PolarCustomAnnotation.Content>
                       <Ellipse Width="20" Height="20" Fill="Green" telerik:RadToolTipService.ToolTipContent="My custom tooltip content"/>
                   </telerik:PolarCustomAnnotation.Content>
                    
               </telerik:PolarCustomAnnotation>
           </telerik:RadPolarChart.Annotations>
       </telerik:RadPolarChart>

    Attached is a picture of the end result.

    Regards,
    Peshito
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  7. baba ti
    baba ti avatar
    3 posts
    Member since:
    Mar 2014

    Posted 04 Feb 2015 in reply to Peshito Link to this post

    Very good, thanks.
Back to Top
DevCraft banner