BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
I've created SfChart as a spline type. I have two root
arrays which have double type elements; the first one is X array and the next
one is Y array. The element of each X array corresponds to an element of Y
array. Like at below. These arrays contain more than ten float or int values.
double [] X = …
double [] Y = …
I want to find an interpolation value belong to
spline with any method. It can be linear, non-linear, regression, cubic or
more complex; not matter.
I need the specific points between the X-Y data values which I used. I have
known only the Y value of these points, but I can’t find the corresponding X
value.
For example, Y=2 then X=? or X=5 then Y=?
I want to find interpolated value or shown on spline as a mouse tooltip. Is
there any way to solve this?
<chart:SplineSeries XBindingPath="XValue" YBindingPath="YValue" MouseMove="SplineSeries_MouseMove"
ItemsSource="{Binding Data}" ShowTooltip="True">
<chart:SplineSeries.TooltipTemplate>
<DataTemplate>
<TextBlock >
<Run Text="Q1 : "/>
<Run Text="{Binding Q1}"/>
</TextBlock>
</DataTemplate>
</chart:SplineSeries.TooltipTemplate>
</chart:SplineSeries>
|
private void SplineSeries_MouseMove(object sender, MouseEventArgs e)
{
if(e.OriginalSource is Path )
{
SplineSegment segment = (e.OriginalSource as Path).Tag as SplineSegment;
var q1 = segment.Q1;
var q2 = segment.Q2;
}
}
|