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

Multiple RadLinearSparkline and performance?

3 Answers 202 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Yonghan
Top achievements
Rank 1
Yonghan asked on 19 Jul 2012, 08:11 AM
Hi,
I got a serious problem when I using TimeBar with multiple RadLinearSparklines.
data points = 3 x 24 x 60 = 4320.
the movement is too slow.

What's the best way to use TimeBar with multiple lines?


<
Window x:Class="WpfApplication4.MainWindow"
        xmlns:example="clr-namespace:WpfApplication4"
        Title="MainWindow" Height="350" Width="1024">
    <Window.DataContext>
        <example:ExampleViewModel StartDate="2012-01-01 00:00:00" EndDate="2012-01-04 00:00:00" />
    </Window.DataContext>
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="AUto"/>
        </Grid.RowDefinitions>
        <telerik:RadTimeBar Margin="6" VerticalAlignment="Top"  telerik:StyleManager.Theme="Metro"
                            PeriodStart="2012-01-01 00:00:00"         PeriodEnd="2012-01-04 00:00:00"
                            VisiblePeriodStart="2012-01-01 00:00:00" VisiblePeriodEnd="2012-01-01 06:00:00"
                            SelectionStart="2012-01-01 02:00:00"     SelectionEnd="2012-01-01 03:00:00"
                            MinSelectionRange="00:01:00"
                            IsSnapToIntervalEnabled="False"
                            FontSize="9"
                            SelectionTitleFormatString="{}{0:yyyy'-'MM'-'dd HH':'mm':'ss} - {1:yyyy'-'MM'-'dd HH':'mm':'ss}">
            <telerik:RadTimeBar.Intervals>
                <telerik:DayInterval />
                <telerik:HourInterval  IntervalSpans="1,6,12,20" />
                <telerik:MinuteInterval IntervalSpans="1,10,15,30" />
            </telerik:RadTimeBar.Intervals>
            <StackPanel>
                <telerik:RadLinearSparkline ItemsSource="{Binding LinearData}" XValuePath="Date" YValuePath="Value" Height="40" Margin="0 8" LineStroke="Red" />
                <Border Height="1" Background="LightGray"/>
                <telerik:RadLinearSparkline ItemsSource="{Binding LinearData2}" XValuePath="Date" YValuePath="Value" Height="40" Margin="0 8" LineStroke="Blue" />
                <Border Height="1" Background="LightGray"/>
                <telerik:RadLinearSparkline ItemsSource="{Binding LinearData}" XValuePath="Date" YValuePath="Value" Height="40" Margin="0 8" LineStroke="Green" />
                <Border Height="1" Background="LightGray"/>
                <telerik:RadLinearSparkline ItemsSource="{Binding LinearData2}" XValuePath="Date" YValuePath="Value" Height="40" Margin="0 8"  LineStroke="Cyan" />
                <Border Height="1" Background="LightGray"/>
                <telerik:RadLinearSparkline ItemsSource="{Binding LinearData}" XValuePath="Date" YValuePath="Value" Height="40" Margin="0 8" LineStroke="Brown" />
                <Border Height="1" Background="LightGray"/>
                <telerik:RadLinearSparkline ItemsSource="{Binding LinearData2}" XValuePath="Date" YValuePath="Value" Height="40" Margin="0 8" LineStroke="Magenta"/>
                <Border Height="1" Background="LightGray"/>
            </StackPanel>
        </telerik:RadTimeBar>
    </Grid>
</Window>



3 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 19 Jul 2012, 12:53 PM
Hi Yonghan,

Unfortunately, the only thing that I can suggest in this case, besides using the latest version of the controls, in case you are not, is to reduce the number of items in the sparkline controls. For example, you can use some custom logic to filter the data.

Kind regards,
Tsvetie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Yonghan
Top achievements
Rank 1
answered on 20 Jul 2012, 08:17 AM
thank you.
But I have no idea for about custom data filtering.
Can you post a data filter example?

Thanks
0
Tsvetie
Telerik team
answered on 20 Jul 2012, 11:24 AM
Hello Yonghan,

What I meant by "custom logic to filter the data" was that, depending on your scenario, specific data and specification, you can reduce the data before you pass it to the sparkline. In case the sparkline controls have less points to show, the performance will be better.

Greetings,
Tsvetie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TimeBar
Asked by
Yonghan
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Yonghan
Top achievements
Rank 1
Share this question
or