I has an ObservableCollection<BarItem> where BarItem is
public class BarModel
{
public DateTime Date { get; set; }
public double Actual { get; set; }
public double Estimated { get; set; }
}
And I display it with the following Xaml
<chart:SfChart x:Name="Chart" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<chart:SfChart.PrimaryAxis>
<chart:DateTimeAxis Minimum="{Binding Start}" Maximum="{Binding End}" IntervalType="Months" >
<chart:DateTimeAxis.LabelStyle>
<chart:ChartAxisLabelStyle LabelFormat = "dd MMM"></chart:ChartAxisLabelStyle>
</chart:DateTimeAxis.LabelStyle>
</chart:DateTimeAxis>
</chart:SfChart.PrimaryAxis>
<chart:SfChart.SecondaryAxis>
<chart:NumericalAxis Maximum="100.0" Minimum="0" Interval="10.0">
</chart:NumericalAxis>
</chart:SfChart.SecondaryAxis>
<chart:SfChart.Series>
<chart:ColumnSeries ItemsSource="{Binding Bars}" XBindingPath="Date" YBindingPath="Actual" Color="Red" LegendIcon="None" />
<chart:ColumnSeries ItemsSource="{Binding Bars}" XBindingPath="Date" YBindingPath="Estimated" Color="Blue" LegendIcon="None" />
</chart:ColumnSeries>
</chart:SfChart.Series>
</chart:SfChart>
My problem is the interval type property
When it is set to Days, it works fine, when it is set to month (i.e. IntervalType="Months" ) no bar is displayed at all?!
What am I missing? any tips?