This is a migrated thread and some comments may be shown as answers.
First and last label are hide in chart
3 Answers 23 Views
This is a migrated thread and some comments may be shown as answers.
Dario
Top achievements
Rank 2
Dario asked on 27 Dec 2011, 01:13 PM
Hi to all,
I'va found strange result, when I have many items in chart, the first and last item are shown unlabeled.
I don't understand why this happens.

I've attached screen-shot. How can I resolve this? Is it a bug or my error?

Thx.

3 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 27 Dec 2011, 04:57 PM
Hi Dario,

As I can see from your image attached the Labels overlap your bars since the bars are many and thin. I suggest that you provide additional space for the top-most and bottom-most labels to be visible. This can be done by setting manual range (AutoRange = false) to the XAxis as described in this help topic. Please note that the Axes are reversed when you have Horizontal oriented series i.e. XAxis is YAxis and vice versa.

All the best,
Evgenia
the Telerik team

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

0
Dario
Top achievements
Rank 2
answered on 28 Dec 2011, 09:47 AM
I forgot one thing (sorry), I'm not using XAxis but XCategory.
This is xaml code of RadChart, in attach full chart with XCategory values. I tryed to change telerik:AxisX LayoutMode, but the resul not change.
<telerik:RadChart Grid.Row="1" ItemsSource="{Binding FactTableForCustomers}" Language="it" MaxHeight="400" >
 <telerik:RadChart.FilterDescriptors>
  <telerik:ChartFilterDescriptor Member="ActionCode" Operator="IsEqualTo" Value="N100" />
 </telerik:RadChart.FilterDescriptors>
 <telerik:RadChart.SortDescriptors>
  <telerik:ChartSortDescriptor Member="VisiteCounts" SortDirection="Descending"/>
 </telerik:RadChart.SortDescriptors>
 <telerik:RadChart.SeriesMappings>
  <telerik:SeriesMapping>
   <telerik:SeriesMapping.SeriesDefinition>
    <telerik:HorizontalBarSeriesDefinition />
   </telerik:SeriesMapping.SeriesDefinition>
   <telerik:SeriesMapping.GroupingSettings>
    <telerik:GroupingSettings>
     <telerik:GroupingSettings.GroupDescriptors>
      <telerik:ChartGroupDescriptor Member="Salesperson"/>
     </telerik:GroupingSettings.GroupDescriptors>
    </telerik:GroupingSettings>
   </telerik:SeriesMapping.GroupingSettings>
   <telerik:SeriesMapping.ItemMappings>
    <telerik:ItemMapping DataPointMember="XCategory" FieldName="Salesperson" />
    <telerik:ItemMapping DataPointMember="YValue" FieldName="VisiteCounts" AggregateFunction="Max"/>
   </telerik:SeriesMapping.ItemMappings>
  </telerik:SeriesMapping>
 </telerik:RadChart.SeriesMappings>
 <telerik:RadChart.DefaultView>
  <telerik:ChartDefaultView >
   <telerik:ChartDefaultView.ChartLegend >
    <telerik:ChartLegend x:Name="CustomerChartLegend" Header="Salespersons" Visibility="Collapsed"/>
   </telerik:ChartDefaultView.ChartLegend>
   <telerik:ChartDefaultView.ChartArea>
    <telerik:ChartArea LegendName="CustomerChartLegend" LabelFormatBehavior="HumanReadable" EnableAnimations="False" ItemOverlapPercent = "100" ItemWidthPercent = "100">
     <telerik:ChartArea.AxisX>
      <telerik:AxisX LayoutMode="Inside" Title="Salespersons" />
     </telerik:ChartArea.AxisX>
     <telerik:ChartArea.AxisY>
      <telerik:AxisY ExtendDirection="None" Title="N° Customer Visited"/>
     </telerik:ChartArea.AxisY>
    </telerik:ChartArea>
   </telerik:ChartDefaultView.ChartArea>
  </telerik:ChartDefaultView>
 </telerik:RadChart.DefaultView>
</telerik:RadChart>
0
Evgenia
Telerik team
answered on 29 Dec 2011, 02:05 PM
Hi Dario,

In this case I suggest that you turn off the SmartLabels feature for your top-most and bottom-most labels to appear. Unfortunately that's a limitation of the SmartLabels feature - the labels should be as much away as possible from the border of the PlotArea.  

Greetings,
Evgenia
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Chart
Asked by
Dario
Top achievements
Rank 2
Answers by
Evgenia
Telerik team
Dario
Top achievements
Rank 2
Share this question
or