margelo / react-native-graph

📈 Beautiful, high-performance Graphs and Charts for React Native built with Skia
https://margelo.io
MIT License
2.04k stars 115 forks source link

Possibility to get y position of a point/value at an index? #89

Open himynameisubik opened 10 months ago

himynameisubik commented 10 months ago

With a points array as usual, (how) is it possible to get the y position of a point (for example points[1]) on the linegraph? I'm trying to draw a line on max and min similar to the Top and BottomAxisLabels examples, but they are (obviously?) just on the top and bottom of the graph "frame".

image

const points = [
    {
       value: 100,
       date: new Date('2020-01-01')
    },
    {
       value: 200,
       date: new Date('2020-01-01')
    },
    {
       value: 300,
       date: new Date('2020-01-01')
    },
    ...
 ]