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

Chart shows "No Data Series" after upgrading from Q1 to Q2 SP1

1 Answer 90 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Jason Moore
Top achievements
Rank 1
Jason Moore asked on 27 Oct 2011, 04:50 AM
Hi.

We're trying to upgrade from the Q1 library to the Q2 SP1 libraries to get rid of nasty "Layout cycle exception" in our chart views.
However, when referencing the new assemblies, the charts now show "No Data Series" !
The view model still populates the data as before.
It seems like there was a breaking change in the API but I'm not sure how to pinpoint what the issue is.

Any help would be much appreciated.

Thanks

Edit: 

Here is the xaml markup:
<telerik:RadChart x:Name="uc_TChart"
                          Background="Transparent"
                          UseDefaultLayout="False"
                          ItemsSource="{Binding Path=Series, Mode=OneWay, Converter={StaticResource ResourceKey=cv_ToTelerikDataConverter}}"
                          SeriesMappings="{Binding Path=Series, Mode=OneWay, Converter={StaticResource ResourceKey=cv_ToTelerikDefinitionConverter}}"
                          Visibility="{Binding Path=IsChartVisible, Mode=OneWay, Converter={StaticResource ResourceKey=cv_BoolToCollapsedVisibilityConverter}}"
                          DataBound="uc_TChart_DataBound"
                          Loaded="uc_TChart_Loaded"
                          Width="{Binding Path=ChartState.ActualWidth, Mode=OneWay}"
                          Height="{Binding Path=ChartState.ActualHeight, Mode=OneWay}"
                          VerticalAlignment="Center"
                          HorizontalAlignment="Center"
                          Margin="0,0,5,0">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="{Binding Path=ChartState.AdditionalPanes, Converter={StaticResource ResourceKey=cv_PaneToSizeConverter}, ConverterParameter={StaticResource rs_PrimaryPane_Index}}" />
                        <RowDefinition Height="{Binding Path=ChartState.AdditionalPanes, Converter={StaticResource ResourceKey=cv_PaneToSizeConverter}, ConverterParameter={StaticResource rs_SecondaryPane_Index}}" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
 
                    <Border x:Name="uc_ChartTitleBorder"
                        Background="{Binding Path=ChartState.ChartTitle.Background, Mode=OneWay, Converter={StaticResource ResourceKey=cv_ToSolidBrushConverter}}"
                        CornerRadius="3"
                        Margin="35,5,35,0"
                        Grid.Row="0"
                        Grid.Column="0"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Stretch">
                        <TextBlock x:Name="uc_ChartTitle"
                               TextWrapping="Wrap"
                               Margin="3"
                               Text="{Binding Path=ChartState.ChartTitle.Content, Mode=OneWay}"
                               TextAlignment="Center"
                               FontFamily="{Binding Path=ChartState.ChartTitle.Font.Family, Mode=OneWay, Converter={StaticResource ResourceKey=cv_ToFontFamilyConverter}}"
                               FontSize="{Binding Path=ChartState.ChartTitle.Font.Size, Mode=OneWay}"
                               Foreground="{Binding Path=ChartState.ChartTitle.Font.Color, Mode=OneWay, Converter={StaticResource ResourceKey=cv_ToSolidBrushConverter}}"
                               FontWeight="{Binding Path=ChartState.ChartTitle.Font.Format, Mode=OneWay, Converter={StaticResource ResourceKey=cv_ToFontWeightConverter}}" />
                    </Border>
 
                    <Border x:Name="uc_ChartSubtitleBorder"
                        Background="{Binding Path=ChartState.ChartSubtitle.Background, Mode=OneWay, Converter={StaticResource ResourceKey=cv_ToSolidBrushConverter}}"
                        CornerRadius="3"
                        Margin="35,0"
                        Grid.Row="1"
                        Grid.Column="0"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Stretch">
                        <TextBlock x:Name="uc_ChartSubtitle"
                               TextWrapping="Wrap"
                               Margin="3"
                               Text="{Binding Path=ChartState.ChartSubtitle.Content, Mode=OneWay}"
                               TextAlignment="Center"
                               FontFamily="{Binding Path=ChartState.ChartSubtitle.Font.Family, Mode=OneWay, Converter={StaticResource ResourceKey=cv_ToFontFamilyConverter}}"
                               FontSize="{Binding Path=ChartState.ChartSubtitle.Font.Size, Mode=OneWay}"
                               Foreground="{Binding Path=ChartState.ChartSubtitle.Font.Color, Mode=OneWay, Converter={StaticResource ResourceKey=cv_ToSolidBrushConverter}}"
                               FontWeight="{Binding Path=ChartState.ChartSubtitle.Font.Format, Mode=OneWay, Converter={StaticResource ResourceKey=cv_ToFontWeightConverter}}"
 />
                    </Border>
 
                    <telerik:ChartArea x:Name="uc_ChartArea_Primary"
                                       Grid.Row="2"
                                       Grid.Column="0"
                                       Margin="5,0"
                                       MouseRightButtonDown="uc_ChartArea_Primary_MouseRightButtonDown"
                                       EnableAnimations="False"
                                       EnableStripLinesAnimation="False"
                                       EnableTransitionAnimations="False"
                                       LegendName="uc_Legend"
                                       SmartLabelsEnabled="True"
                                       ItemWidthPercent="{Binding Path=ChartState.ItemWidthPercentage, Mode=OneWay, FallbackValue=100}"
                                       NoDataString="{Binding Path=DataStatus, Mode=OneWay}"
                                       MouseLeftButtonUp="uc_ChartArea_Primary_MouseLeftButtonUp"
                                       SizeChanged="uc_ChartArea_Primary_SizeChanged"
                                       NoDataControlStyle="{StaticResource NoDataControlStyle}"
                                       Padding="{Binding ChartState.MainPane.Padding}">
                        <telerik:ChartArea.Resources>
                            <!-- Resources for fixing label rotation issues -->
                            <Style TargetType="TextBlock"
                                   x:Key="XLabelStyleHorizontal"
                                   BasedOn="{StaticResource XLabelStyleHorizontal}" />
                            <Style TargetType="TextBlock"
                                   x:Key="XLabelStyleVertical"
                                   BasedOn="{StaticResource XLabelStyleVertical}" />
                            <Style TargetType="TextBlock"
                                   x:Key="XLabelStyleAngled"
                                   BasedOn="{StaticResource XLabelStyleAngled}" />
                            <Style TargetType="telerik:LayoutTransformControl"
                                   BasedOn="{StaticResource LayoutTransformControlStyle}" />
                        </telerik:ChartArea.Resources>
                        <telerik:ChartArea.AxisX>
                            <telerik:AxisX x:Name="uc_XAxis_Primary"
                                       Title="{Binding Path=ChartState.XAxis.Title.Content, Mode=OneWay}"
                                       AutoRange="{Binding Path=ChartState.XAxis.IsAutoRange, Mode=OneWay}"
                                       MinValue="{Binding Path=ChartState.XAxis.MinValue, Mode=OneWay}"
                                       MaxValue="{Binding Path=ChartState.XAxis.MaxValue, Mode=OneWay}"
                                       Step="{Binding Path=ChartState.XAxis.Step, Mode=OneWay}"
                                       MinorTickPointMultiplier="5"
                                       />
                            <!--LabelStep="{Binding Path=ChartState.XAxis.LabelStep, Mode=OneWay}"
                            StepLabelLevelCount="{Binding Path=ChartState.XAxis.LabelLevel, Mode=OneWay}"-->
                        </telerik:ChartArea.AxisX>
                        <telerik:ChartArea.AxisY>
                            <telerik:AxisY x:Name="uc_Y1Axis_Primary"
                                       AxisName="rc_Y1Axis_Primary"
                                       Title="{Binding Path=ChartState.MainPane.Y1Axis.Title.Content, Mode=OneWay}"
                                       Visibility="{Binding Path=ChartState.MainPane.Y1Axis.IsVisible, Mode=OneWay, Converter={StaticResource ResourceKey=cv_BoolToCollapsedVisibilityConverter}}"
                                       AutoRange="{Binding Path=ChartState.MainPane.Y1Axis.IsAutoRange, Mode=OneWay}"
                                       MinValue="{Binding Path=ChartState.MainPane.Y1Axis.MinValue, Mode=OneWay}"
                                       MaxValue="{Binding Path=ChartState.MainPane.Y1Axis.MaxValue, Mode=OneWay}"
                                       Step="{Binding Path=ChartState.MainPane.Y1Axis.Step, Mode=OneWay}"
                                       MinorTickPointMultiplier="5" />
                        </telerik:ChartArea.AxisY>
                        <telerik:ChartArea.AdditionalYAxes>
                            <telerik:AxisY x:Name="uc_Y2Axis_Primary"
                                       AxisName="rc_Y2Axis_Primary"
                                       Title="{Binding Path=ChartState.MainPane.Y2Axis.Title.Content, Mode=OneWay}"
                                       Visibility="{Binding Path=ChartState.MainPane.Y2Axis.IsVisible, Mode=OneWay, Converter={StaticResource ResourceKey=cv_BoolToCollapsedVisibilityConverter}}"
                                       AutoRange="{Binding Path=ChartState.MainPane.Y2Axis.IsAutoRange, Mode=OneWay}"
                                       MinValue="{Binding Path=ChartState.MainPane.Y2Axis.MinValue, Mode=OneWay}"
                                       MaxValue="{Binding Path=ChartState.MainPane.Y2Axis.MaxValue, Mode=OneWay}"
                                       Step="{Binding Path=ChartState.MainPane.Y2Axis.Step, Mode=OneWay}"
                                       MinorTickPointMultiplier="5" />
                        </telerik:ChartArea.AdditionalYAxes>
                        <telerik:ChartArea.ZoomScrollSettingsX>
                            <telerik:ZoomScrollSettings x:Name="uc_XZoom"
                                                    ScrollMode="ScrollAndZoom"
                                                    PropertyChanged="uc_XZoom_PropertyChanged" />
                        </telerik:ChartArea.ZoomScrollSettingsX>
                        <telerik:ChartArea.ZoomScrollSettingsY>
                            <telerik:ZoomScrollSettings x:Name="uc_YZoom"
                                                    ScrollMode="ScrollAndZoom"
                                                    PropertyChanged="uc_YZoom_PropertyChanged" />
                        </telerik:ChartArea.ZoomScrollSettingsY>
 
                    </telerik:ChartArea>
 
                    <telerik:ChartArea x:Name="uc_ChartArea_Secondary"
                                       Grid.Row="3"
                                       Margin="5"
                                       LegendName="uc_Legend"
                                       Visibility="{Binding Path=ChartState.AdditionalPanes, Converter={StaticResource ResourceKey=cv_PaneToVisibilityConverter}, ConverterParameter={StaticResource rs_SecondaryPane_Index}}"
                                       SizeChanged="uc_ChartArea_Secondary_SizeChanged"
                                       NoDataControlStyle="{StaticResource NoDataControlStyle}"
                                       Padding="{Binding ChartState.MainPane.Padding}">
                        <telerik:ChartArea.Resources>
                            <!-- Resources for fixing label rotation issues -->
                            <Style TargetType="TextBlock"
                                   x:Key="XLabelStyleHorizontal"
                                   BasedOn="{StaticResource XLabelStyleHorizontal}" />
                            <Style TargetType="TextBlock"
                                   x:Key="XLabelStyleVertical"
                                   BasedOn="{StaticResource XLabelStyleVertical}" />
                            <Style TargetType="TextBlock"
                                   x:Key="XLabelStyleAngled"
                                   BasedOn="{StaticResource XLabelStyleAngled}" />
                            <Style TargetType="telerik:LayoutTransformControl"
                                   BasedOn="{StaticResource LayoutTransformControlStyle}" />
                        </telerik:ChartArea.Resources>
                        <telerik:ChartArea.AxisX>
                            <telerik:AxisX x:Name="uc_XAxisSecondary"
                                       AxisName="uc_XAxis_Secondary"
                                       AutoRange="True"
                                       Visibility="Collapsed"
                                       LabelStep="{Binding Path=ChartState.XAxis.LabelStep, Mode=OneWay}"
                                       StepLabelLevelCount="{Binding Path=ChartState.XAxis.LabelLevel, Mode=OneWay}"
                                       />
                        </telerik:ChartArea.AxisX>
                        <telerik:ChartArea.AxisY>
                            <telerik:AxisY x:Name="rc_Y1Axis_Secondary"
                                       Visibility="Visible"
                                       AxisName="rc_Y1Axis_Secondary"
                                       Title="{Binding Path=ChartState.AdditionalPanes[1].Y1Axis.Title.Content, Mode=OneWay, FallbackValue=Unknown}"
                                       AutoRange="{Binding Path=ChartState.AdditionalPanes[1].Y1Axis.IsAutoRange, Mode=OneWay, FallbackValue=True}"
                                       MinValue="{Binding Path=ChartState.AdditionalPanes[1].Y1Axis.MinValue, Mode=OneWay, FallbackValue=0}"
                                       MaxValue="{Binding Path=ChartState.AdditionalPanes[1].Y1Axis.MaxValue, Mode=OneWay, FallbackValue=1}"
                                       Step="{Binding Path=ChartState.AdditionalPanes[1].Y1Axis.Step, Mode=OneWay, FallbackValue=0.5}"
                                       MinorTickPointMultiplier="5" />
                        </telerik:ChartArea.AxisY>
                    </telerik:ChartArea>
 
                    <telerik:ChartLegend x:Name="uc_Legend"
                                     
                                     Visibility="{Binding Path=Legend.IsVisible, Mode=OneWay, Converter={StaticResource ResourceKey=cv_BoolToCollapsedVisibilityConverter}}"
                                     UseAutoGeneratedItems="True"
                                     Margin="35,0,35,5"
                                     Grid.Row="4"
                                     Grid.Column="0"
                                     Background="Transparent"
                                     BorderBrush="Transparent"
                                     Header=""
                                     VerticalAlignment="Stretch"
                                     HorizontalAlignment="Stretch"
                                     ReverseLegendItemsOrder="{Binding Path=ChartState.IsInvertLegendItems, Mode=OneWay}" LayoutUpdated="uc_Legend_LayoutUpdated"
                                    >
                        <telerik:ChartLegend.ItemsPanel>
                            <ItemsPanelTemplate>
                                <telerik:RadWrapPanel Orientation="Horizontal"
                                                  HorizontalAlignment="Center" />
                            </ItemsPanelTemplate>
                        </telerik:ChartLegend.ItemsPanel>
                    </telerik:ChartLegend>
                </Grid>
 
                <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu ItemsSource="{Binding Path = ContextMenu.Commands}"
                                        ItemTemplate="{StaticResource MenuItemTemplate}" />
                </telerik:RadContextMenu.ContextMenu>
 
            </telerik:RadChart>

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 28 Oct 2011, 03:19 PM
Hi Jason Moore,

I have replied the support ticket you have started. For the sake of completeness, here is my reply:

Please, find attached a small example, based on the details you have provided. There is something I need to point: when using non-default layout with RadChart, the SeriesMapping objects should be configured correctly regarding the ChartArea they will be displayed in. That is, you are required to set either SeriesMapping.ChartArea or SeriesMapping.ChartAreaName property. This is done in my example and it works as expected. Of course, it is simplified, so that is uses a SeriesMappingCollection and data source, directly created in my datacontext, rather than produced by an IValueConverter. Still, I believe this covers the case with  "No Data Series" displayed.

Kind regards,
Ves
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Chart
Asked by
Jason Moore
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or