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

Multiple RadCharts aligned horizontally

2 Answers 41 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Markus Braunschweiler
Top achievements
Rank 1
Markus Braunschweiler asked on 08 Dec 2011, 08:12 AM
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 Answers, 1 is accepted

Sort by
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 08 Dec 2011, 02:18 PM
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.
0
Markus Braunschweiler
Top achievements
Rank 1
answered on 09 Dec 2011, 08:03 AM
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? 


Tags
Chart
Asked by
Markus Braunschweiler
Top achievements
Rank 1
Answers by
Bartholomeo Rocca
Top achievements
Rank 1
Markus Braunschweiler
Top achievements
Rank 1
Share this question
or