Dynamic series, data binding and zoom/scroll

2 posts, 0 answers
  1. Mike Cousins
    Mike Cousins avatar
    6 posts
    Member since:
    Mar 2010

    Posted 07 Apr 2010 Link to this post

    I'm running into some issues now as I'm adding zooming/scrolling support to our app and was hoping I could get some help to solve them.

    This is our app:
    - charting application which has one chart area in which they can chart different series
    - the user can open a pop-up and select which series they would like to see
    - all of our data is values over time of an operational system for instance a temperature reading, pressure reading, voltage reading, etc.

    Right now when the user selects and deselects series that they want to display we add and remove DataSeries objects from the chart.  When I enabled zoom/scroll it operates weirdly: the scroll bars change seemingly reflecting the fact that we zoomed in, the zooming only zooms in the Y axis, scrolling is non-functional, etc.  I read in another post that for zoom/scroll to work we need to databind to ItemsSource which we are not currently doing.  Is this the reason for our issues?

    To do the data binding we will then need to start using the SeriesMapping collection and add and remove those mappings when a new list of points is added to the data binding.  Is there any best practice for doing this?  Any examples?  I'm getting a lot of exceptions as it seems the timing is finnicky and it also seems a bit hackish since my data objects now need access to my presentation objects (to update the series mappings when the data object changes).
  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 13 Apr 2010 Link to this post

    Hi Mike,

    Let me start by answering your question for zoom/scroll -- yes, you need to use ItemsSource in order to use the zoom/scroll feature of RadChart. Then you will need to either add/remove mappings dynamically or add all the SeriesMappings you need once and manipulate the Visibility property of the SeriesDefinition objects. I have attached a small example showing this.

    Kind regards,
    Ves
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top