This question is locked. New answers and comments are not allowed.
Team, I am using the time bar to visualize some data but for some reason, the data points do not line up.
My data looks like
but when I link the data, I have data points showing up in january of 2012. and when I compress the timebar, those dates do not go away.
here is my binding, class and code.
Here is the data class I am using
And here is the xaml
My data looks like
rundte overallVulnCount overallVulnRemediated gap 2012-02-06 00:00:00 81577 16370 65207 2012-02-07 00:00:00 86131 22833 63298 2012-02-08 00:00:00 86131 22833 63298 2012-02-09 00:00:00 86131 22833 63298 2012-02-10 00:00:00 86131 22833 63298 2012-02-11 00:00:00 86131 22833 63298 2012-02-12 00:00:00 86131 22833 63298 2012-02-13 00:00:00 86131 22833 63298but when I link the data, I have data points showing up in january of 2012. and when I compress the timebar, those dates do not go away.
here is my binding, class and code.
DateTime nudte = (DateTime)item.rundte; trenditems nutrnd = new trenditems(); if (nudte < startDate) { startDate = nudte.AddDays(-7); } int totalvulncount = (int)item.overallVulnCount; int totalremcount = (int)item.overallVulnRemediated; nutrnd.itemdte = nudte; nutrnd.remainingcnt = totalremcount; nutrnd.overallcount = totalvulncount; nutrnd.gapcount = (int)item.gap; trndlist.Add(nutrnd); if (totalremcount > totalvulncount) { bool itemfail = true; } totalvuln.Add(nudte, totalvulncount); totalremediated.Add(nudte, totalremcount); } timeSelector.PeriodStart = startDate.AddMonths(-2); timeSelector.PeriodEnd = endDate; timeSelector.VisiblePeriodStart = endDate.AddMonths(-1); timeSelector.VisiblePeriodEnd = endDate; timeSelector.SelectionStart = endDate.AddDays(-14); timeSelector.SelectionEnd = endDate; timeSelectSpark.XValuePath = "itemdte"; timeSelectSpark.YValuePath = "gapcount"; timeSelectSpark.ItemsSource = trndlist;Here is the data class I am using
public class trenditems { public DateTime itemdte { get; set; } public int overallcount { get; set; } public int remainingcnt { get; set; } public int gapcount { get; set; } public trenditems() { } }And here is the xaml
<telerik:RadTimeBar Grid.Row="0" Name="timeSelector" Height="150" VerticalAlignment="Top" Margin="6" IsSnapToIntervalEnabled="True"> <telerik:RadTimeBar.Intervals> <telerik:MonthInterval /> <telerik:WeekInterval /> <telerik:DayInterval /> </telerik:RadTimeBar.Intervals> <telerik:RadLinearSparkline Name="timeSelectSpark" Margin="5,75,5,5" ShowHighPointIndicators="True" Foreground="Red" BorderBrush="Red" OpacityMask="Red" FirstPointBrush="Red" AxisStroke="Red" LineStroke="Red" ShowMarkers="True" AutoRange="False" /> </telerik:RadTimeBar>