This question is locked. New answers and comments are not allowed.
Hi,
I'm using version 2010.1.309.1030
I'm trying to use a custom layout for my chart (using the default layout with identical cod in all other respects works well. However with the custom layout I get the exception "RadChart does not support rendering of series with different orientation at the same time" whenever I attempt to change the charts ItemsSource property. I never add a series definition other than HorizontalBarSeriesDefinition.
The reason I want to use a custom layout is to have the grid style relative width layout, so the legend size changes with the windows size, so if there is a way to achieve this with the default layout, that can also be a good solution.
The custom layout is defined like:
And I'm adding new series like:
I'm using version 2010.1.309.1030
I'm trying to use a custom layout for my chart (using the default layout with identical cod in all other respects works well. However with the custom layout I get the exception "RadChart does not support rendering of series with different orientation at the same time" whenever I attempt to change the charts ItemsSource property. I never add a series definition other than HorizontalBarSeriesDefinition.
The reason I want to use a custom layout is to have the grid style relative width layout, so the legend size changes with the windows size, so if there is a way to achieve this with the default layout, that can also be a good solution.
The custom layout is defined like:
<charts:RadChart x:Name="Chart" UseDefaultLayout="false"> <charts:RadChart.DefaultSeriesDefinition> <charting:HorizontalBarSeriesDefinition /> </charts:RadChart.DefaultSeriesDefinition> <Grid> <Grid.RowDefinitions> <RowDefinition Height="*"></RowDefinition> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="3*"></ColumnDefinition> <ColumnDefinition Width="1*"></ColumnDefinition> </Grid.ColumnDefinitions> <charting:ChartArea x:Name="ChartArea" LegendName="ChartLegend" Grid.Row="0" Grid.Column="0" /> <charting:ChartLegend x:Name="ChartLegend" UseAutoGeneratedItems="True" Grid.Row="0" Grid.Column="1" /> </Grid></charts:RadChart>And I'm adding new series like:
SeriesMapping seriesMapping = new SeriesMapping();seriesMapping.ChartAreaName = ChartArea.Name;seriesMapping.LegendLabel = "Some Label";seriesMapping.SeriesDefinition = new HorizontalBarSeriesDefinition();seriesMapping.SeriesDefinition.ItemToolTipFormat = "#Y{#.##} % #DATAITEM.Category";seriesMapping.CollectionIndex = i++;seriesMapping.SeriesDefinition.ShowItemLabels = false;seriesMapping.SeriesDefinition.ShowItemToolTips = true;seriesMapping.ItemMappings.Add(new ItemMapping("Category", DataPointMember.XCategory));seriesMapping.ItemMappings.Add(new ItemMapping("Percentage", DataPointMember.YValue));Chart.SeriesMappings.Add(seriesMapping);