We are binding data collections to a ChartView. The data collections contain measurements taken over a period of time. Those time periods (currently) are four hours, one day, one week and one month.
When the user chooses a different time period, we refresh the collection and change some of the chart properties to make more sense (LabelFormat, LabelInterval). But because the number of measurements can vary the LabelInterval may end up causing the last gridpoint to not have a label. (I have attached screenshots of a sample showing month, week, day, and four hour renderings.
Is there any way to force the last label to show no matter how many datapoints there are?
<telerik:RadCartesianChart x:Name="radChart" Margin="0,0,0,0" Height="340"> <telerik:RadCartesianChart.HorizontalAxis> <telerik:DateTimeContinuousAxis LabelInterval="{Binding ChartSettingsViewModel.LabelInterval}" LabelFormat="{Binding ChartSettingsViewModel.LabelFormat}" PlotMode="OnTicksPadded" > </telerik:DateTimeContinuousAxis> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis Title="{Binding SeriesTitle}"> </telerik:LinearAxis> </telerik:RadCartesianChart.VerticalAxis> <telerik:RadCartesianChart.Grid> <telerik:CartesianChartGrid MajorLinesVisibility="Y" MajorYLineDashArray="3,4" StripLinesVisibility="Y" /> </telerik:RadCartesianChart.Grid> <telerik:RadCartesianChart.Series> <chartView:LineSeries ItemsSource="{Binding Measurements}" Stroke="{Binding LineColor}"> <chartView:LineSeries.ValueBinding> <telerik:PropertyNameDataPointBinding PropertyName="Value"/> </chartView:LineSeries.ValueBinding> <chartView:LineSeries.CategoryBinding> <telerik:PropertyNameDataPointBinding PropertyName="LocalDateTime"/> </chartView:LineSeries.CategoryBinding> </chartView:LineSeries> </telerik:RadCartesianChart.Series></telerik:RadCartesianChart>