Community discussion forum

Columnseries question & theme question

  • 4 months ago

    Hi, I have some layout questions, my databindings worked excellent, so great job guys!

    The thing is, I am using a couple of charts, and I want them to stretch themself according to the page, this works horizontally, but not vertically.

    I use the following xaml code:

    ]]> ]]>

    What am I doing wrong?

    By the way, I have one other question. Does some1 have the code of the backgroundgradient of the shiny blue theme? I need to make the same background colour. Or is there a way to override the colors shiny blue theme gives to Charts? (Cuz they're ugly as hell :P)

    Thanks gosu's

    Post was edited on 26/06/2009 11:31:04 Report abuse
  • 4 months ago
    <Grid.RowDefinitions>
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width=".5*" />
                <ColumnDefinition Width=".5*" />
            </Grid.ColumnDefinitions>
            <StackPanel Grid.Row="0" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10">
                <chartingToolkit:Chart x:Name="columnChart1">
                    <chartingToolkit:Chart.LegendStyle>
                        <Style TargetType="Control">
                            <Setter Property="Width" Value="0"/>
                            <Setter Property="Height" Value="0"/>
                        </Style>
                    </chartingToolkit:Chart.LegendStyle>
                    <chartingToolkit:Chart.Series>
                        <chartingToolkit:ColumnSeries
                        IndependentValueBinding="{Binding Name}"
                        DependentValueBinding="{Binding Value}"
                        IsSelectionEnabled="True" />
                        <chartingToolkit:ColumnSeries
                        IndependentValueBinding="{Binding Name}"
                        DependentValueBinding="{Binding Value}"
                        IsSelectionEnabled="True" />
                        <chartingToolkit:ColumnSeries
                        IndependentValueBinding="{Binding Name}"
                        DependentValueBinding="{Binding Value}"
                        IsSelectionEnabled="True" />
                    </chartingToolkit:Chart.Series>
                </chartingToolkit:Chart>
            </StackPanel>
            <StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10">
                <chartingToolkit:Chart x:Name="columnChart2">
                    <chartingToolkit:Chart.LegendStyle>
                        <Style TargetType="Control">
                            <Setter Property="Width" Value="0"/>
                            <Setter Property="Height" Value="0"/>
                        </Style>
                    </chartingToolkit:Chart.LegendStyle>
                    <chartingToolkit:Chart.Series>
                        <chartingToolkit:ColumnSeries
                                IndependentValueBinding="{Binding Name}"
                                DependentValueBinding="{Binding Value}"
                                IsSelectionEnabled="True" />
                        <chartingToolkit:ColumnSeries
                                IndependentValueBinding="{Binding Name}"
                                DependentValueBinding="{Binding Value}"
                                IsSelectionEnabled="True" />
                        <chartingToolkit:ColumnSeries
                                IndependentValueBinding="{Binding Name}"
                                DependentValueBinding="{Binding Value}"
                                IsSelectionEnabled="True" />
                    </chartingToolkit:Chart.Series>
                </chartingToolkit:Chart>
            </StackPanel>
    

Post a reply

Enter your message below

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback