change the number of data points for when a dynamic graph scrolls over?
Hi,
I'm trying to make a dynamic scroll graph such that the number of data points and x-axis scale changes when a user sets a value through a slider. The issue I'm running into is the inability to update the number of data points for when the graph scrolls (ie if scale is 30 min, then graph scrolls after 30 data points are added; if scale is 10 min, then graph scrolls after 10 data points are added).

Using the slider below, the user is able to pick a number of minutes between 1 and 30. I already have it so that the slider changes the x-axis scaling and labeling:

For example, if the slider changes the visible range to 10, the number of data points is still always set to 30. This causes the graph to not scroll until 30 data points have been plotted even if it's not shown on the graph.

Is there a way to change the number of data points (max capacity) through code? One thing I tried is within the touchgfx framework, I went into the graph widget folder and edited the AbstractDataGraph.hpp to add a setMaxCapacity function, but it doesn't work. Thank you for the help in advance!
