CartesianMarkedZoneAnnotation drag handles?

3 posts, 1 answers
  1. Jonathan
    Jonathan avatar
    6 posts
    Member since:
    Jun 2014

    Posted 30 Jun 2014 Link to this post

    Any way of adding drag handles to a CartesianMarkedZoneAnnotation?

    Thanks,

    Jonathan
  2. Answer
    Martin
    Admin
    Martin avatar
    1101 posts

    Posted 02 Jul 2014 Link to this post

    Hi Jonathan,

    I already answered your question in the support ticket that you opened. I will post the answer also here so that it will be available for the other members of our community.

    The RadChartView doesn't support an annotation with handlers out of the box. However, you should be able to achieve your requirement with custom implementation. For example you can have two CartesianGridLineAnnotations which will represent the handlers. The annotations can be placed at the same start and end dates of the CartesianMarkedZoneAnnotation. Then you can subscribe (for example) for the MouseMove event of the chart view and if the mouse is under the handler's annotation, and based on the mouse position, you can move the annotations. You can use the ConversionAPI to get the data point under the mouse and use its date.

    Another approach is instead of the MouseMove to use drag/drop events. I prepared a sample project with the DragDropManager that demonstrates resizable marked zone annotation. Please keep in mind this is a custom implementation that is not well tested and I cannot guarantee that it will work correctly in all possible scenarios. This is why I suggest you to use the approach from the project only as a base for your implementation


    Regards,
    Martin
    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. Jonathan
    Jonathan avatar
    6 posts
    Member since:
    Jun 2014

    Posted 02 Jul 2014 Link to this post

    Thanks for the response... the first suggestion (additional CartesianGridLineAnnotations) has worked very well, will try the DragDrop solution as well later on. That ConversionAPI is a useful tool!

    Jonathan
Back to Top