react-native-chart-kit icon indicating copy to clipboard operation
react-native-chart-kit copied to clipboard

Using (x,y) points as data for LineChart

Open RonaldBecerra opened this issue 5 years ago • 3 comments

LineChart seems to only take care about data on the y-axis, because it treats the x-data as labels, putting them equally spaced regardless of if them correspond or not to the y-axis entries. What would happen if I my data were (x,y) points and the x's were not equally spaced? Is there a way to indicate the LineChart about that?

RonaldBecerra avatar Oct 01 '20 05:10 RonaldBecerra

LineChart seems to only take care about data on the y-axis, because it treats the x-data as labels, putting them equally spaced regardless of if them correspond or not to the y-axis entries. What would happen if I my data were (x,y) points and the x's were not equally spaced? Is there a way to indicate the LineChart about that?

If you found any solution for this, please post it here.

NishilE avatar Jul 23 '21 07:07 NishilE

LineChart seems to only take care about data on the y-axis, because it treats the x-data as labels, putting them equally spaced regardless of if them correspond or not to the y-axis entries. What would happen if I my data were (x,y) points and the x's were not equally spaced? Is there a way to indicate the LineChart about that?

Did you manage to solve this problem?

jaison-x avatar Apr 06 '23 21:04 jaison-x

For those who asked: yes, I found the solution. But it wasn't using any of the LineChart default functions, but modifying the source code of it. Fortunately, it only required to modify two files:

/src/abstract-chart.js abstract-chart.txt

and /src/line-chart/line-chart.js line-chart.txt

Sorry for the comments in Spanish.

RonaldBecerra avatar May 29 '23 02:05 RonaldBecerra