RadCartesianChart Data refresh.

4 posts, 0 answers
  1. Lee
    Lee avatar
    30 posts
    Member since:
    Apr 2014

    Posted 13 May 2014 Link to this post

    Hi.

    I have one problem.

    My source is below.

                 <telerik:RadCartesianChart.SeriesProvider>
                    <telerik:ChartSeriesProvider Source="{Binding Series}">
                        <telerik:ChartSeriesProvider.SeriesDescriptors>
                            <telerik:CategoricalSeriesDescriptor ItemsSourcePath="Data" ValuePath="Value" CategoryPath="LocalTime">
                                <telerik:CategoricalSeriesDescriptor.Style>
                                    <Style TargetType="telerik:LineSeries">
                                        <Setter Property="StrokeThickness" Value="1"/>
                                        <Setter Property="Visibility" Value="{Binding Name , Converter={StaticResource pointFocusConverter}}"/>
                                        <Setter Property="ShowLabels" Value="{Binding Path=DataContext.Ribbon.IsShowLabel, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
                                        <Setter Property="LegendSettings">
                                            <Setter.Value>
                                                <telerik:SeriesLegendSettings Title="{Binding Name}" />
                                            </Setter.Value>
                                        </Setter>
                                        <Setter Property="VerticalAxis">
                                            <Setter.Value>
                                                <MultiBinding Converter="{StaticResource multiVerticalAxisConverter}">
                                                    <Binding Path="Data"/>
                                                    <Binding Path="DataContext.Series" ElementName="lineChart"/>
                                                </MultiBinding>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </telerik:CategoricalSeriesDescriptor.Style>
                            </telerik:CategoricalSeriesDescriptor>
                        </telerik:ChartSeriesProvider.SeriesDescriptors>
                    </telerik:ChartSeriesProvider>
                </telerik:RadCartesianChart.SeriesProvider>


    Currently, good work.

    But I want to wort setter about [Property="VerticalAxis"]

    Now chart is changed by changing [ItemsSourcePath="Data"]

    But converter of 'VerticalAxis' do not work.

    Why is this not work?

    What should I do for working of converter ?

  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 16 May 2014 Link to this post

    Hi Lee,

    Thank you for the provided code snippet. I created a small test project based on it. Everything works as expected. I debugged the multibinding converter and the proper values are passed to it. I have attached this project for you to check it out. Let us know if you have any additional questions.

    Regards,
    Petar Marchev
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Lee
    Lee avatar
    30 posts
    Member since:
    Apr 2014

    Posted 18 May 2014 in reply to Petar Marchev Link to this post

    Thank you for reply.

    I wonder one thing.

    Currently, my code is using timer.

    So chart is refreshed.

    But precessing is slow.

    What should I do for faster processing.
  5. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 21 May 2014 Link to this post

    Hello Lee,

    Can you share with us more information?

    1. How many series do you have?

    2. Do you know the number of series in advance?

    3. How many data items does a series have?

    4. How often do the items source change?

    5. What are the changes? Do you add new items, remove new items or update present items' values?

    6. What render options do you use? Have you tried bitmap or direct2D (you can find a direct2D demo in our WPF QSF examples)?

    7. What makes you think that it is the processing that is slower? Are you sure its not the drawing part that is slower?


    Regards,
    Petar Marchev
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top