I have a spline graph that supports both 1 year series data points and also 3 years on a react application.
When the graph has a certain length of data points it should be scrollable to the left ( user should see newer data ). I have a button that switches these different timelines. However after 1 or 2 switches the graph automatically slides all the way to the left.
chart: {
scrollablePlotArea: {
minWidth: getGraphMinWidthValue(),
scrollPositionX: 1,
},
spacingBottom: 30,
spacingLeft: 30,
spacingRight: 30,
spacingTop: 10,
type: 'areaspline',
}
I can provide more of the config and also a little note: data is being updated with a useState and with mocked data.