RadCartesianChart don't display annotations nad horizontal axis after series update.

2 posts, 0 answers
  1. Paul
    Paul avatar
    3 posts
    Member since:
    Nov 2014

    Posted 23 Dec 2014 Link to this post

    <telerik:RadCatresianChart x:Name="cartesianChart">
        <radchartview:RadCartesianChart.Behaviors>
            <chartview:ChartTrackBallBehavior ShowIntersectionPoints="True" />
        </radchartview:RadCartesianChart.Behaviors>
        <radchartview:RadCartesianChart.Annotations>
        <chartview:CartesianGridLineAnnotation Value="{Binding CurrentDate}" Axis="{Binding ElementName=horizontalAxis}" Stroke="Black" StrokeThickness="2">
            </chartview:CartesianGridLineAnnotation>
        </radchartview:RadCartesianChart.Annotations>
         <telerik:RadCartesianChart.SeriesProvider>
         <telerik:ChartSeriesProvider Source="{Binding SuppChart}">
              <telerik:ChartSeriesProvider.SeriesDescriptors>
                  <telerik:CategoricalSeriesDescriptor ItemsSourcePath="Data" ValuePath="CurrentValue" CategoryPath="Date">
                      <telerik:CategoricalSeriesDescriptor.Style>
                          <Style TargetType="chartview:LineSeries">
                               <Setter Property="StrokeThickness" Value="2"/>
                               <Setter Property="ShowLabels" Value="{Binding ShowLabels}" />
                               <Setter Property="Visibility" Value="{Binding IsVisible, Converter={StaticResource BoolToVis}}" />
                               <Setter Property="LegendSettings">
                                   <Setter.Value>
                                       <telerik:SeriesLegendSettings Title="{Binding Label}"/>
                                   </Setter.Value>
                                </Setter>
                                <Setter Property="Stroke" Value="{Binding Color}" />
                                <Setter Property="VerticalAxis" Value="{Binding VerticalAxis}"/>
                            </Style>
                        </telerik:CategoricalSeriesDescriptor.Style>
                    </telerik:CategoricalSeriesDescriptor>
                </telerik:ChartSeriesProvider.SeriesDescriptors>
            </telerik:ChartSeriesProvider>
        </telerik:RadCartesianChart.SeriesProvider>
        <radchartview:RadCartesianChart.HorizontalAxis>
            <chartview:DateTimeContinuousAxis x:Name="horizontalAxis" PlotMode="BetweenTicks" ShowLabels="True" LabelFormat="{Binding AxisLabel}" MajorTickStyle="{StaticResource tickStyle}" LabelFitMode="Rotate" Minimum="{Binding StartDate}" Maximum="{Binding EndDate}"/>
        </radchartview:RadCartesianChart.HorizontalAxis>
    </telerik:RadCatresianChart>

    This is my XAML code. When I change the SuppChart collection (ObservableCollection) the chart isn't render the horizontal axis and annotation. I implement INotifyPropertyChanged and INotifyCollectionChanged. Data are render properly after collection change.

    I attached picutures of plot before and after refresh the data. 

    What can be wrong? I missing something?
  2. Peshito
    Admin
    Peshito avatar
    497 posts

    Posted 26 Dec 2014 Link to this post

    Hi Paul,

    It does not become clear what might be causing this unexpected behavior. I tried to reproduce the issue but to no avail. Could you please send us the rest of the code in a sample runnable project. This way we would be able to debug it locally and provide you with a possible solution. As this is a forum thread, you could either attach the project by opening a support ticket or use a third party website for upload files.

    Regards,
    Peshito
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top