BarSeries Data is invisible?

2 posts, 0 answers
  1. Ben
    Ben avatar
    13 posts
    Member since:
    Feb 2012

    Posted 20 Feb 2012 Link to this post

    In an effort to create a Histogram chart, I was instructed to use a BarSeries by someone on this forum, and set it's CategoricalAxis.GapLength to 0.000001 (can't set to 0 because of a known bug). After doing this, I created a BarSeries and set it's data to what I thought would correct. I can see the y axis growing at the correct rate, but there are no bars visible!


    <telerik:RadCartesianChart x:Name="RadChart1" Palette="Metro" HorizontalAlignment="Right" VerticalAlignment="Top" Width="1000" Height="400">
      <telerik:BarSeries ItemsSource="{Binding Data}" ValueBinding="Data"/>
        <chartView:CategoricalAxis MajorTickInterval="250" GapLength="0.00001"/>
        <telerik:LinearAxis LabelFormat="0"/>
        <telerik:CartesianChartGrid MajorLinesVisibility="Y" />

    The data is formatted in an ObserveableCollection<ChartData> as defined here:

    public class ChartData
      public int Index  {  getset;  }
      public int Data  {  getset;  }

    (I'd previously used this format for a ScatterSeries with no issue)

    The graph is growing, but it's like there is no default style applied to the BarSeries, thoughts?
  2. Ben
    Ben avatar
    13 posts
    Member since:
    Feb 2012

    Posted 21 Feb 2012 Link to this post

    Resolved: Individual bars in a BarSeries chart have a minimum width they can be displayed at, (seemingly about 1px per bar). If you scale your chart small enough that it violates this size, the entire data series becomes invisible (as they are all then violating the min-width)
Back to Top