2021-06-03 10:54 PM
It seems in Dynamic Graph widget, the only way to plot data is by:
addDataPoint(float y)
which automatically just add a data point to the next index from previous plot. But this might not suitable for real time monitoring.
In real time monitoring, we want to position the data according to timeline of x axis. So if for some reason say we miss acquiring data for two beats, then the next plot should not be on next index, instead it should be on next index + 2. Is there anyway we can do this? i.e. plotting the data given index so like:
addDataPoint(int index)
2021-06-03 11:36 PM
You may:
1) add same value twice
or
2) take source code of the graph class, extend it with required functionality and use as a custom widget
2021-06-06 09:45 PM
Thank you @ktrofimo , I am interested approach 2. Could you tell me what is the graph class name to extend and what class member associated with the index plotting?
2021-06-07 12:06 AM
DynamicGraph class itself is not published in sources, but it consists of many elements. For scrolling graphs data is stored in GraphScroll class with private yValues[CAPACITY] member. You might try to inherit your own class based on GraphScroll class, but he problem is that yValues[] array is declared as private and I see no methods for accessing this data. Probably it has to be completely your own custom widget.