Declaring X-Axis and Y-Axis throught Data Binding is not working

3 posts, 0 answers
  1. Adriano Machado
    Adriano Machado avatar
    2 posts
    Member since:
    Jan 2010

    Posted 02 Mar 2010 Link to this post

    Hi,

    I'm evaluating Telerik RadControls for Silverlight Q3 2009 SP2 for building a system monitoring dashboard.  I'm having trouble setting X-Axis step, minimum and maximum values using a binding expression.  The error I get is: AG_E_PARSER_BAD_PROPERTY_VALUE [Line: 34 Position: 57] (it points to the "Step={Binding Path=Step}" portion of the code).

    The entire XAML is as follow:

    <UserControl x:Class="RadChartView" 
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                 xmlns:telerikChart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting" 
                 xmlns:telerikCharting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting" 
                 mc:Ignorable="d" 
                 d:DesignWidth="640" 
                 d:DesignHeight="480"
     
        <telerikChart:RadChart x:Name="radChart" 
                               ItemsSource="{Binding Path=ItemsSource}"
            <telerikChart:RadChart.DefaultView> 
                <telerikCharting:ChartDefaultView> 
     
                    <telerikCharting:ChartDefaultView.ChartTitle> 
                        <telerikCharting:ChartTitle Content="{Binding Path=Title}" /> 
                    </telerikCharting:ChartDefaultView.ChartTitle> 
     
                    <telerikCharting:ChartDefaultView.ChartLegend> 
                        <telerikCharting:ChartLegend x:Name="chartLegend" UseAutoGeneratedItems="True" Header="" /> 
                    </telerikCharting:ChartDefaultView.ChartLegend> 
     
                    <telerikCharting:ChartDefaultView.ChartArea> 
                        <telerikCharting:ChartArea LegendName="chartLegend"
                            <telerikCharting:ChartArea.AxisX> 
                                <telerikCharting:AxisX AutoRange="False" 
                                                       IsDateTime="True" 
                                                       DefaultLabelFormat="hh:mm:ss"  
                                                       LayoutMode="Normal" 
                                                       LabelStep="2" 
                                                       Title="Horário" 
                                                       Step="{Binding Path=STEP}" 
                                                       MaxValue="{Binding Path=MAXVALUE}" 
                                                       MinValue="{Binding Path=MINVALUE}" 
                                                       LabelRotationAngle="-45"
                                </telerikCharting:AxisX> 
                            </telerikCharting:ChartArea.AxisX> 
                        </telerikCharting:ChartArea> 
                    </telerikCharting:ChartDefaultView.ChartArea> 
     
                </telerikCharting:ChartDefaultView> 
                 
            </telerikChart:RadChart.DefaultView> 
        </telerikChart:RadChart> 
     
    </UserControl> 
     

    The data context is set to a viewmodel class, containing the data to be used.

    Can someone point me what I am missing?

    Thanks.

  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 04 Mar 2010 Link to this post

    Hello Adriano Machado,

    I am afraid, this is a limitation imposed by the Silverlight framework. In Silverlight the binding target can be a DependencyProperty of a FrameworkElement only (not a DependencyObject) and the chart axes are generic DependencyObjects.

    Silverlight 4 will loosen these restrictions on binding targets and we will certainly look into supporting this in one of the future versions of the control. Please, accept our apologies for the inconvenience caused.


    Sincerely,
    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.
  3. Adriano Machado
    Adriano Machado avatar
    2 posts
    Member since:
    Jan 2010

    Posted 04 Mar 2010 Link to this post

    Is there any way to overcome this limitation by, for instance, implementing an event handler or using a data behavior, such as those available at http://expressionblend.codeplex.com ?
Back to Top