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

RadCartesianChart - Exception when resizing

2 Answers 48 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Sarper
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"
                
            <chart:RadCartesianChart.Behaviors
                <chartView:ChartTooltipBehavior Placement="MousePoint" HorizontalOffset="-6" VerticalOffset="1" /> 
            </chart:RadCartesianChart.Behaviors
    
            <chartView:BarSeries ValueBinding="Count" CategoryBinding="Username"             ItemsSource="{BindingElementName=ChartDataSource}"
                                 ShowLabels="True" FontSize="12" /> 
                
            <telerik:RadCartesianChart.HorizontalAxis
                <telerik:LinearAxis  Maximum="1000" Minimum="0"/> 
            </telerik:RadCartesianChart.HorizontalAxis
            <telerik:RadCartesianChart.VerticalAxis
                <telerik:CategoricalAxis  HorizontalLocation="Left"/> 
            </telerik:RadCartesianChart.VerticalAxis
            <telerik:RadCartesianChart.Grid
                <telerik:CartesianChartGrid MajorLinesVisibility="X" StripLinesVisibility="X"  /> 
            </telerik:RadCartesianChart.Grid
        </telerik:RadCartesianChart>

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">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Grid />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>

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,

Sarper

2 Answers, 1 is accepted

Sort by
0
Giuseppe
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.


Greetings,
Giuseppe
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sarper
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,
Sarper
Tags
ChartView
Asked by
Sarper
Top achievements
Rank 2
Answers by
Giuseppe
Telerik team
Sarper
Top achievements
Rank 2
Share this question
or