Hi there,
When using the ScatterSplineSeries, we figured out a strange behavior.(as shown below)
As you can see, the right part (blue one), which is using ScatterSplineSeries, the dotted line goes a bit left then goes right.
At meanwhile, the left part, which is using SplineSeries, looks quite good.
This is not what we want. We have tried to use Stiffness to make it look the same as SplineSeries.
But, if the points are close and high enough, it still behaves like the right part.
Do you have a good solution to adjust it?
Regards
Hello Ding,
I have been investigating into the behavior you are seeing, and this behavior is actually expected with the ScatterSplineSeries. The reason is because the regular SplineSeries is constrained such that the X values will constantly be left-to-right. The ScatterSplineSeries does not have that constraint, since the X values could go in any direction at any time in your underlying data due to the Numeric X and Y axes.
You can use the Stiffness property to make it act the same as the SplineSeries, and after putting together a sample project using a data source like the one you depicted, I have found that a Stiffness value of 0.20 gets a visualization very close to the SplineSeries. Note, this property takes a value between 0 and 1, where 0 will be the most rigid and the 1 the most loose. For example, if you set this property to 0, you will effectively receive a ScatterLineSeries.
I hope this helps you. Please let me know if you have any other questions or concerns on this matter.
Hello Andrew,
Thanks for your quick response.
We have tried to use stiffness, but as i said, if the line is steep, e.g. we have two points: (1,1) (2,100),
and the range of x axis is 0 - 100, in this case, we need to set the stiffness to a even smaller number like 0.01 to make it
behave like SplineSeries.
Do we have a automatic way to do it?
There does not currently exist a built-in way to “force” the ScatterSplineSeries to appear the exact same way as a SplineSeries would without modification of the Stiffness property at this time. Perhaps something you could do is provide some sort of UI to users such as a slider or something along those lines that would bind to the Stiffness property of your series? This would allow your user to configure it?
The best alternative I have is to simply use a SplineSeries instead. This is not usable with a NumericXAxis though, and so you would need to use one of the "category" axes.
If you would like to see a property exposed to constrain the ScatterSplineSeries to look exactly like a SplineSeries, I would recommend suggesting a new product idea for this at our WPF Ideas Site, here. This will place you in direct communication with our product management teams who plan and prioritize upcoming features and development based on community and user feedback.
Please let me know if you have any other questions or concerns on this matter.