]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.trend/src/org/simantics/trend/impl/Plot.java
Render last known value in time series chart hairline value tip
[simantics/platform.git] / bundles / org.simantics.trend / src / org / simantics / trend / impl / Plot.java
index bbeb3e695dbb9bf5a1c0b4bf0cc747d289fa2f20..d014d6556a0633d6704338bf1c565e1e9141da3c 100644 (file)
@@ -475,8 +475,16 @@ public class Plot extends TrendGraphicalNode {
                                }
                                
                                if ( vb.getSample()!=null ) {
-                                       
-                                       if (isLast && vb.hasEndTime() && vb.getEndTimeDouble()<time) continue nextItem;
+
+                                       // gitlab #54: this can cause the value tip to not render values at all
+                                       // for items that have not been flushed at the point in time when this drawing
+                                       // is done. These circumstances are always temporary and later refreshes will
+                                       // remedy the situation. Having this logic can cause item values to randomly
+                                       // not be shown which is actually even more confusing to the user than rendering
+                                       // the latest flushed sample value.
+                                       // 
+                                       // For this reason, the if below has been commented out.
+                                       //if (isLast && vb.hasEndTime() && vb.getEndTimeDouble()<time) continue nextItem;
                                                                                
                                        if ( !vb.isNanSample() && !vb.isNullValue() ) {
                                                Binding b = vb.getValueBinding();