diff --git a/platform/features/plot/res/templates/plot.html b/platform/features/plot/res/templates/plot.html
index 5bf79c1fda..1c83f00e39 100644
--- a/platform/features/plot/res/templates/plot.html
+++ b/platform/features/plot/res/templates/plot.html
@@ -19,8 +19,7 @@
-
+
{{axes[1].active.name}}
@@ -66,6 +65,7 @@
diff --git a/platform/features/plot/src/PlotController.js b/platform/features/plot/src/PlotController.js
index f1fee47f31..e29c2afae3 100644
--- a/platform/features/plot/src/PlotController.js
+++ b/platform/features/plot/src/PlotController.js
@@ -11,7 +11,8 @@ define(
"./elements/PlotPosition",
"./elements/PlotTickGenerator",
"./elements/PlotFormatter",
- "./elements/PlotAxis"
+ "./elements/PlotAxis",
+ "./modes/PlotModeOptions"
],
function (
PlotPreparer,
@@ -20,7 +21,8 @@ define(
PlotPosition,
PlotTickGenerator,
PlotFormatter,
- PlotAxis
+ PlotAxis,
+ PlotModeOptions
) {
"use strict";
@@ -47,6 +49,7 @@ define(
marqueeStart,
panZoomStack = new PlotPanZoomStack([], []),
formatter = new PlotFormatter(),
+ modeOptions,
domainOffset;
// Utility, for map/forEach loops. Index 0 is domain,
@@ -217,6 +220,11 @@ define(
updateTicks();
}
+ function setupModes(telemetryObjects) {
+ modeOptions = new PlotModeOptions(telemetryObjects);
+ }
+
+ $scope.$watch("telemetry.getTelemetryObjects()", setupModes);
$scope.$watch("telemetry.getMetadata()", setupAxes);
$scope.$on("telemetryUpdate", plotTelemetry);
$scope.draw = {};
@@ -297,6 +305,15 @@ define(
unzoom: function () {
panZoomStack.clearPanZoom();
updateDrawingBounds();
+ },
+ getModeOptions: function () {
+ return modeOptions && modeOptions.getModeOptions();
+ },
+ getMode: function () {
+ return modeOptions && modeOptions.getModeOptions()[0];
+ },
+ setMode: function (mode) {
+ console.log(mode);
}
};
diff --git a/platform/features/plot/src/modes/PlotModeOptions.js b/platform/features/plot/src/modes/PlotModeOptions.js
new file mode 100644
index 0000000000..0fbbf8590a
--- /dev/null
+++ b/platform/features/plot/src/modes/PlotModeOptions.js
@@ -0,0 +1,36 @@
+/*global define*/
+
+define(
+ [],
+ function (PlotOverlayMode, PlotStackedMode) {
+ "use strict";
+
+ var STACKED = {
+ key: "stacked",
+ name: "Stacked",
+ glyph: "8"
+ },
+ OVERLAID = {
+ key: "overlaid",
+ name: "Overlaid",
+ glyph: "6"
+ };
+
+ function PlotModeOptions(telemetryObjects) {
+ var options = telemetryObjects.length > 1 ?
+ [ STACKED, OVERLAID ] : [ OVERLAID, STACKED ];
+
+
+ return {
+ getModeOptions: function () {
+ return options;
+ },
+ getMode: function (option) {
+
+ }
+ };
+ }
+
+ return PlotModeOptions;
+ }
+);
\ No newline at end of file