We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to calculate points along a user edited SplineSeries

This may be beyond the scope of this forum but it doesn't hurt to ask.

Background:
I have a pressure curve that I need to allow users to edit. It has 256 pressure points. Loading all points into a spline series is to high of fidelity. The ask is for a simpler curve.

What I have done so far:
I reduced the sample down to 5 points across the curve. Loaded those into a SplineSeries to get the simplified curve and enabled editing.

The ask:
Once the user has edited the simplified curve I need to calculate from it the 256 actual values and then send that off to a driver.  Does the SplineSeries have something to help with this? Or does someone better at math have an idea how to calculate this mapping? I have been reading about bezier curves but I am not making much headway.

Thank you,
Gary
 

9 Replies

RA Rachel A Syncfusion Team February 9, 2015 11:41 AM UTC

Hi Gary,

Thanks for your interest in Syncfusion products.

We are not able to understand your requirements clearly. So we have prepared a sample with spline series loaded with 256 points .Could please modify the sample based on your requirement or provide your sample which would help to us to serve you better. Please find the sample in the below location.

Sample: Spline_Series.zip

Please let us know if you have any queries.

Thanks,

Rachel. A





GM Gary Montgomery February 11, 2015 09:39 PM UTC

Thank you Rachel.

Let me try describing the ask once more. I have 256 data points *but* I need an editable curve to behave as if I only have 5 data points. So a very simple curve. After the user edits this simple curve I then need to derive the 256 data points from the simple curve.

The background why this is needed is this is a pressure curve for a device. Users don't care about individual values. They care about the overall feel of the curve. Some curves will give the user an aggressive response while others will give them a delicate touch. 

I realize this may be too far from the intended use of this control but being new to Syncfusion I figured it's better to ask than make assumptions after just a couple days.

Thank you!


RA Rajkumar Syncfusion Team February 12, 2015 05:59 PM UTC

Hi Gary,

Thank you for the update.

We would like to confirm your requirement from the previous update. We suspect that your requisite is to plot fewer points by skipping the intermediate data points as in below screenshot.

 

 

Note : The above curve is just a model representation with LineSeries. Here Actual Curve is drawn to display the total no of data points.

 

Query : After the user edits this simple curve I then need to derive the 256 data points from the simple curve.

We suspect that your requirement is to form the same type of curve (with minimal points), after we edit any data point values.

Please revert us, if these are not your requirements.

Thanks,

Rajkumar BR.




GM Gary Montgomery February 12, 2015 07:06 PM UTC

Yes, Rajkumar. I think you summarized it perfectly except a splineseries instead of a lineseries. The user edits the simple curve (labeled "expected curve" in your diagram) and then after the edit we generate the "Actual curve".


RA Rachel A Syncfusion Team February 13, 2015 12:59 PM UTC

Hi Gary,

Thanks for your update.

Currently we don’t have any in-built support for your requirement. However we are analyzing the any workaround feasibility to achieve in sample level .We will update you the status in one day probably on Feb, 16.

Thanks,

Rachel. A




GM Gary Montgomery February 13, 2015 06:18 PM UTC

Thank you, Rachel A. I really appreciate you looking into this.


RA Rachel A Syncfusion Team February 17, 2015 12:46 PM UTC

Hi Gary,

Thank you for your patience.

We have prepared the workaround sample based on your scenario. We have created a wrapper like class called DataOptimizer. This class having the method to optimize your data points collection to minimum data points and also we have exposed a property called NumberofPoints . This property is used to define our optimizing degree, for instance if it is set as 10 means, you might get 50 points approximately. We have prepared a demo sample for this and find the sample from the below location.

Sample: DataEdit.zip

For editing requirement, you can use the DragDelta event as in the above sample.

Note: This workaround wrapper create specifically to resolve your scenario with fewer test cases.

Also we would like to recommend to refer the about the Trendline feature of SfChart, which resembles your requirement.

Please let us know if need any further assistance on this.

Thanks,

Rachel. A




GM Gary Montgomery February 17, 2015 09:10 PM UTC

Thank you, Rachel A.


RA Rachel A Syncfusion Team February 18, 2015 10:45 AM UTC

Hi Gary,

Thanks for your response.

Please let us know if you require further assistance on this.

Thanks,

Rachel. A



Loader.
Live Chat Icon For mobile
Up arrow icon