This is a migrated thread and some comments may be shown as answers.

Movable DataPoint

7 Answers 85 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 16 Jul 2012, 09:22 PM
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

7 Answers, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 18 Jul 2012, 01:34 PM
Any suggestion?
0
Giuseppe
Telerik team
answered on 19 Jul 2012, 12:40 PM
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.

0
Mark
Top achievements
Rank 1
answered on 19 Jul 2012, 01:58 PM
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

0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 20 Jul 2012, 08:04 AM
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.
0
Mark
Top achievements
Rank 1
answered on 20 Jul 2012, 01:30 PM
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
0
Dan
Top achievements
Rank 1
answered on 30 Jul 2012, 04:38 PM
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.
0
Mark
Top achievements
Rank 1
answered on 30 Jul 2012, 08:20 PM
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
Tags
ChartView
Asked by
Mark
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 1
Giuseppe
Telerik team
Bartholomeo Rocca
Top achievements
Rank 1
Dan
Top achievements
Rank 1
Share this question
or