How to set showduration for ChartViewSeries Tooltip

2 posts, 0 answers
  1. Giorgio
    Giorgio avatar
    1 posts
    Member since:
    May 2015

    Posted 23 Jun 2015 Link to this post

    Hi telerik Team,

    I want to make longer the duration of tool tip visibility in a piechart, I tried several solutions but nothing seems to work.

    Settings the show duration in ChartTooltipBehavior I obtain another tooltip.

    here is my xaml:

     

    <telerikui:RadPieChart x:Name="telerikPieChart"
     
                           d:DataContext="{Binding Source={d:DesignInstance design:PieChartSeriesDC, IsDesignTimeCreatable=True}, Path=Series}">
     
        <telerikui:RadPieChart.Behaviors>
     
            <telerikcv:ChartTooltipBehavior ShowDuration="3600" />
     
        </telerikui:RadPieChart.Behaviors>
     
        <telerikui:RadPieChart.Series>
     
            <telerikcv:DoughnutSeries ItemsSource="{Binding Children}" ValueBinding="Value"
     
                                      DefaultSliceStyle="{StaticResource PieSliceStyle}" ShowLabels="True">
     
            </telerikcv:DoughnutSeries>
     
        </telerikui:RadPieChart.Series>
     
        <telerikui:RadPieChart.TooltipTemplate>
     
            <DataTemplate>
     
                <Border Background="Black" Opacity="0.9" CornerRadius="5" Height="Auto"
     
                        ToolTipService.ShowDuration="3600000">
     
                    <StackPanel Margin="6">
     
                        <StackPanel Orientation="Vertical">
     
                            <TextBlock Foreground="White" Grid.Row="0" FontSize="13" HorizontalAlignment="Center" FontWeight="Bold" TextWrapping="Wrap">
     
                                <TextBlock.Text>
     
                                    <MultiBinding StringFormat="{}{0}  {1:P2}">
     
                                        <Binding Path="DataItem.Label" />
     
                                        <Binding Path="DataItem.Percentage" />
     
                                    </MultiBinding>
     
                                </TextBlock.Text>
     
                            </TextBlock>
     
                            <ListView Grid.Row="1" ItemsSource="{Binding DataItem.Children}" Height="Auto" Background="Transparent" BorderThickness="0" Focusable="False">
     
                                <ListView.ItemTemplate>
     
                                    <DataTemplate>
     
                                        <Grid>
     
                                            <Grid.ColumnDefinitions>
     
                                                <ColumnDefinition/>
     
                                                <ColumnDefinition Width="5"/>
     
                                                <ColumnDefinition/>
     
                                            </Grid.ColumnDefinitions>
     
                                            <TextBlock Text="{Binding Label}" Grid.Column="0"
     
                                                       HorizontalAlignment="Left" Foreground="White" Background="Transparent"/>
     
                                            <TextBlock Grid.Column="2"
     
                                                       HorizontalAlignment="Right" Foreground="White" Background="Transparent">
     
                                                <TextBlock.Text>
     
                                                    <!--<MultiBinding StringFormat="{}{0:0.00}M€({1:P2})" >-->
     
                                                    <!--<Binding Path="Value" />-->
     
                                                    <MultiBinding StringFormat="{}{0:P2}" >
     
                                                        <Binding Path="PercentageAncestor" />
     
                                                    </MultiBinding>
     
                                                </TextBlock.Text>
     
                                            </TextBlock>
     
                                        </Grid>
     
                                    </DataTemplate>
     
                                </ListView.ItemTemplate>
     
                            </ListView>
     
                        </StackPanel>
     
                    </StackPanel>
     
                </Border>
     
            </DataTemplate>
     
        </telerikui:RadPieChart.TooltipTemplate>
     
        <telerikui:RadPieChart.SmartLabelsStrategy>
     
            <telerikcv:PieChartSmartLabelsStrategy DisplayMode="Spider"/>
     
        </telerikui:RadPieChart.SmartLabelsStrategy>
     
    </telerikui:RadPieChart>

     

    How can I set the show duration on the right tooltip?

    Thank,

    Giorgio

  2. Martin
    Admin
    Martin avatar
    1099 posts

    Posted 24 Jun 2015 Link to this post

    Hello Giorgio,

    Thank you for the code. I used it to test the reported issue but I wasn't able to reproduce a behavior where second tooltip occurs. Using the ShowDuration property is the way to adjust the tooltip's display duration. However, can you prepare an isolated project demonstrating the described behavior and send it over? This will allow me to test it locally and investigate what is causing the issue.

    Thank you for any help you can provide.

    Regards,
    Martin
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top