2013 Q3 RadCartesianChart SmartLabelsStrategy for Live Chart

2 posts, 0 answers
  1. Nitin Nitin
    Nitin Nitin avatar
    41 posts
    Member since:
    Apr 2010

    Posted 20 Nov 2013 Link to this post

    Hello,

    I am facing a weird issue with the implementation of Smart Label (ShowLabels=True) using RadCartesianChart.

    In my chart, I am showing history data as well as live data.

    For eg: from 6am to 11am -> chart is populated with history data where as after than every minute the chart series is updated for the live value.

    The problem is that the smart labels for history data is show correctly whereas for live data each label is repeated 4 times

    like if(x,y)=(10,20)
    the smart label is shown at (10 10 10 10, 20 20 20 20) on the chart

    <telerik:RadCartesianChart x:Name="xRadCartesianChart" Margin="0,0,0,0"
                                   MouseMove="xRadCartesianChart_MouseMove" MouseRightButtonDown="xRadCartesianChart_MouseRightButtonDown">
            <telerik:RadCartesianChart.SmartLabelsStrategy>
                <telerik:ChartSmartLabelsStrategy />
            </telerik:RadCartesianChart.SmartLabelsStrategy>
    <telerik:RadCartesianChart.SeriesProvider>
                <telerik:ChartSeriesProvider Source="{Binding SeriesCollection,Mode=TwoWay}">
                    <telerik:ChartSeriesProvider.SeriesDescriptors>
                        <telerik:CategoricalSeriesDescriptor ItemsSourcePath="Data" ValuePath="LineSeriesChartValue" CategoryPath="LineSeriesChartCategory">
                            <telerik:CategoricalSeriesDescriptor.Style>
                                <Style TargetType="telerik:LineSeries">
                                    <Setter Property="CombineMode" Value="Cluster" />
                                    <Setter Property="TrackBallInfoTemplate" Value="{Binding TrackballInfoTemplate, Mode=TwoWay}" />
                                    <Setter Property="Stroke" Value="{Binding SeriesStroke, Mode=TwoWay}" />
                                    <Setter Property="Tag" Value="{Binding SeriesName, Mode=TwoWay}" />
                                    <Setter Property="VerticalAxis" Value="{Binding VerticalAxis, Mode=TwoWay}" />
    <Setter Property="ShowLabels" Value="True" />
                                </Style>
                            </telerik:CategoricalSeriesDescriptor.Style>
                        </telerik:CategoricalSeriesDescriptor>
                    </telerik:ChartSeriesProvider.SeriesDescriptors>
                </telerik:ChartSeriesProvider>
                 
            </telerik:RadCartesianChart.SeriesProvider>
    </telerik:RadCartesianChart>

    Please provide me a solution.
    Thanks.

  2. Nitin Nitin
    Nitin Nitin avatar
    41 posts
    Member since:
    Apr 2010

    Posted 23 Nov 2013 Link to this post

    Hello,

    I have resolved the above issue.
    Infact it was the problem in my wcf code.

    Thanks,
    Nitin
  3. DevCraft banner
Back to Top