Spline looks odd

Greetings!

I have a chart with a spline interpolated series that has wild data points sometimes, e.g. start left bottom, going to top right and then going back to middle bottom. Please see my screenshot:

The spline type is 'Cardinal' with tension 0.6. It doesn't look like a smooth series. All other spline types are looking even worse with that data. How is this spline calculated? Doesn't it support other data than from left to right?

I inspected the SVG path for the series and it seems that the tangents are calculated wrongly. How can I fix that?

Regards,
Steffen

4 Replies 1 reply marked as answer

DG Durga Gopalakrishnan Syncfusion Team October 26, 2020 12:50 PM UTC

Hi Steffen 

We have prepared a spline chart sample as per your requirement. We have attached sample for your reference. By default, spline curve is a Bezier curve calculation based on provided points. 


Since we are unaware of your exact scenario in which an issue is reproduced, please share the following information which will be more helpful for further analysis and provide you the solution sooner.  
  • Try to reproduce the reported scenario in above sample.
  • Please share your sample (or) code snippet with full configurations.
  
Please revert us, if you have any concerns.  

Regards,  
Durga G 



SH Steffen Harbich October 26, 2020 02:00 PM UTC

Alright, here it is at stackblitz.

The curve starts left, going to top-right where the tangent is like 45° instead of -45° as I would expect it to be computed.




DG Durga Gopalakrishnan Syncfusion Team October 28, 2020 03:28 AM UTC

Hi Stefen, 
  
We are analyzing your reported scenario. We will check this and update the status within two business days(29th October, 2020). We appreciate your patience until then. 
  
Regards, 
Durga G 



DG Durga Gopalakrishnan Syncfusion Team January 4, 2021 01:51 PM UTC

Hi Steffen,

Sorry for delay in response. We have ensured the spline curve in excel with same data points. The excel curve is like our spline chart curve. We have attached excel sheet for your reference. Since the provided x axis values are in numeric, it will automatically be sorted in ascending order, so based on that curve is like +45 degree.


Please revert us if you have any concerns.

Regards,
Durga G


Marked as answer
Loader.
Up arrow icon