Search code examples
.netxamlchartssilverlight-toolkitbar-chart

Horizontal chart bars (Silverlight Toolkit)


Is it possible to show bars horizontally?

  <Grid x:Name="LayoutRoot" Background="White">
        <StackPanel>
            <toolkit:Chart Height="400" Width="600" Title="Mered data" >              
                    <toolkit:ColumnSeries ItemsSource="{Binding AverageImpressionLengths}" IndependentValueBinding="{Binding SeqName}"
                                          DependentValueBinding="{Binding Time}"  
                                          HorizontalAlignment="Left" Height="304" VerticalAlignment="Top" Width="266"/>

            </toolkit:Chart>
        </StackPanel>
    </Grid>

Solution

  • Yes, it is possible, you should just replace ColumnSeries by BarSeries:

    <toolkit:Chart Height="400" Width="600" Title="Mered data" >              
        <toolkit:BarSeries ItemsSource="{Binding AverageImpressionLengths}" 
                IndependentValueBinding="{Binding SeqName}"
                DependentValueBinding="{Binding Time}"  />
    </toolkit:Chart>