RadCartesianChart Performance goes down when clicking combobox

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    1 posts
    Member since:
    Jan 2013

    Posted 30 Jan 2013 Link to this post

    I'm developing an application which uses the RadCartesianChart. There is also a ComboBox where I can choose some values. The performance of the Chart control is well (zooms and pans normally) until I click on the ComboBox. After this, the performance of the chart lacks. Panning and zooming is very slow. There are 288 values in this chart.
    The problem appears on my computer (Core 2 Duo T9600). The problem doesn't appear on another computer (i7). I'm confused, because the ComboBox is needed. Telerik wpf controls are in v2012.2.607.40

    Here the XAML:
    <Window x:Class="testingComboboxBug.MainWindow"
            xmlns:ignore="http://www.ignore.com" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
            mc:Ignorable="d ignore"
            Height="400"
            Width="800"
            Title="MVVM Light Application"
            DataContext="{Binding Main, Source={StaticResource Locator}}">
         
        <Window.Resources>
            <ResourceDictionary>
                <ResourceDictionary.MergedDictionaries>
                    <ResourceDictionary Source="Skins/MainSkin.xaml" />
                </ResourceDictionary.MergedDictionaries>
            </ResourceDictionary>
        </Window.Resources>
     
        <Grid x:Name="LayoutRoot">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ComboBox Grid.Column="0">
                <ComboBox.Items>
                    <TextBlock Text="Bla1"/>
                    <TextBlock Text="Bla2"/>
                    <TextBlock Text="Bla3"/>
                </ComboBox.Items>
            </ComboBox>
            <telerik:RadCartesianChart x:Name="RadCartesianChart" Margin="0" BorderBrush="Black" BorderThickness="0" Grid.Column="1"
                    Zoom="{Binding Zoom, Mode=TwoWay}" PanOffset="{Binding PanOffset, Mode=TwoWay}" HorizontalContentAlignment="Center">
                <telerik:RadCartesianChart.Background>
                    <SolidColorBrush Opacity="0"/>
                </telerik:RadCartesianChart.Background>
     
                <telerik:RadCartesianChart.Behaviors>
                    <telerik:ChartPanAndZoomBehavior ZoomMode="Horizontal" />
                </telerik:RadCartesianChart.Behaviors>
     
                <telerik:RadCartesianChart.HorizontalAxis>
                    <telerik:DateTimeCategoricalAxis PlotMode="OnTicks" MajorTickInterval="20" LabelFormat="HH:mmm"
                            LabelStyle="{StaticResource labelFontStyle}" MajorTickStyle="{StaticResource tickStyle}" ShowLabels="True" Margin="0,-2,0,0" />
                </telerik:RadCartesianChart.HorizontalAxis>
     
                <telerik:RadCartesianChart.VerticalAxis>
                    <telerik:LinearAxis Title="Инт. ТС"/>
                </telerik:RadCartesianChart.VerticalAxis>
     
                <telerik:RadCartesianChart.Grid>
                    <telerik:CartesianChartGrid StripLinesVisibility="None" MajorLinesVisibility="XY" Margin="0">
                        <telerik:CartesianChartGrid.YStripeBrushes>
                            <SolidColorBrush Color="#FFD7D7D7" Opacity="0.3" />
                            <SolidColorBrush Color="Transparent" />
                        </telerik:CartesianChartGrid.YStripeBrushes>
                    </telerik:CartesianChartGrid>
                </telerik:RadCartesianChart.Grid>
                <telerik:BarSeries CategoryBinding="TimeStamp" ValueBinding="Value" ItemsSource="{Binding Counts}" PointTemplate="{DynamicResource BarSeriesTemplate}">
                    <telerik:BarSeries.Resources>
                        <DataTemplate x:Key="BarSeriesTemplate">
                            <!--<Rectangle StrokeThickness="0" Fill="{Binding DataItem.Quality, Converter={StaticResource QualityColorConverter}}" />-->
                            <Rectangle StrokeThickness="0" >
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF066607" Offset="0"/>
                                        <GradientStop Color="#FF00D603" Offset="1"/>
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                        </DataTemplate>
                    </telerik:BarSeries.Resources>
                </telerik:BarSeries>
            </telerik:RadCartesianChart>
        </Grid>
    </Window>
  2. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 04 Feb 2013 Link to this post

    Hi Daniel,

    I don't see any relationship between the ComboBox and the RadCartesianChart in the XAML code that you have attached. I created a test project, based on the code you provided, but I could not reproduce the issue.
    Perhaps there is some code that is executing when the ComboBox selection is changed. In order to better help you determine if the problem is related to the RadCartesianChart, it would be best if you could provide a stripped-down, runnable project so we can reproduce the project locally

    I am attaching my test project for reference. 

    Regards,
    Petar Kirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top