Is it possible to move a selected data point

6 posts, 0 answers
  1. Mike
    Mike avatar
    5 posts
    Member since:
    Mar 2013

    Posted 23 Apr 2014 Link to this post

    Is it possible to change a data point directly through the Chart? Basically I'd select a point and then click and drag it to the new view. This would only be on lineseries or scatter.

    Would the databinding work to update the viewmodel?
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 23 Apr 2014 Link to this post

    Hi Mike,

    The ChartView is a data visualization control which shows data, and its purpose is not to control the data from the chart. This is why we do not have such a feature out-of-the-box. However, you can implement this what-if scenario manually. You can use a PointTemplate and handle the mouse events. I have attached a project to demonstrate this.

    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. Mike
    Mike avatar
    5 posts
    Member since:
    Mar 2013

    Posted 28 Apr 2014 in reply to Petar Marchev Link to this post

    Thanks, this works. I was able to work out the databinding to the PlotInfo. The only issue I'm having is that the horizontal axis starts automatically increasing the number of ticks as the points near each other. I see this when I fix the range or allow the range to vary. Any ideas?
    Thanks
  5. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 29 Apr 2014 Link to this post

    Hello Mike,

    When you change the value of the business object, the chart detects this change and rebinds. This leads to a new axis range sometimes, which is expected. If you do not need for the axis to calculate an automatic range, you can manually set the Minimum and Maximum and this will never happen. You can also try setting the RangeExtendMode to None and see if this will result into the behavior that you want.

    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.
     
  6. Mike
    Mike avatar
    5 posts
    Member since:
    Mar 2013

    Posted 30 Apr 2014 in reply to Petar Marchev Link to this post

    I adjusted the ticks to 24 (my range is one day) and this reduced the problem but not entirely. The horizontal axis will still jitter and sometimes change marked times by 5 minutes. I can't find the RangeExtendMode in the objects nor anyplace in the documentation. 
  7. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 30 Apr 2014 Link to this post

    Hello Mike,

    I mistyped the name of the property, it is RangeExtendDirection and is a property of the numerical axes, does not apply to date time axes.

    Did you try setting a min and max to the axis? This should ensure that the range will never change throughout the chart's lifetime. 

    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
UI for WPF is Visual Studio 2017 Ready