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

RadCartesianChart - Exception when resizing

2 Answers 99 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 2
Sarper asked on 24 Aug 2012, 08:51 AM

<telerik:ChartDataSource x:Name="ChartDataSource" ItemsSource="{Binding BarData}" /> 
        <telerik:RadCartesianChart Grid.Column="1" x:Name="RadChart1" HorizontalAlignment="Stretch" telerik:StyleManager.Theme="Metro"
                                   VerticalAlignment="Stretch" FontSize="12" FontFamily="Segoe UI"
                <chartView:ChartTooltipBehavior Placement="MousePoint" HorizontalOffset="-6" VerticalOffset="1" /> 
            <chartView:BarSeries ValueBinding="Count" CategoryBinding="Username"             ItemsSource="{BindingElementName=ChartDataSource}"
                                 ShowLabels="True" FontSize="12" /> 
                <telerik:LinearAxis  Maximum="1000" Minimum="0"/> 
                <telerik:CategoricalAxis  HorizontalLocation="Left"/> 
                <telerik:CartesianChartGrid MajorLinesVisibility="X" StripLinesVisibility="X"  /> 

Hello Telerik Team,

  I am using your controls and they are nice. But i have an issue with RadCartesianChart.

Issue : I need to resize window and whole application to make it flexible to all screens.

Using; Prism to hold regions in RadTileView.

   If i resize the window when no data in RadCatesianChart, everything is fine and no exceptions. But if i resize the window when there is data on RadCartesianChart, it causes that exception;

Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
konum System.Collections.Generic.Dictionary`2.get_Item(TKey key)
 konum System.Windows.ResourceManagerWrapper.GetResourceForUri(Uri xamlUri, Type componentType)

I am using that control to hold the region,

           <ItemsControl prism:RegionManager.RegionName="TopUsers_Region" Margin="5"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto">
<Grid />

Note: That exception not throwed when using RadPieChart with same controls.

Note: Resizing: resize browser and controls automatically resized

Can you help me to find out what is the problem?
Thank you,


2 Answers, 1 is accepted

Sort by
Telerik team
answered on 29 Aug 2012, 09:33 AM
Hello Sarper,

Unfortunately we were unable to reproduce the problematic behavior in our local tests. Please review the attached sample application that follows your guidelines and let us know if we are missing something out.

the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Top achievements
Rank 2
answered on 29 Aug 2012, 09:58 AM
Hello Giuseppe,

 I looked at your sample application and compared all files. But i saw that my other module(which i did not send for example) does not contain a definiton with ChartDataSource and using wrong List format. I resolved the issues with the control. They are working fine, now.
Thank you for your help and support.
Best wishes,
Asked by
Top achievements
Rank 2
Answers by
Telerik team
Top achievements
Rank 2
Share this question