xanderdeseyn / react-native-responsive-linechart

A customizable and responsive line or area chart for react-native
https://react-native-responsive-linechart.surge.sh
MIT License
202 stars 46 forks source link

Setting view port start #69

Closed SamuelFairbrass closed 3 years ago

SamuelFairbrass commented 3 years ago

Hi, love the plugin! Very flexible and easy to install, and looks great. I was wondering if there is a way of starting the chart on the right of the data, rather than the left, like a stocks chart that can be scrolled.

For example, on a chart of 1 to 100 days, would it be possible to start at Day 90 rather than day 1 if the viewport is 10?

SamuelFairbrass commented 3 years ago

Re-read the docs and saw it could be set with initialOrigin: {x: xMaxValue - viewportWidth}