fl_chart
fl_chart copied to clipboard
[Question][LineChart] getting y value from x
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 ?
Hi. I didn't understand it clearly. Can you please share something here?
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
Got it.