Edit this page

Overview

Thank you for choosing RadTimeBar!

The RadTimeBar is a time bound DataVisualization control. Its chief purpose is to allow lightweight scrolling and navigation through large periods of time. Additionally, the control exposes intuitive API which allows for both declarative and programmatic manipulation of the control. The RadTimeBar control can host other controls; however its true power comes when combined with RadSparklines to show trends in large data collections. The control can be easily combined with other controls such as RadChart, RadGridView, RadBulletGraph, etc. to create rich and powerful dashboards.

In order to use RadTimeBar control in your projects you have to add references to Telerik.Windows.Controls.dll, Telerik.Windows.Controls.DataVisualization.dll and Telerik.Windows.Data.dll.

A sample TimeBar definition may look like this:

<telerik:RadTimeBar PeriodStart="1-Jan-2010 12:00:00 AM" PeriodEnd="31-Dec-2011 11:59:59 PM"
                      VisiblePeriodStart="11-Nov-2010 12:00:00 AM" VisiblePeriodEnd="14-March-2011 11:59:59 PM"
                      SelectionStart="1-Jan-2011 12:00:00 AM" SelectionEnd="28-Feb-2011 11:59:59 PM">
        <telerik:RadTimeBar.Intervals>
            <telerik:YearInterval />
            <telerik:MonthInterval />
            <telerik:WeekInterval />
            <telerik:DayInterval />
        </telerik:RadTimeBar.Intervals>
    </telerik:RadTimeBar>

Visually, such a setup looks as shown below:

Now let's combine it with linear RadSparkline. This can be easily achieved, as the content of the TimeBar will be set to an instance of RadSparkline:

<telerik:RadTimeBar PeriodStart="1-Jan-2010 12:00:00 AM" PeriodEnd="31-Dec-2011 11:59:59 PM"
                      VisiblePeriodStart="11-Nov-2010 12:00:00 AM" VisiblePeriodEnd="14-March-2011 11:59:59 PM"
                      SelectionStart="1-Jan-2011 12:00:00 AM" SelectionEnd="28-Feb-2011 11:59:59 PM">
        <telerik:RadTimeBar.Intervals>
            <telerik:YearInterval />
            <telerik:MonthInterval />
            <telerik:WeekInterval />
            <telerik:DayInterval />
        </telerik:RadTimeBar.Intervals>
    <telerik:RadLinearSparkline ItemsSource="{Binding}"/>
    </telerik:RadTimeBar>

VoilĂ :

Here's the way our sparkline was populated with data. For more details please refer to RadSparkline's
Databinding
topic.

Random r = new Random();
List<int> LinearData = new List<int>();
for (DateTime currentDate = DateTime.Today; currentDate < DateTime.Today.AddDays(365);
    currentDate = currentDate.AddDays(1))
{
    LinearData.Add(r.Next(0, 60));
}
this.DataContext = LinearData;
Dim r As New Random()
Dim LinearData As New List(Of Integer)()
Dim currentDate As Date = Date.Today
Do While currentDate < Date.Today.AddDays(365)
    LinearData.Add(r.Next(0, 60))
    currentDate = currentDate.AddDays(1)
Loop
Me.DataContext = LinearData