Movable DataPoint

8 posts, 0 answers
  1. Mark
    Mark avatar
    6 posts
    Member since:
    Jul 2012

    Posted 16 Jul 2012 Link to this post

    Hi,

    I am using ScatterLineSeries to plot a serie of data points. What I want to achieve is that I could mouse-click on a point and move it up or down. How could I achieve this. Please help. The control I am using is ChartView for WPF in 2012 Q2 package.

    Thanks,
    Mark
  2. Mark
    Mark avatar
    6 posts
    Member since:
    Jul 2012

    Posted 18 Jul 2012 Link to this post

    Any suggestion?
  3. UI for WPF is Visual Studio 2017 Ready
  4. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 19 Jul 2012 Link to this post

    Hello Mark,

    The current version of RadChartView does not support such customization and it would not be possible to achieve the desired effect. We are currently working on a new ChartView feature for Q3 2012 (annotations support) and we will forward your feedback to our developers so they can consider enabling this scenario as part of the annotation effort as well (e.g. provide public methods for conversion between physical pixels and data units that can be used to achieve this functionality).

    If this requirement is critical to your project, you might consider using the RadChart control instead -- see the attached sample application that demonstrates what-if scenario for Line series.


    Kind regards,
    Giuseppe
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. Mark
    Mark avatar
    6 posts
    Member since:
    Jul 2012

    Posted 19 Jul 2012 Link to this post

    Thank you for your information Giuseppe,

    I have compared the speed/performance between Chart and ChartView. It looks like the difference is huge. Take my instance: Chart takes 10 second to plot vs ChartView takes 3 seconds. Is the difference as expected or shouldn't be so big? I am hesitating to move back to Chart because of its performance. Also, I noticed that changing one datapoint position from code-behind in a Chart is causing the whole Chart to redraw(I am assuming, because the datapoint position change takes time to happen). Meanwhile, changing a single datapoint position in ChartView is fast(I am assuming the whole chart is not redrawn in ChartView). Could you please shed some light on the difference?

    Thanks,
    Mark

  6. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 20 Jul 2012 Link to this post

    Hello Mark,

    You can find more information on RadChart vs RadChartView here: http://www.telerik.com/help/wpf/radchartview-radchartview-vs.-radchart.html.


    Greetings,
    Bart.
  7. Mark
    Mark avatar
    6 posts
    Member since:
    Jul 2012

    Posted 20 Jul 2012 Link to this post

    Eventually, the ChartView will support all the feathures Chart has. Is it right? I will stick on ChartView if that is the case. Otherwise, I have to search other options.

    Thanks,
    Mark
  8. Dan
    Dan avatar
    8 posts
    Member since:
    Apr 2012

    Posted 30 Jul 2012 Link to this post

    I'm doing something vaguely similar. To get the chart to recognize the nearest point you could use the trackball functionality and save whatever the last point that your mouse was nearest to in a 'lastPoint' variable. I have my data bound to an observable collection ( a dictionary in my case). I can then access the collection[lastPoint position] and replace it with another point as in collection[lastPoint] = newPoint. This makes it redraw the point ( remove, readd) behind the scenes, but oh well.

    Then you can also play with the relative position of the mouse to the chartview. Save the last point the mouse is at, and if the mouseY goes up or down (difference of mouseCurrenctPoint and mouseLastPoint), change the value on your newPoint accordingly. Hopefully this helps.
  9. Mark
    Mark avatar
    6 posts
    Member since:
    Jul 2012

    Posted 30 Jul 2012 Link to this post

    Thank you Dan.

    Your way looks like is the only option to go. I am hoping that Telerik could introduce useful api's in a near future.

    Thanks,
    Mark
Back to Top
UI for WPF is Visual Studio 2017 Ready