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

Is it possible to move a selected data point

5 Answers 130 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 23 Apr 2014, 05:55 AM
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?

5 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 23 Apr 2014, 08:23 AM
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.
 
0
Mike
Top achievements
Rank 1
answered on 28 Apr 2014, 09:11 PM
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
0
Petar Marchev
Telerik team
answered on 29 Apr 2014, 07:16 AM
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.
 
0
Mike
Top achievements
Rank 1
answered on 30 Apr 2014, 05:08 AM
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. 
0
Petar Marchev
Telerik team
answered on 30 Apr 2014, 10:02 AM
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.
 
Tags
ChartView
Asked by
Mike
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Mike
Top achievements
Rank 1
Share this question
or