This is a migrated thread and some comments may be shown as answers.

TimeBar Selector with large amount of data points

3 Answers 23 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 25 Jul 2018, 08:43 PM

Hello, I have been using Telerik in a WPF desktop application. We have a control that displays a large amount of data points (ranging from around a thousand points to over a million points), and a custom selector that lets you designate a section of the data to zoom in on.

We want to replace the custom selector we are currently using with the selector from the TimeBar control. We use points instead of dates, but I got around the issue by representing each point as a 'day'. The problem is, when I add a large amount of data to the RadLinearSparkline (26,000 points of random numbers), the selector control becomes sluggish, for example the resize selector has a 3-4 second delay if I move one of the bounds.

So I technically have 3 questions:

Does the TimeBar support large amounts of data? 

Is there a way to change the range data from date-times to doubles/ints (or another control with the same selector)?

Is there a way I can just use the selector without the time bar itself?

 

Here is the relevant code in my example project

----------------------------------------------------------------------------------------------------------------------------------------------------------

Random r = new Random();
            List<int> LinearData = new List<int>();
            for (DateTime currentDate = DateTime.Today; currentDate < DateTime.Today.AddDays(1000000);
                currentDate = currentDate.AddDays(1))
            {
                LinearData.Add(r.Next(0, 100000));
            }
            this.DataContext = LinearData;

-----------------------------------------------------------------------------------------------------------------------------------------------------------

     <telerik:RadTimeBar PeriodStart="1-Jan-0001 12:00:00 AM" PeriodEnd="31-Dec-2740 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:RadTimeBar.Intervals>
        <telerik:RadLinearSparkline ItemsSource="{Binding}"/>
    </telerik:RadTimeBar>

 

If you need any additional information about the project, let me know

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 30 Jul 2018, 08:32 AM
Hi Matthew,

I will address your questions in the same order as from your post.

1. This depends on the amount of points that the control has to display. The only suggestion I can provide is to somehow reduce(pre-filter) the data passed as a source.

2. The PeriodStart/End, VisiblePeriodStart/End and SelectionStart/End properties are all of DateTime type. Thus, passing another type to them would not be possible.

3. The control utilizes the standard Thumb for its selection. Can you please elaborate a bit on the exact requirement you are aiming at?

Regards,
Stefan
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Matthew
Top achievements
Rank 1
answered on 03 Aug 2018, 02:54 PM

Stefan,

Thank you for your feedback

In response to your third answer, I would like to add the Time Bar's selection tool (SelectionThumb) over top of an image, and use the SelectionThumb to determine the range of pixels that are selected.

I essentially would just like to the Selection thumb by itself, outside of the RadTimeBar

 

0
Stefan
Telerik team
answered on 07 Aug 2018, 03:47 PM
Hello Matthew,

The logic of the SelectionThumb of the control is not meant to be used outside of its scope. What I can suggest you as a possible solution for achieving the desired customization would be to use an approach similar to the one demonstrated in the TimeBar over ChartView SDK Example. Basically, you can set the needed custom Content of RadTimeBar and set its Background to be Transparent. Thus, the custom Content would be visible instead. However, synchronizing the controls needs to be done manually. The referred demo illustrates how this can be achieved with RadChartView. I am afraid that I cannot provide a solution for fetching the selected pixels range of an Image, as this is a heavy customization.

Additionally, you can take a look at our RadImageEditor component and consider using it instead.

I hope this helps.

Regards,
Stefan
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
TimeBar
Asked by
Matthew
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Matthew
Top achievements
Rank 1
Share this question
or