Multiple RadCharts aligned horizontally

3 posts, 0 answers
  1. Markus Braunschweiler
    Markus Braunschweiler avatar
    2 posts
    Member since:
    Jan 2009

    Posted 08 Dec 2011 Link to this post

    Im trying to create a xaml where i have 4 radcharts aligned horizontally.

    every chart should take 25% of the available space.

    any ideas how to do this?

    <StackPanel HorizontalAlignment="Stretch" Name="stackPanel1" Orientation="Horizontal">
                <telerik:RadChart Name="radChart1" />
                <telerik:RadChart Name="radChart2" />
                <telerik:RadChart Name="radChart3" />
                <telerik:RadChart Name="radChart4" />
    </StackPanel>
  2. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 08 Dec 2011 Link to this post

    Hello Markus,

    You can achieve the desired effect with Grid panel with four ColumnDefinitions:
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
     
        <telerik:RadChart x:Name="RadChart1" />
        <telerik:RadChart x:Name="RadChart2" Grid.Column="1" />
        <telerik:RadChart x:Name="RadChart3" Grid.Column="2" />
        <telerik:RadChart x:Name="RadChart4" Grid.Column="3" />
    </Grid>


    Greetings,
    Bart.
  3. Markus Braunschweiler
    Markus Braunschweiler avatar
    2 posts
    Member since:
    Jan 2009

    Posted 09 Dec 2011 Link to this post

    Hi Bartholomeo, thanks for the answer. 

    This works wonderful. But now i'm facing the next problem.  The next requirement now is, that the count of charts is unknown, so i should create a bindable MVVM construct. Any ideas? 


Back to Top