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

Scrolling through tool tip data.

3 Answers 289 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Chelsey
Top achievements
Rank 1
Chelsey asked on 11 Nov 2010, 01:37 AM
Hi,
 I have a line chart that has several hundreds + points with mouse over tool tips that contain a little to a great deal of data.

My problem is that sometimes I have too much data contained inside of the tool tip and I am not able to see what is on the bottom.

Also sometimes the tool tip flashes on and off at a rapid rate and I am unable to see any of the data.

My question is: Can I add a list box or rich text box inside of the tool tip? Being able to scroll through the data would be great,
 as I would add even more data to it "maybe even 4+ paragraphs worth of data"

Please help,
Chelsey Smith

3 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 15 Nov 2010, 04:51 PM
Hello Chelsey,

You can place any content within the item tooltips in RadChart. Please, check this online example (link to XBAP) showing how to place custom content in RadChart item tooltip -- in this case there is another RadChart inserted.

Kind regards,
Ves
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Chelsey
Top achievements
Rank 1
answered on 15 Nov 2010, 08:40 PM
Hi, 
 The problem with you example is that it is a chart within a chart and for some reason its not compatible with what I'm doing.

<--- your XAML
<telerik:ChartTitle x:Name="chartTitle2" Content="Monthly Sales for 2008"
        Grid.Row="2" Style="{StaticResource CustomTitleStyle}" />
 
<telerik:ChartArea x:Name="ChartArea2"
        ItemToolTipOpening="ChartArea2_ItemToolTipOpening"
        ItemClick="ChartArea2_ChartItemClick" Grid.Row="3" >
</telerik:ChartArea>


<--- my XAML
<telerikChart:RadChart x:Name="newAmpChart"  Margin="210.5,15,15,128.5" AxisElementBrush="White" AxisForeground="White" BorderBrush="Black" BorderThickness="3" Foreground="#FF7D12ED" FontSize="13.333" Background="#43000000" FontWeight="Bold" ToolTipOpening="newAmpChart_ToolTipOpening" 
        <telerikChart:RadChart.Effect>
            <DropShadowEffect BlurRadius="7" ShadowDepth="2"/>
        </telerikChart:RadChart.Effect>
        
    </telerikChart:RadChart>
your "chartarea" is not what I'm using and would require me to completely re-do my entire charting function.

I also added this event like you showed and its not working.
Private Sub newAmpChart_ToolTipOpening(ByVal sender As Object, ByVal e As System.Windows.Controls.ToolTipEventArgs)
    MsgBox("test")
End Sub
 This event is never being hit. I'm not sure why.


I've been trying to add the a ListBox or RTB into this event---
For Each y In sortAmps
                linePointCount += 1
 
                '/// this is where we add the new values to the line chart
                Dim dptest As New DataPoint
 
                dptest.YValue = y.testResults
                dptest.XValue = linePointCount
                dptest.Tooltip = Master.testType & ": " & y.testResults & vbLf & "Time Tested: " & y.testTime & vbLf & y.tester & vbLf & vbLf & y.printScreen
 
                series_test.Add(dptest)
 
            Next

 It would be ideal if I could just add something in that block of code.



Sorry for the clutter.
Is there anyway I can add the RTB or ListView without re-doing lots of my work?

Or if you can point me in the direction of getting mouseover event or toolTipOpen event to work so that way I can
send the data contained within the tooltip to another function and I can build my own custom tooltip.
 I just want the data within the tooltip, if we cant get the listView inside of it. 

Thanks,
Chelsey Smith
   <telerikChart:RadChart x:Name="newAmpChart"  Margin="210.5,15,15,128.5" AxisElementBrush="White" AxisForeground="White" BorderBrush="Black" BorderThickness="3" Foreground="#FF7D12ED" FontSize="13.333" Background="#43000000" FontWeight="Bold" ToolTipOpening="newAmpChart_ToolTipOpening"  >  
<telerikChart:RadChart.Effect>
<DropShadowEffect BlurRadius="7" ShadowDepth="2"/>
</telerikChart:RadChart.Effect>
           
        </telerikChart:RadChart>
   <telerikChart:RadChart x:Name="newAmpChart"  Margin="210.5,15,15,128.5" AxisElementBrush="White" AxisForeground="White" BorderBrush="Black" BorderThickness="3" Foreground="#FF7D12ED" FontSize="13.333" Background="#43000000" FontWeight="Bold" ToolTipOpening="newAmpChart_ToolTipOpening"  >  
<telerikChart:RadChart.Effect>
<DropShadowEffect BlurRadius="7" ShadowDepth="2"/>
</telerikChart:RadChart.Effect>
           
        </telerikChart:RadCh
0
Ves
Telerik team
answered on 18 Nov 2010, 09:38 AM
Hi Chelsey,

I believe the ItemTooltipOpening provides the means to achieve your goal. Notice the name of the event -- ItemTooltipOpening (not TooltipOpening). Also, this event is exposed by ChartArea, not by RadChart. An alternative way of attaching it is in code:

newAmpChart.DefaultView.ChartArea.ItemToolTipOpening += new ItemToolTipEventHandler(ChartArea_ItemToolTipOpening);

Also note the prototype of the event handler, it should be like this:
void ChartArea_ItemToolTipOpening(ItemToolTip2D tooltip, ItemToolTipEventArgs e)

Best regards,
Ves
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
Chart
Asked by
Chelsey
Top achievements
Rank 1
Answers by
Ves
Telerik team
Chelsey
Top achievements
Rank 1
Share this question
or