/// Extend existing band
// Extend endTime value
- if (!i.hasEndTime) {
- i.current.setTime( time.getBinding(), time.getValue() );
- } else {
- i.current.setEndTime( time.getBinding(), time.getValue() );
+
+ // This ensures that a value band's end time isn't the same
+ // as the next band's start time which makes it possible to
+ // know what are the timestamps between which the item value
+ // changed from a to b. This allows us to more correctly render
+ // steps and sloped lines accoring to the actual data.
+ if (!i.itemState.ooDeadband || isMinMaxFormat) {
+ if (!i.hasEndTime) {
+ i.current.setTime( time.getBinding(), time.getValue() );
+ } else {
+ i.current.setEndTime( time.getBinding(), time.getValue() );
+ }
}
+
if (i.itemState.ooDeadband || isMinMaxFormat) {
if (isValidValue) {
// Set last value