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

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

1 Answer 175 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 23 Dec 2014, 12:27 PM
<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?

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 26 Dec 2014, 06:50 AM
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.

 
Tags
ChartView
Asked by
Paul
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or