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

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

2 Answers 97 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Adriano Machado
Top achievements
Rank 1
Adriano Machado asked on 02 Mar 2010, 05:24 PM
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 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 04 Mar 2010, 01:37 PM
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.
0
Adriano Machado
Top achievements
Rank 1
answered on 04 Mar 2010, 05:36 PM
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 ?
Tags
Chart
Asked by
Adriano Machado
Top achievements
Rank 1
Answers by
Ves
Telerik team
Adriano Machado
Top achievements
Rank 1
Share this question
or