diff --git a/platform/features/plot/bundle.json b/platform/features/plot/bundle.json index b9d21894bb..b32a237d10 100644 --- a/platform/features/plot/bundle.json +++ b/platform/features/plot/bundle.json @@ -21,7 +21,7 @@ { "key": "PlotController", "implementation": "PlotController.js", - "depends": [ "$scope", "telemetryFormatter" ] + "depends": [ "$scope", "telemetryFormatter", "telemetrySubscriber" ] } ] } diff --git a/platform/features/plot/res/templates/plot.html b/platform/features/plot/res/templates/plot.html index 5101438bd9..1f88ff9dd6 100644 --- a/platform/features/plot/res/templates/plot.html +++ b/platform/features/plot/res/templates/plot.html @@ -113,7 +113,7 @@ - +
diff --git a/platform/features/plot/src/PlotController.js b/platform/features/plot/src/PlotController.js index 05ba514a73..a812a6ce25 100644 --- a/platform/features/plot/src/PlotController.js +++ b/platform/features/plot/src/PlotController.js @@ -78,7 +78,10 @@ define( } function updateValues() { - modeOptions.getModeHandler().plotTelemetry(updater); + if (updater) { + updater.update(); + modeOptions.getModeHandler().plotTelemetry(updater); + } update(); } @@ -92,8 +95,10 @@ define( domainObject, updateValues ); - setupAxes(subscription.getMetadata()); - recreateUpdater(); + if (subscription) { + setupAxes(subscription.getMetadata()); + recreateUpdater(); + } } $scope.$watch('domainObject', subscribe); diff --git a/platform/features/plot/src/modes/PlotOverlayMode.js b/platform/features/plot/src/modes/PlotOverlayMode.js index de4445961e..342bbcc1c3 100644 --- a/platform/features/plot/src/modes/PlotOverlayMode.js +++ b/platform/features/plot/src/modes/PlotOverlayMode.js @@ -38,7 +38,7 @@ define( return { buffer: buf, color: PlotPalette.getFloatColor(i), - points: buf.length / 2 + points: prepared.getLength(i) }; }); diff --git a/platform/features/plot/src/modes/PlotStackMode.js b/platform/features/plot/src/modes/PlotStackMode.js index 25ad2e0304..5fe3895a61 100644 --- a/platform/features/plot/src/modes/PlotStackMode.js +++ b/platform/features/plot/src/modes/PlotStackMode.js @@ -35,7 +35,7 @@ define( subplot.getDrawingObject().lines = [{ buffer: buffer, color: PlotPalette.getFloatColor(0), - points: buffer.length / 2 + points: prepared.getLength(index) }]; subplot.update();