fl_chart icon indicating copy to clipboard operation
fl_chart copied to clipboard

[Question][LineChart] getting y value from x

Open fvisticot opened this issue 3 years ago • 3 comments

I have a first line displaying altitude (y axis) regarding distance (x axis) This line is displayed with a curve to have something smooth (in that case some y data are interpolated between 2 distance points)

I have another line (but only points are displayed) displaying people location but I have only the distance for the data (not the altitude)

People location distance value is not always available on the altitude data (by example altitude is available for distance 3000m and 3500m but not for 3200m)

To display the people location on the right place, I need to get the interpolated value for the altitude line.

How to get this value ?

fvisticot avatar Dec 26 '21 09:12 fvisticot

Hi. I didn't understand it clearly. Can you please share something here?

imaNNeo avatar Feb 14 '22 18:02 imaNNeo

The line displayed with the library is interpolating value coming from the list of points we provide. By example with those points [x, y]: [0, 3], [2, 6], [4, 8], [7, 12] => the lib will display a smooth line between the points. The lib will interpolate the y value for x=1, x=3, x=5, x=6 My need it to get the y value you interpolate to display the smooth line

fvisticot avatar Feb 14 '22 19:02 fvisticot

Got it.

imaNNeo avatar Feb 14 '22 20:02 imaNNeo