telerikChartSpecialized:TrackBallInfoControl error

5 posts, 0 answers
  1. T
    T avatar
    3 posts
    Member since:
    Apr 2014

    Posted 17 Apr 2014 Link to this post

    I've been unable to recreate the Trackball sample as provided in the help document. I receive two errors related to this code:

    <telerikChart:RadCartesianChart.TrackBallInfoStyle>
        <Style TargetType="telerikChartSpecialized:TrackBallInfoControl">
          <Setter Property="HeaderTemplate">
            <Setter.Value>
              <DataTemplate>
                <TextBlock Text="{Binding}" FontSize="23" Foreground="{StaticResource PhoneBackgroundBrush}" />
              </DataTemplate>
            </Setter.Value>
          </Setter>
        </Style>
      </telerikChart:RadCartesianChart.TrackBallInfoStyle>

    Error 1: The namespace prefix "telerikChartSpecialized is not defined.
    Error 2: TrackBallInfoControl is not supported in a Silverlight project.

    Can someone please provide a functioning sample for this chart feature?

    Thanks!
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 22 Apr 2014 Link to this post

    Hello T Hinderdach,

    Thanks for writing.
    The TrackballInfoControl resides in the Telerik.Windows.Controls.Chart namespace. You XAML namespace should look like this:
    xmlns:telerikChartSpecialized="clr-namespace:Telerik.Windows.Controls.Chart;assembly=Telerik.Windows.Controls.Chart"

    Regards,
    Victor
    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.

     
  3. DevCraft banner
  4. T
    T avatar
    3 posts
    Member since:
    Apr 2014

    Posted 22 Apr 2014 in reply to Victor Link to this post

    Thanks, Victor! That did fix the errors I was receiving. However, I'm still having trouble getting the sample to work, using even the simplest code from the help docs. I don't expect to see info, but shouldn't I be seeing a TrackBallControl with the code below?
    <phone:PhoneApplicationPage
        x:Class="TelerikWindowsPhoneApp1.MainPage"
        xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
        xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
        mc:Ignorable="d"
        xmlns:telerikChart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Chart"
        xmlns:telerikChartEngine="clr-namespace:Telerik.Charting;assembly=Telerik.Windows.Controls.Chart"
        xmlns:telerikChartSpecialized="clr-namespace:Telerik.Windows.Controls.Chart;assembly=Telerik.Windows.Controls.Chart"
        xmlns:local="clr-namespace:TelerikWindowsPhoneApp1"
        FontFamily="{StaticResource PhoneFontFamilyNormal}"
        FontSize="{StaticResource PhoneFontSizeNormal}"
        Foreground="{StaticResource PhoneForegroundBrush}"
        SupportedOrientations="Portrait" Orientation="Portrait"
        shell:SystemTray.IsVisible="True">
     
     
        <!--LayoutRoot is the root grid where all page content is placed-->
        <Grid x:Name="LayoutRoot" Background="Transparent">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
     
            <!--TitlePanel contains the name of the application and page title-->
            <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
                <TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/>
                <TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
            </StackPanel>
     
            <!--ContentPanel - place additional content here-->
            <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
     
                <telerikChart:RadCartesianChart>
                     
                    <telerikChart:RadCartesianChart.Behaviors>
                        <telerikChart:ChartTrackBallBehavior ShowIntersectionPoints="True"
                                                             ShowTrackInfo="False" />
                    </telerikChart:RadCartesianChart.Behaviors>
                     
                    <telerikChart:RadCartesianChart.HorizontalAxis>
                        <telerikChart:LinearAxis />
                    </telerikChart:RadCartesianChart.HorizontalAxis>
                     
                    <telerikChart:RadCartesianChart.VerticalAxis>
                        <telerikChart:LinearAxis />
                    </telerikChart:RadCartesianChart.VerticalAxis>
                     
                    <telerikChart:ScatterLineSeries>
                        <telerikChart:ScatterLineSeries.TrackBallTemplate>
                            <DataTemplate>
                                <Rectangle Width="20" Height="20"
                                           Fill="{StaticResource PhoneForegroundBrush}"
                                           RenderTransformOrigin="0.5,0.5">
                                    <Rectangle.RenderTransform>
                                        <RotateTransform Angle="45" />
                                    </Rectangle.RenderTransform>
                                </Rectangle>
                            </DataTemplate>
                        </telerikChart:ScatterLineSeries.TrackBallTemplate>
                         
                        <telerikChartEngine:ScatterDataPoint XValue="5" YValue="5" />
                        <telerikChartEngine:ScatterDataPoint XValue="15" YValue="5" />
                        <telerikChartEngine:ScatterDataPoint XValue="20" YValue="5" />
                    </telerikChart:ScatterLineSeries>
                 
                </telerikChart:RadCartesianChart>
     
            </Grid>
     
        </Grid>
     
    </phone:PhoneApplicationPage>
  5. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 24 Apr 2014 Link to this post

    Hi T Hinderdach,

    I used your code in a project and it works perfectly. The trackball should appear when you hold on the chart for about 2 seconds. Please, let us know if this does not happen. It will be best to send us a sample project that reproduces the issue and we will further investigate where this problem comes from.

    I look forward to your reply.

    Regards,
    Rosy Topchiyska
    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.

     
  6. T
    T avatar
    3 posts
    Member since:
    Apr 2014

    Posted 24 Apr 2014 in reply to Rosy Topchiyska Link to this post

    Yep, same problem (as support ticket), different control - I need to hold longer. 

    Thanks again, and sorry for any inconvenience. :)
Back to Top
DevCraft banner