When i debug the LiveData example for Q3 2010 controls, the following debug message is printed every time a new data point is added:
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.Charting.ChartLegend', AncestorLevel='1''. BindingExpression:Path=LegendItemMarkerShape; DataItem=null; target element is 'ChartLegendItem' (Name=''); target property is 'MarkerShape' (type 'MarkerShape')
I'm getting the same error message when I use the same control in my project. Both the LiveData example and my project have explicitly set
ShowPointMarks="False"
in the series definition, therefore I'm uncertain why a debug message referencing LegendItemMarkerShape is being generated. Functionally, I'm not encountering any problems, but I'm uncertain whether I should be investigating this debug message. Any insight in what is causing these debug messages?
Kind regards,
Dave.
9 Answers, 1 is accepted
In Q3.2010 we have changed the mechanics for getting the marker shape of the legend item. These strange messages started to appear after that change and our developers tracked down and fixed the issue. You can get the fix in Q1.2011 SP1 or the latest build of Q1.2011. Please update your binaries accordingly and test if this output error appears again.
Greetings,Yavor Ivanov
the Telerik team

I can confirm that the Q1 2011 controls resolved the issued and I no longer receive the debug messages.
Kind regards,
Dave.

I get the same error with ver. 2011.2 712. And it's not fixed, isn't it?
I'm using this:
<
telerik:RadChart
ItemsSource
=
"{Binding ConnectionItems, Mode=OneWay}"
>
<
telerik:RadChart.DefaultView
>
<
telerik:ChartDefaultView
ChartLegendPosition
=
"Bottom"
>
<
telerik:ChartDefaultView.ChartArea
>
<
telerik:ChartArea
LegendName
=
"connLegend"
/>
</
telerik:ChartDefaultView.ChartArea
>
<
telerik:ChartDefaultView.ChartLegend
>
<
telerik:ChartLegend
x:Name
=
"connLegend"
Header
=
""
/>
</
telerik:ChartDefaultView.ChartLegend
>
</
telerik:ChartDefaultView
>
</
telerik:RadChart.DefaultView
>
<
telerik:RadChart.SeriesMappings
>
<
telerik:SeriesMapping
>
<
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:PieSeriesDefinition
>
<
telerik:PieSeriesDefinition.LabelSettings
>
<
telerik:RadialLabelSettings
ShowZeroValueLabels
=
"False"
/>
</
telerik:PieSeriesDefinition.LabelSettings
>
</
telerik:PieSeriesDefinition
>
</
telerik:SeriesMapping.SeriesDefinition
>
</
telerik:SeriesMapping
>
</
telerik:RadChart.SeriesMappings
>
</
telerik:RadChart
>

As I previously answered and I have now reconfirmed with Q2 2011, I am no longer receiving the debug messages in the LiveData example or my own solution.
Your XAML doesn't show how data is being populated into the chart control (other than
ItemsSource
=
"{Binding ConnectionItems, Mode=OneWay}"
). You'll need to provide the code you're using to populate the data to locate the problem you're encountering.Kind regards,
Dave.
Unfortunately we couldn't reproduce the problem using the code snippet that you have provided. Can you please provide more code as David suggested?
Regards,
Yavor Ivanov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Hi,
here is the model for my example. I think the problem is ObservableCollection and adding the items manually...
public
class
Model
{
public
struct
ConnectionItem
{
public
int
Count {
get
;
set
; }
public
string
Description {
get
;
set
; }
public
string
ToolTip {
get
{
return
string
.Format(
"{0}: {1}"
, Description, Count); } }
}
ObservableCollection<ConnectionItem> _connectionItems =
new
ObservableCollection<ConnectionItem>();
public
ObservableCollection<ConnectionItem> ConnectionItems
{
get
{
return
_connectionItems; }
}
public
void
Load()
{
for
(
int
i = 1; i < 6; i++)
_connectionItems.Add(
new
ConnectionItem { Count = i * 10, Description =
"Test"
+ i });
}
}
We created a small sample application using the code that you provided and unfortunately couldn't reproduce the output warnings problem. Can you please run the project in your environment and test for any warning messages in the Output?
Regards,Yavor
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

yes it works in Silverlight but not in WPF. Just tested it with Q1 2011 SP1.
I got following error:
System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.Charting.ChartLegend', AncestorLevel='1''. BindingExpression:Path=LegendItemMarkerShape; DataItem=null; target element is 'ChartLegendItem' (Name=''); target property is 'MarkerShape' (type 'MarkerShape')
We have logged this in our PITS system here. The responsible team is already notified and it will be handled in a timely manner. The reason why this strange message doesn't appear always is because it depends on the scenario. We encourage everyone that experiences this problem to comment on it in our PITS system.
Greetings,Yavor
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>