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

RadChart not sizing to parent container

1 Answer 52 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Phil asked on 03 Oct 2012, 07:32 AM
I am having a problem with a Silverlight RadChart not sizing correctly to the parent container Grid Cell

With the below XAML you can see in the attached images that the chart goes outside the constraints of the grid cell in both Visual Studio and when running in IE9.

Is there an option I have to explicitly set to get the chart to size correctly?

            <Grid x:Name="TotalFaultCustomerGrid" Grid.Row="1">
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="Auto"/>
                <TextBlock x:Name="CutomerFaultsTitle" Grid.Row="0" Text="Total Faults By Customer" FontSize="20"
                                Foreground="#FFD8D0D0" Margin="5" VerticalAlignment="Center"
                                HorizontalAlignment="Center" TextAlignment="Center" />   
                <telerik:RadChart x:Name="FaultCountByCustomerChart" Grid.Row="1"
                                    ItemsSource="{Binding FaultCountByCustomer}">
                            <telerik:ItemMapping FieldName="Business" DataPointMember="XCategory"/>
                            <telerik:ItemMapping FieldName="Faults" DataPointMember="YValue"/>
                                <telerik:ChartLegend x:Name="ChartLegend1" Visibility="Collapsed"/>
                            <telerik:ChartDefaultView.ChartArea >
                                <telerik:ChartArea Margin="0,0,0,-0.994">
                                    <telerik:ChartArea.AxisY >
                                        <telerik:AxisY StripLinesVisibility="Collapsed"/>
                                        <telerik:AxisX LabelRotationAngle="80"/>

1 Answer, 1 is accepted

Sort by
Petar Marchev
Telerik team
answered on 05 Oct 2012, 07:40 AM
Hello Phil,

Thank you for the attached code snippet. You need to set the Height of the second row definition to star (* instead of Auto). Let us know how it goes.

All the best,
Petar Marchev
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Asked by
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question