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

timebar issuse when selected yearly view with lots of data

1 Answer 29 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Rajesh
Top achievements
Rank 1
Rajesh asked on 12 Oct 2011, 12:49 PM
hi  all,

The  x-axis labels of  chart are  reapeted as 30.12  when  timebar  is  in  yearly view  : 

  when  i select  few  monthly view ( PFA : Monthlyview.jpg) the  x-axis  lables are coming  fine  but  when  i select the  Yearly view( PFA : Yearly.jpg) the x-asis  labels are repeated.

Please find the xaml code  below  :

<Grid x:Name="LayoutRoot"
          DataContext="{StaticResource xSalesViewModel}"
          Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="150" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <local:SalesViewModel x:Name="xSalesViewModel" />
        <TextBlock FontFamily="Portable User Interface"
                   Text="RADTIMEBAR"
                   FontSize="24"
                   Foreground="DarkGray"
                   Margin="5" />
          
        <telerik:RadTimeBar x:Name="xRadTimeBar"
                            Grid.ColumnSpan="2"
                            Grid.Row="1"
                            IsSnapToIntervalEnabled="True"
                                MinSelectionRange="7.00:00:00"
                                 PeriodStart="1-Jan-2011" PeriodEnd="1-Jan-2012" 
                                VisiblePeriodStart="1-Jan-2011" VisiblePeriodEnd="1-Jan-2012" 
                                SelectionStart="1-Aug-2011" SelectionEnd="30-Sep-2011" 
                            >
            <telerik:RadTimeBar.Intervals>
                <telerik:YearInterval />
                <telerik:MonthInterval />
                <telerik:WeekInterval />
                <telerik:DayInterval />
                <telerik:HourInterval />                
            </telerik:RadTimeBar.Intervals>
            <telerik:RadAreaSparkline ItemsSource="{Binding SalesData}"
                                      XValuePath="datadate"
                                      YValuePath="salestotal"
                                      Margin="0,8" />
        </telerik:RadTimeBar>
  
        <telerik:RadChart x:Name="xRadChart"
                          TimeBar="{Binding ElementName=xRadTimeBar}"
                          ItemsSource="{Binding SalesData}"
Grid.ColumnSpan="2"                          Grid.Row="2"
>
            <telerik:RadChart.SeriesMappings>
                <telerik:SeriesMapping>
                    <telerik:SeriesMapping.SeriesDefinition>
                        <telerik:AreaSeriesDefinition />
                    </telerik:SeriesMapping.SeriesDefinition>
                    <telerik:SeriesMapping.ItemMappings>
                        <telerik:ItemMapping FieldName="salestotal"
                                             DataPointMember="YValue" />
                        <telerik:ItemMapping FieldName="datadate"
                                             DataPointMember="XCategory" />
                    </telerik:SeriesMapping.ItemMappings>
                </telerik:SeriesMapping>
                </telerik:RadChart.SeriesMappings>
                <telerik:RadChart.DefaultView>
                    <telerik:ChartDefaultView>
                        <telerik:ChartDefaultView.ChartLegend >
                            <telerik:ChartLegend Name="legend" Visibility="Collapsed" />
                        </telerik:ChartDefaultView.ChartLegend>
                        <telerik:ChartDefaultView.ChartArea>
                            <telerik:ChartArea LegendName="legend" x:Name="chartArea"
                                                   EnableAnimations="False" 
                                                  >
                              
                                <telerik:ChartArea.AxisY>
                                    <telerik:AxisY   />
                                </telerik:ChartArea.AxisY>
                                <telerik:ChartArea.AxisX>
                                    <telerik:AxisX DefaultLabelFormat="dd.MM" 
                                                    IsDateTime="True"
                                                    
                                              Step="1"
                                              LabelStep="7"
                                                MinorTicksVisibility="Collapsed"
                                              StepLabelLevelCount="1"
                                              StepLabelLevelHeight="1"  >
  
                                        <telerik:AxisX.AxisStyles>
                                            <telerik:AxisStyles  />
                                        </telerik:AxisX.AxisStyles>
                                    </telerik:AxisX>
                                </telerik:ChartArea.AxisX>
                            </telerik:ChartArea>
                        </telerik:ChartDefaultView.ChartArea>
                         
                    </telerik:ChartDefaultView>
                </telerik:RadChart.DefaultView>
        </telerik:RadChart>
  
         
    </Grid>


Please  let  me  know if any change  is  requried.

1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 17 Oct 2011, 12:37 PM
Hello Rajesh,
This can happen, in case the data entries, visualized by the chart control, differ by less than a day. You can check this, by removing the DefaultLabelFormat setting for the x-axis.

In case you need additional help with that, please open a formal support ticket and send a simple running project that demonstrates the problem, together with detailed information on the steps I need to follow, in order to reproduce it.

Best wishes,
Tsvetie
the Telerik team

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

Tags
TimeBar
Asked by
Rajesh
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or