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

How to set showduration for ChartViewSeries Tooltip

1 Answer 137 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Giorgio
Top achievements
Rank 1
Giorgio asked on 23 Jun 2015, 02:00 PM

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

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 24 Jun 2015, 12:07 PM
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
Tags
ChartView
Asked by
Giorgio
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or