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

Feat: Graph range + Improve createGraphPath function #18

Closed chrispader closed 2 years ago

chrispader commented 2 years ago

Implement range prop on LinearGraph, which allows to set custom ranges for the x/y axis. ==> Allow the graph to not cover the whole canvas.

This PR also improves the createGraphPath function, so the path doesn't look flat for the case of very few data points.

mrousavy commented 2 years ago

Is this ready for review?

chrispader commented 2 years ago

@mrousavy Ready for review! This PR is directly linked to #17, as the horizontalPadding and verticalPadding props are respected in the new createGraphPath function.