Question
Why negative values shown on X axis of dynamic graph when just switched form invisible to visible?
Step to reproduce the issue:
- Setup a dynamic graph widget with X axis label
- Setup a button to switch the graph invisible and visible i.e. :
buttonHandler() {
if(graph.isVisible()) {
graph.setVisible(false);
graph.invalidate();
}
else {
graph.setVisible(true);
graph.invalidate();
}
}Run the application, wait until the graph roll at least one screen length. Then click the button 2x to make it invisible and visible again. The X axis label become negative at point where we left the graph.
Why so? and how can I avoid this?
